Skip to content

fix: preserve large unsigned SQL filter literals - #8178

Merged
Xuanwo merged 2 commits into
mainfrom
gatekeeper/fix-7910-1
Aug 3, 2026
Merged

fix: preserve large unsigned SQL filter literals#8178
Xuanwo merged 2 commits into
mainfrom
gatekeeper/fix-7910-1

Conversation

@lance-gatekeeper

Copy link
Copy Markdown
Contributor

Summary

  • Parse nonnegative integer literals as u64 before falling back to f64.
  • Cover u64::MAX - 1 through logical planning and physical filter evaluation.

Root cause

The custom SQL planner tried i64 and then immediately parsed larger values as f64. Values in the upper half of the UInt64 domain therefore lost precision before literal coercion.

Validation

  • cargo fmt --all --check
  • cargo test -p lance-datafusion
  • cargo clippy --all --tests --benches -- -D warnings

Fixes #7910

@github-actions github-actions Bot added the bug Something isn't working label Aug 3, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

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.

Gate recommendation: approve. Parsing as u64 before the floating-point fallback addresses the demonstrated precision loss at its source while preserving the existing signed-integer and floating-literal behavior.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Xuanwo
Xuanwo merged commit 336bee5 into main Aug 3, 2026
40 of 41 checks passed
@Xuanwo
Xuanwo deleted the gatekeeper/fix-7910-1 branch August 3, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQL filters reject UInt64 literals above i64::MAX

1 participant