Skip to content
Closed
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 cpp/src/arrow/testing/gtest_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ TEST(AssertTestWithinUlp, Basics) {
EXPECT_FATAL_FAILURE(AssertWithinUlp(123.456f, 123.456085f, 10), "not within 10 ulps");
}

#ifdef ARROW_COMPUTE

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.

while this might solve the specific test failure, I think the underlying problem is not solved.
gtest_util.cc is build if ARROW_TESTING=ON, it should not require run_end_encode as that requires ARROW_COMPUTE.
In my opinion the RunEndEncodeTableColumns function should be part of test utilities from arrow::compute, I created a PR for that:
#46161
This also appears on other issues as the one found here:
https://github.com/apache/arrow/pull/45618/files#diff-8e690315a407919d147f16a9a534fc9f5c3f6345b58820e2057afa7cd14bea6bR741
were I had to add run_end_encode to the non-conditional sources that are always included as part of libarrow as a workaround.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah that's great - thanks for taking a look! I agree your solution is more robust - let's roll with that

TEST(RunEndEncodeGtestUtilTest, SchemaTypeIsModified) {
std::shared_ptr<Table> table =
arrow::TableFromJSON(arrow::schema({arrow::field("col", arrow::utf8())}), {R"([
Expand All @@ -305,4 +306,5 @@ TEST(RunEndEncodeGtestUtilTest, SchemaTypeIsModified) {
ASSERT_TRUE(ree_table->schema()->field(0)->type()->Equals(
arrow::run_end_encoded(arrow::int32(), arrow::utf8())));
}
#endif
} // namespace arrow