Repository navigation
feat(datafusion): support binary casts and byte widths - #1288
Merged
Merged
Conversation
This was referenced Nov 1, 2026
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.
Purpose
Closes #1282.
DataFusion's default SQL type planner rejects BINARY and VARBINARY query casts. SQLContext can declare these Paimon column types but cannot use the corresponding casts.
Brief change log
Tests
Regression coverage: UTF-8 and non-UTF-8 bytes, fixed/variable widths, truncation/padding, NULLs, nested casts, column inputs, invalid lengths, native views and portable persistent-view definitions.
Reproduced the missing behavior on the original main before implementation.
Passed the complete DataFusion suite with
TZ=UTC RUST_MIN_STACK=16777216 CARGO_BUILD_JOBS=3 cargo test --locked -p paimon-datafusion --all-targets -- --test-threads=4.Passed Rust 1.98 Clippy for this crate and all its targets with
--no-deps -- -D warnings, formatting and diff checks.Completed multiple review rounds for SQL semantics, boundary behavior and regression quality; fixed the actionable findings and revalidated the final head.
Integration validation: combined with feat(datafusion): support table and column comment DDL #1287, feat(datafusion): support RLIKE and REGEXP operators #1289, feat(datafusion): support lateral collection generators #1292, feat(datafusion): add common scalar compatibility functions #1291, feat(datafusion): evaluate immutable constant CALL arguments #1290 in a temporary checkout; the full DataFusion suite, a regression using all six extensions together, Clippy and formatting passed. These PRs are independently based on main; overlapping parser/registration hooks need normal conflict resolution when merged sequentially.
API and Format
Adds SQLContext SQL capabilities. No storage-format or Rust public API changes.
Documentation
Documented syntax, type/null/error behavior and supported limits in
docs/src/sql.md.