feat(datafusion): add push down temporal literals#430
Open
liujiwen-up wants to merge 3 commits into
Open
Conversation
QuakeWang
reviewed
Jul 2, 2026
| .await | ||
| .expect("INSERT should collect"); | ||
|
|
||
| let timestamp_sql = "SELECT id, name FROM paimon.test_db.temporal_filter_pushdown \ |
Member
There was a problem hiding this comment.
This residual predicate is true for the row matched by the temporal predicate, so the result would stay the same even if the residual filter were dropped. Could we make the residual condition actually filter out a temporal match, or assert the plan still contains a residual FilterExec?
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
DataFusion filter pushdown currently cannot translate temporal literal
ScalarValues into PaimonDatums, so predicates on PaimonTIME,TIMESTAMP, andTIMESTAMP WITH LOCAL TIME ZONEcolumns fall open unnecessarily.Changes
ScalarValue::Time32MillisecondintoDatum::Timefor PaimonTimefields.TimestampSecond/TimestampMillisecond/TimestampMicrosecond/TimestampNanosecondintoDatum::Timestamp.Datum::LocalZonedTimestamp.div_euclid/rem_euclidfor sub-millisecond timestamp parts so negative timestamps before 1970 split correctly.Tests
cargo test -p paimon-datafusion filter_pushdowncargo test -p paimon-datafusion --test read_tables test_temporal_filter_pushdown_via_datafusion_scan -- --nocapturecargo test -p paimon-datafusionwas also run locally; all newfilter_pushdowntests passed, but the full package run hit existing fixture-dependent failures for missingdefault.partitioned_log_table/default.multi_partitioned_log_tableintable::tests::*scan*tests.