Skip to content

API: Preserve float comparisons with wide literals - #18980

Open
ViktorBystrov72 wants to merge 1 commit into
apache:mainfrom
ViktorBystrov72:fix/float-predicate-boundaries
Open

ViktorBystrov72 wants to merge 1 commit into
apache:mainfrom
ViktorBystrov72:fix/float-predicate-boundaries

Conversation

@ViktorBystrov72

Copy link
Copy Markdown

FLOAT binding folds comparisons against finite out-of-range DOUBLE literals to constants and treats double infinities as out of range. This can misclassify NaN, infinite, and null values. Keep ordering comparisons against the appropriate finite float endpoint, and preserve infinities when converting double literals to float.

Fixes #18700.

Test plan: compare FLOAT evaluation with equivalent DOUBLE evaluation for ordering, equality, and IN/NOT IN predicates, including finite limits, infinities, NaN, and null; verify literal conversion and binding shapes. All 9 new regression cases fail before the fix. The API module check reports 1351 tests, 1 skipped, and no failures/errors. Formatting, production/test Checkstyle, and module assembly pass.


AI Disclosure

Keep ordering predicates over float columns when a double bound exceeds
the finite float range. These predicates still need to distinguish
infinite and NaN values. Preserve double infinities during conversion
to float so equality and set predicates can match them.

Generated-by: OpenAI Codex
@github-actions github-actions Bot added the API label Nov 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API: Binding folds float comparisons with out-of-range literals incorrectly for NaN, infinity and null

1 participant