Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/paimon/core/table/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <vector>

#include "arrow/c/bridge.h"
#include "arrow/compute/initialize.h"

@SteNicholas SteNicholas Nov 2, 2026 •

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.

Guard initialization for the bundled Arrow version: The standard build pins Arrow 17.0.0 in third_party/versions.txt, which provides neither arrow/compute/initialize.h nor arrow::compute::Initialize(). cmake_modules/arrow.diff does not backport them, so this unconditional include breaks compilation with the repository's bundled dependency. Please guard both the include and the initialization call for Arrow versions that provide this API. Arrow 17 already registers the compute kernels when constructing its global function registry, with ARROW_COMPUTE=ON as configured here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I just found this issue when I tried to link paimon-cpp to a newer version of Arrow C++. Perhaps it is better for us to internally initialize the Arrow compute kernels before calling any paimon function. :)

#include "fmt/format.h"
#include "paimon/catalog/catalog.h"
#include "paimon/commit_context.h"
Expand Down Expand Up @@ -1074,6 +1075,7 @@ Result<std::unique_ptr<TableRead>> NewFormatTableRead(const std::shared_ptr<Form
} // namespace

Result<std::unique_ptr<TableRead>> TableRead::Create(std::unique_ptr<ReadContext> ctx) {
PAIMON_RETURN_NOT_OK_FROM_ARROW(arrow::compute::Initialize());
std::shared_ptr<ReadContext> context = std::move(ctx);
if (context == nullptr) {
return Status::Invalid("read context is null pointer");
Expand Down
Loading