Skip to content

ORC-2225: [C++] Use narrowed FLOAT value for statistics - #2726

Closed
dajiaohuang wants to merge 2 commits into
apache:mainfrom
dajiaohuang:w7/orc-2225-float-statistics
Closed

dajiaohuang wants to merge 2 commits into
apache:mainfrom
dajiaohuang:w7/orc-2225-float-statistics

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

For FLOAT columns, use the binary32 value represented by the serialized data when updating stripe statistics and Bloom filters. Keep DOUBLE behavior unchanged. Add a predicate-pushdown regression that searches for the stored FLOAT value after writing a value that rounds during binary32 conversion.

Why are the changes needed?

ORC-2225 reports that C++ FLOAT statistics can reflect the pre-narrowed double instead of the value serialized as FLOAT. Using the stored value consistently prevents statistics and Bloom filters from describing a different value than the encoded data.

How was this patch tested?

  • Built the C++ orc-test target with the task-local Visual Studio 2026 CMake/Ninja/MSVC configuration.
  • orc-test.exe --gtest_filter="*testFloatPredicateUsesStoredValue*" — 1/1 passed.
  • orc-test.exe --gtest_filter="TestPredicatePushdown.*" — 5/5 passed.
  • CTest -R "^orc-test$" --output-on-failure completed successfully.
  • git diff --check passed.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: OpenAI Codex gpt-6-luna

Align encoded FLOAT values with their statistics and Bloom filter entries. Add a predicate pushdown regression for the stored binary32 value.

Generated-by: OpenAI Codex gpt-6-luna
@ffacs ffacs changed the title ORC-2225: Use narrowed FLOAT value for statistics ORC-2225: [C++] Use narrowed FLOAT value for statistics Oct 27, 2026
@ffacs ffacs closed this in 3204660 Oct 29, 2026
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.

3 participants