Repository navigation
fix: preserve narrowing TRY_CAST comparison semantics - #24713
Draft
EltonChang1 wants to merge 4 commits into
Draft
EltonChang1 wants to merge 4 commits into
EltonChang1 wants to merge 4 commits into
Conversation
Contributor
|
Hi -- what is the status of this PR? |
Contributor
Author
|
I’ve fixed the SQL regression failures and expanded coverage for overflow/NULL semantics and Parquet pushdown. Fresh CI is running; I’ll mark this ready for review once it passes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
try_castis incorrectly unwrapped from comparisons, dropping NULL-on-overflow semantics #24702.Rationale for this change
A narrowing
TRY_CASTreturnsNULLfor values outside the target integer range. Removing that cast from a comparison lets those values participate directly, so the same row can projectNULLwhile its comparison incorrectly returnstrue.What changes are included in this PR?
TRY_CASTexpressions in logical comparisons,INlists, and the physical comparison simplifier used by pushed-down filters.What is the testing strategy for this PR?
The logical optimizer, physical expression, and integer-domain helper regressions pass locally. SQL tests matching
cast.sltandparquet_filter_pushdown.sltalso pass, including the isolated Parquet pushdown regression.Full-workspace
cargo clippy --all-targets --all-features -- -D warnings,cargo fmt --all -- --check, andgit diff --checkpass locally.The prescribed extended workspace test run also passes locally, including all 540 SQL files. The suite's existing ignored Rust tests were skipped.
Are there any user-facing changes?
Yes. Comparisons and
INpredicates over narrowing integerTRY_CASTpreserve NULL-on-overflow semantics, excluding out-of-range values from filters.AI-assisted contribution disclosure
Prepared with AI assistance. Human review is still pending.