Skip to content

fix(cpp): restore Arrow 17 devcontainer compatibility - #952

Merged
SYaoJun merged 2 commits into
apache:mainfrom
keksmd:codex/cpp-arrow-compat
Aug 17, 2026
Merged

SYaoJun merged 2 commits into
apache:mainfrom
keksmd:codex/cpp-arrow-compat

Conversation

@keksmd

@keksmd keksmd commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Reason for this PR

Fixes #945. The published ghcr.io/apache/graphar-dev:latest image packages Arrow, Dataset, Acero, and Parquet 17.0.0, while the current C++ code unconditionally calls newer compute APIs and tests call the newer Parquet reader API. The C++ build therefore fails before it can act as the compatibility oracle for GraphAr metadata.

What changes are included in this PR?

  • Restore Arrow-version guards around compute initialization, retaining the Arrow 21+ execution path.
  • Keep Arrow 17 dataset initialization valid and use its output-parameter Parquet ReadTable API.
  • Make C++ test Parquet reads version-aware.
  • Avoid cancelling a fully drained Arrow 17 Acero plan during normal completion.

Are these changes tested?

Yes, in ghcr.io/apache/graphar-dev:latest on Linux arm64:

  • cmake --build /build --target graphar-cpplint
  • CMake Debug build with BUILD_TESTS=ON, BUILD_EXAMPLES=OFF, BUILD_BENCHMARKS=OFF, and sanitizers disabled
  • GAR_TEST_DATA=/workspace/incubator-graphar/testing ctest --test-dir /build --output-on-failure — 20 tests passed, 0 failed.

Are there any user-facing changes?

No public GraphAr API or format semantics change. This restores the supported C++ build/test path in the published devcontainer.

Checklist

  • I have performed a self-review of my own code.
  • I have formatted my own code using make cpplint before submitting when changed files are in the cpp directory.
  • I have performed pre-commit run before commit the changed files. The command is not installed on the host or the declared devcontainer.
  • I have added tests to prove my changes are effective.

Support the Arrow 17 compute and Parquet reader APIs packaged by the published development container while preserving the Arrow 21+ path.

Tests: graphar-cpplint; CMake build; ctest (20/20) in devcontainer
Fixes: apache#945
@keksmd

keksmd commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

CI audit for the current head 4538247:

  • Validate pull request title: passed.
  • GraphAr C++ CI, Pre-commit Checks, and license: action_required, with zero jobs/logs created.
  • Build Python Wheels: startup_failure, likewise with zero jobs/logs created.

These outcomes occur before a workflow job starts on this fork PR; they are not test failures. The local devcontainer evidence in the PR body covers the affected C++ scope: cpplint, Debug CMake build, and CTest 20/20. The submitting token cannot approve upstream workflow runs (GitHub returns 403 Must have admin rights to Repository), so maintainer approval is required before the upstream jobs can run.

@keksmd keksmd closed this Aug 13, 2026
@keksmd
keksmd deleted the codex/cpp-arrow-compat branch August 13, 2026 00:31
@keksmd
keksmd restored the codex/cpp-arrow-compat branch August 13, 2026 00:31
@keksmd keksmd reopened this Aug 13, 2026
@codecov-commenter

codecov-commenter commented Aug 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.65%. Comparing base (54601c9) to head (e9edbee).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #952      +/-   ##
============================================
+ Coverage     77.40%   81.65%   +4.25%     
  Complexity      615      615              
============================================
  Files            84       95      +11     
  Lines          8957    11153    +2196     
  Branches       1069     1070       +1     
============================================
+ Hits           6933     9107    +2174     
- Misses         1784     1806      +22     
  Partials        240      240              
Flag Coverage Δ
cpp 71.94% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SemyonSinchenko
SemyonSinchenko self-requested a review August 17, 2026 14:25
Comment thread cpp/src/graphar/arrow/chunk_reader.cc Resolved
Comment thread cpp/src/graphar/arrow/chunk_reader.cc Resolved
Comment thread cpp/src/graphar/fwd.h Resolved
Review feedback on apache#952.

Including arrow/util/config.h in fwd.h coupled the info API chain
(api/info.h -> graph_info.h/types.h/result.h) to Arrow. Since the graphar
target links Arrow PRIVATE and graphar-config.cmake does not export the Arrow
include directories, a downstream consumer of the info API alone would need
Arrow development headers on its include path. Every use of ARROW_VERSION in
this branch is in a translation unit that already depends on Arrow, so the
include belongs there instead.

Also spell the version checks as defined(ARROW_VERSION) && ..., matching the
checks already present in filesystem.cc and util.h.

Verified in ghcr.io/apache/graphar-dev:latest (Arrow 17): a translation unit
including only graphar/graph_info.h compiles with the Arrow headers removed
from the include path, which fails before this change; the full Debug build
succeeds and ctest reports 20/20 passed.

@SemyonSinchenko SemyonSinchenko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

~LGTM

@SemyonSinchenko

Copy link
Copy Markdown
Member

@SYaoJun @yangxk1 @Thespica Hi! Let's merge this one? LGTM overall. A well scoped fix from my point of view.

@SYaoJun
SYaoJun merged commit 8887a15 into apache:main Aug 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][C++] Devcontainer build incompatible with packaged Arrow 17

4 participants