You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "leaves12138 (via GitHub)" <gi...@apache.org> on 2026/05/28 08:52:39 UTC

[PR] [core] Fix format table date partition pruning [paimon]

leaves12138 opened a new pull request, #8011:
URL: https://github.com/apache/paimon/pull/8011

   ### Purpose
   
   Fix `FormatTableScan` equality partition path optimization for partition columns whose internal literal representation differs from the partition directory string.
   
   For example, a DATE partition predicate `dt = DATE '2026-05-01'` is represented internally as epoch days (`20574`). The previous code used `literal.toString()` when building the optimized partition path, producing `dt=20574/` instead of the actual `dt=2026-05-01/`, which caused zero splits to be returned.
   
   ### Changes
   
   - Convert equality partition literals to their partition string representation via Paimon's cast framework before generating the partition path.
   - Pass `partitionType` into `extractLeadingEqualityPartitionSpecWhenOnlyAnd` so the literal can be formatted according to its field type.
   - Add a regression test covering DATE partition equality pruning for both normal partition paths and value-only partition paths.
   
   ### Tests
   
   - `mvn -pl paimon-core -Pfast-build -DfailIfNoTests=false -Dtest=FormatTableScanTest#testComputeScanPathWithDateEqualityFilter test`
   - `mvn -pl paimon-core -Pfast-build -DfailIfNoTests=false -Dtest=FormatTableScanTest test`
   - `mvn -pl paimon-core spotless:apply`
   


-- 
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@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Fix format table date partition pruning [paimon]

Posted by "leaves12138 (via GitHub)" <gi...@apache.org>.
leaves12138 merged PR #8011:
URL: https://github.com/apache/paimon/pull/8011


-- 
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@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org