Skip to content

[parquet] Avoid timestamp predicate pushdown for incompatible file schemas#8797

Merged
JingsongLi merged 1 commit into
apache:masterfrom
lilei1128:fix-timetamp-pushdown
Jul 23, 2026
Merged

[parquet] Avoid timestamp predicate pushdown for incompatible file schemas#8797
JingsongLi merged 1 commit into
apache:masterfrom
lilei1128:fix-timetamp-pushdown

Conversation

@lilei1128

@lilei1128 lilei1128 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Purpose

Prevent incorrect query results when the timestamp logical type in a Parquet
file is incompatible with the current Paimon field type.

Validate the Parquet timestamp unit and adjustedToUTC flag before converting
Paimon predicates. Skip predicate pushdown when the file uses a different
timestamp unit or UTC adjustment. Also extract the common primitive field
lookup logic for reuse by decimal and timestamp validation.

Close #8801

Tests

Add ParquetFiltersTest#testTimestampFileUnitMismatchCannotPushDown to verify
that predicates are not pushed down when the Parquet file and read type use
different MILLIS/MICROS units.

Existing timestamp tests verify that predicates are still pushed down when
the Parquet timestamp schema matches the read type.

Manually verified with Spark SQL that timestamp equality queries return the
expected row after applying the fix.

@lilei1128

Copy link
Copy Markdown
Contributor Author

Close #8801

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi
JingsongLi merged commit e4045f7 into apache:master Jul 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Parquet timestamp predicate pushdown returns incorrect results when file and read timestamp units differ

2 participants