Skip to content

53945: [C++] std::bit_width in ALP compression fails to compile with CRAN's macOS 11.3 SDK - #53946

Draft
thisisnic wants to merge 5 commits into
apache:mainfrom
thisisnic:GH-53945-cranalp
Draft

thisisnic wants to merge 5 commits into
apache:mainfrom
thisisnic:GH-53945-cranalp

Conversation

@thisisnic

Copy link
Copy Markdown
Member

Rationale for this change

CI failures for CRAN macOS

What changes are included in this PR?

Use helper function which works on CRAN macOS in new code + refactor existing stuff

Are these changes tested?

Yup

Are there any user-facing changes?

Nope

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Copilot AI balanced review requested due to automatic review settings October 15, 2026 23:10
@thisisnic

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-r-macos-as-cran

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused refactor preserves existing calculations, reuses the established compatibility fallback, and adds targeted coverage with no identified blocking issues.

0 open findings

What changed in this PR

Fixes ALP compilation with CRAN’s macOS 11.3 SDK by centralizing the existing bit-width compatibility fallback.

Changes:

  • Adds bit_util::BitWidth and reuses it across Arrow and Parquet.
  • Tests unsigned boundary values and compile-time evaluation.
File Description
cpp/​src/​parquet/​encoder.cc Uses the helper for delta bit widths.
cpp/​src/​parquet/​chunker_internal.cc Uses the helper for chunk masks.
cpp/​src/​arrow/​util/​rle_encoding_test.cc Uses the helper in round-trip tests.
cpp/​src/​arrow/​util/​bit_util.h Adds the compatibility helper and updates Log2.
cpp/​src/​arrow/​util/​bit_util_test.cc Adds helper coverage.
cpp/​src/​arrow/​util/​alp/​alp_compression.cc Replaces incompatible bit-width calls.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

Revision: 30307d4

Submitted crossbow builds: ursacomputing/crossbow @ actions-1e99b7a881

Task Status
test-r-macos-as-cran GitHub Actions

@thisisnic
thisisnic marked this pull request as ready for review October 15, 2026 23:16
Copilot AI balanced review requested due to automatic review settings October 15, 2026 23:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused refactor preserves existing calculations and fallback behavior, adds targeted coverage, and has no identified blocking issues.

0 open findings

🧠 Review effort: Balanced

@thisisnic
thisisnic marked this pull request as draft October 16, 2026 00:05
@thisisnic

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-r-macos-as-cran

@github-actions

Copy link
Copy Markdown

Revision: 896343c

Submitted crossbow builds: ursacomputing/crossbow @ actions-bffabff8ca

Task Status
test-r-macos-as-cran GitHub Actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants