Skip to content

Initialize Arrow Compute in global test environment - #175

Merged
justing-bq merged 1 commit into
apache-odbcfrom
computeKernelEnv
Apr 21, 2026
Merged

Initialize Arrow Compute in global test environment#175
justing-bq merged 1 commit into
apache-odbcfrom
computeKernelEnv

Conversation

@justing-bq

Copy link
Copy Markdown

Rationale for this change

Arrow compute functions need to be initialized/registered to avoid a segfault on windows.

What changes are included in this PR?

Defined ComputeKernelEnvironment which initialized arrow compute during SetUp.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Comment on lines +32 to +36
// A global test "environment", to ensure Arrow compute kernel functions are registered
class ComputeKernelEnvironment : public ::testing::Environment {
public:
void SetUp() override { ASSERT_OK(arrow::compute::Initialize()); }
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One thing is that we generally only want this change applied to Windows because that's where the segfault occurs. And we want the ODBC to register the compute kernel at least on macOS/Linux

Comment thread cpp/src/arrow/flight/sql/odbc/tests/odbc_test_suite.cc

@alinaliBQ alinaliBQ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM,thanks

@justing-bq
justing-bq merged commit 0cf1afb into apache-odbc Apr 21, 2026
33 of 39 checks passed
@justing-bq
justing-bq deleted the computeKernelEnv branch April 21, 2026 17:28
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.

2 participants