Repository navigation
build(arrow): upgrade to 26.0.1 and require C++20 - #598
SteNicholas wants to merge 1 commit into
Conversation
7e2ef71 to
1e5d99e
Compare
Parquet geospatial support needs upstream APIs available in Arrow 26. The upgrade requires C++20 for source builds. Installed Paimon consumers can still use C++17 and exchange columnar data through the Arrow C Data Interface. - Upgrade bundled Arrow and Parquet to 26.0.1. Require C++20 and CMake 3.26 for source builds, retire GCC 8 CI and update the build guides, addressing apache#596. - Keep Arrow C++ headers out of the public API. Compile, link and run a C++17 consumer against the installed Paimon package in CI. - Port the Parquet patches and register compute kernels in static Arrow builds. Keep asynchronous prefetch, byte-based page sizing and the page-index setting. Skip empty row groups on read and omit the new size statistics on write. - Report Arrow schema decoding failures in ORC with the file URI. Check nested field metadata and migrate test fixtures to Arrow's public JSON API.
1e5d99e to
9fcce87
Compare
|
I suggest removing Our copy shares the
|
| # under the License. | ||
|
|
||
| name: Gcc 8 Test | ||
|
|
There was a problem hiding this comment.
This GCC 8 CI was originally added by @SGZW in alibaba/paimon-cpp#194 to catch compatibility regressions. The Arrow upgrade now requires C++20. Could you assess whether we can drop GCC 8 support and remove this workflow?
| PAIMON_RETURN_NOT_OK_FROM_ARROW(sequences.Finish(&sequence_array)); | ||
| constexpr int32_t kSequenceNumberColumn = 0; | ||
| arrow::ArrayVector columns = {std::move(sequence_array), std::move(kind_array)}; | ||
| columns.insert(columns.end(), values->fields().begin(), values->fields().end()); |
There was a problem hiding this comment.
Is switching the sequence sort key from its name to index 0 necessary for the Arrow upgrade? Other keys still use names; could we keep the existing name-based reference for consistency?
| ASSERT_FALSE(HasExtraLookupFiles(write_msgs_p0)); | ||
| ASSERT_OK(Commit(table_path, write_msgs_p0)); | ||
| ASSERT_OK_AND_ASSIGN(auto write_msgs, WriteArray(table_path, partition_0, 0, array, | ||
| commit_id, true, {}, false)); |
There was a problem hiding this comment.
Please keep comments like /*row_kinds=*/{}; otherwise it’s hard to understand the call parameters.
| ASSERT_TRUE(result_array->Equals(*expected_array)); | ||
| ASSERT_TRUE(result_array->Equals(*expected_array)) | ||
| << "Actual: " << result_array->ToString() | ||
| << "Expected: " << expected_array->ToString(); |
There was a problem hiding this comment.
Can this debug code be removed?
| return ToArrowStatus(read_bytes.status()); | ||
| } | ||
| if (storage_read_bytes_) { | ||
| storage_read_bytes_->fetch_add(static_cast<uint64_t>(read_bytes.value())); |
There was a problem hiding this comment.
I noticed you removed the null-check for storage_read_bytes_ in ReadAsync(). Assuming the internal member is never null, that’s fine. But please also align the null-check behavior in the other functions like Read() and ReadAt().
|
Thanks for upgrading the Arrow version! @zjw1111 is running some read/write performance regressions now—let’s wait for his results. |
| diff --git a/cpp/src/arrow/util/value_parsing.h b/cpp/src/arrow/util/value_parsing.h | ||
| --- a/cpp/src/arrow/util/value_parsing.h | ||
| +++ b/cpp/src/arrow/util/value_parsing.h | ||
| @@ -793,7 +793,13 @@ static inline bool ParseTimestampISO8601(const char* s, size_t length, | ||
| if (ARROW_PREDICT_FALSE(!util::CastSecondsToUnit(unit, count, out))) { | ||
| - return false; | ||
| + if (count >= 0 || subseconds == 0 || | ||
| + !util::CastSecondsToUnit(unit, count + 1, out)) { | ||
| + return false; | ||
| + } | ||
| + const auto units_per_second = *util::CastSecondsToUnit(unit, 1); | ||
| + return !::arrow::internal::AddWithOverflow( | ||
| + *out, static_cast<int64_t>(subseconds) - units_per_second, out); | ||
| } | ||
| if (ARROW_PREDICT_FALSE(::arrow::internal::AddWithOverflow(*out, subseconds, out))) { | ||
| return false; | ||
| } | ||
| return true; |
There was a problem hiding this comment.
Could we drop this patch and use a near-boundary nanosecond value that upstream Arrow accepts in the casting test? Other Arrow versions may still reject INT64_MIN, so testing that exact value would make the test depend on Paimon's patched parser.
| + if (planned_data_page != nullptr) { | ||
| + ++next_data_page_; | ||
| + } |
There was a problem hiding this comment.
This branch looks unreachable because the read plan and data_page_filter are mutually exclusive and planned non-data pages are rejected above. Did a specific test fail without this increment, or was this a defensive check suggested by AI?
| ASSERT_NO_FATAL_FAILURE(write_file(batch_count, all_null_value, | ||
| DEFAULT_PARQUET_WRITER_MAX_MEMORY_USE, &default_limit)); | ||
| EXPECT_GT(limited.row_group_count, default_limit.row_group_count); | ||
| EXPECT_LT(limited.peak_memory, default_limit.peak_memory); |
There was a problem hiding this comment.
Could we also check the writer's peak memory against the configured threshold? For example, the old test checked that the peak was between 1 and 1.5 times the threshold. The current comparison can still pass if both peaks rise, so an explicit range would help catch future regressions in memory control.
Purpose
Linked issue: close #596
Upgrade bundled Arrow and Parquet from 17.0.0 to 26.0.1 for the upstream APIs needed by Parquet geospatial support. Paimon source builds require C++20 and CMake 3.26 or later. The installed public API continues to support C++17.
The Parquet benchmarks used Release builds and identical settings on the same macOS arm64 host. Each time is the mean of two run medians, with seven repetitions per run.
Tests
paimon/schema/schema.hand passes anArrowSchemathrough the public API.API and Format
Documentation
Yes.
CONTRIBUTING.mdanddocs/source/building.rstdocument the source-build requirements.docs/source/build_system.rstexplains C++17 consumer integration and uses C++20 for the Arrow C++ example.Generative AI tooling
Generated-by: OpenAI Codex 0.170.0
🤖 Generated with OpenAI Codex