JingsongLi commented on code in PR #8230:
URL: https://github.com/apache/paimon/pull/8230#discussion_r3457495381
##########
paimon-format/src/main/java/org/apache/paimon/format/parquet/ParquetSimpleStatsExtractor.java:
##########
@@ -223,8 +223,8 @@ private SimpleColStats toTimestampStats(Statistics<?>
stats, int precision) {
if (precision <= 3) {
LongStatistics longStats = (LongStatistics) stats;
return new SimpleColStats(
- Timestamp.fromEpochMillis(longStats.getMin()),
- Timestamp.fromEpochMillis(longStats.getMax()),
+ Timestamp.fromMicros(longStats.getMin()),
Review Comment:
This makes footer stats decoding depend only on the Paimon field precision,
but existing files written before this change still use TIMESTAMP_MILLIS and
store min/max in epoch milliseconds. The PR description says those files remain
readable; however any stats extraction path (for example migrate/clone or
metadata regeneration) would now decode an old value like 1704067200123 as
epoch micros and produce a 1970-era bound. Can we inspect the Parquet logical
unit from stats.type().getLogicalTypeAnnotation() / column metadata, like the
reader does, and keep MILLIS for legacy files?
--
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]