jackylee-ch opened a new pull request, #9675: URL: https://github.com/apache/paimon/pull/9675
### Purpose `toTimestampLiteral` takes the precision from the column type but the value from the predicate literal, and nothing reconciles them — Spark builds the literal from its own type with `Timestamp.fromMicros`, so a `TIMESTAMP(0)` column can receive a millisecond literal. Dividing by 1000 (or discarding the sub-millisecond part on `TIMESTAMP(3)`) then yields a bound that answers some operators wrongly: `f_ts < 1500ms` on a seconds column pushed `< 1s` and dropped the 1000ms row, which no post-scan filter can restore. `Math.floorDiv` is not enough. For a residual literal, `col < L` needs the bound rounded down but `col > L` needs it rounded up, and `=` is unsatisfiable while `!=` is a tautology — one direction cannot serve all six operators. So a literal that is not exactly representable at the column's grain is no longer pushed, and the existing null handling drops the leaf. `ParquetFilters.normalizeDecimal` uses `RoundingMode.UNNECESSARY` for the same reason. ### Tests Three `roundTrip` cases in `VortexPredicateConverterTest`: millisecond literal on `TIMESTAMP(0)` with `<` and `!=`, a pre-epoch literal, and a sub-millisecond literal on `TIMESTAMP(3)`. All three return 0 rows on master. Written with Claude Code; verification is mine. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
