You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2026/01/19 06:53:19 UTC
[PR] feat(datafusion): Add Binary scalar value conversion for predicate pushdown [iceberg-rust]
viirya opened a new pull request, #2048:
URL: https://github.com/apache/iceberg-rust/pull/2048
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
- Closes #.
## What changes are included in this PR?
<!--
Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates.
-->
Add support for converting Binary and LargeBinary DataFusion ScalarValue types to Iceberg Datum, enabling binary predicates to be pushed down to the Iceberg storage layer.
This conversion allows SQL queries with binary hex literals (X'...') to push predicates down to Iceberg, improving query performance by filtering data at the storage level rather than in DataFusion.
The integration test verifies that binary predicates are successfully pushed down end-to-end:
- Without conversion: predicate stays in FilterExec with predicate:[]
- With conversion: predicate pushed to IcebergTableScan
Other scalar types (Boolean, Timestamp, Decimal) were investigated but excluded because they are not reachable through practical usage:
- Boolean: DataFusion aggressively optimizes comparisons (e.g., x=true becomes just x) before reaching the converter
- Timestamp/Decimal: SQL literals are converted to strings/other types before reaching the converter
## Are these changes tested?
<!--
Specify what test covers (unit test, integration test, etc.).
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat(datafusion): Add Binary scalar value conversion for predicate pushdown [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 merged PR #2048:
URL: https://github.com/apache/iceberg-rust/pull/2048
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat(datafusion): Add Binary scalar value conversion for predicate pushdown [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #2048:
URL: https://github.com/apache/iceberg-rust/pull/2048#discussion_r2706460282
##########
crates/integrations/datafusion/tests/integration_datafusion_test.rs:
##########
@@ -807,6 +807,55 @@ async fn test_insert_into_nested() -> Result<()> {
Ok(())
}
+#[tokio::test]
+async fn test_binary_predicate_pushdown() -> Result<()> {
Review Comment:
We have added sqllogictests support: https://github.com/liurenjie1024/iceberg-rust/blob/666a9fe1aaf1692583d6f44e4f7a1d52a688b217/crates/sqllogictest/testdata/schedules/df_test.toml#L19
Please move these tests there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat(datafusion): Add Binary scalar value conversion for predicate pushdown [iceberg-rust]
Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on code in PR #2048:
URL: https://github.com/apache/iceberg-rust/pull/2048#discussion_r2706507793
##########
crates/integrations/datafusion/tests/integration_datafusion_test.rs:
##########
@@ -807,6 +807,55 @@ async fn test_insert_into_nested() -> Result<()> {
Ok(())
}
+#[tokio::test]
+async fn test_binary_predicate_pushdown() -> Result<()> {
Review Comment:
Okay.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat(datafusion): Add Binary scalar value conversion for predicate pushdown [iceberg-rust]
Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on PR #2048:
URL: https://github.com/apache/iceberg-rust/pull/2048#issuecomment-3775710688
Thanks @liurenjie1024
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org