LuciferYang opened a new issue, #10610:
URL: https://github.com/apache/paimon/issues/10610

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master (5d019f5a6d)
   
   ### Compute Engine
   
   Flink
   
   ### Minimal reproduce step
   
   ```sql
   CREATE TABLE T (id INT, ts TIMESTAMP);
   INSERT INTO T VALUES (1, TIMESTAMP '2023-01-12 20:00:01');
   ANALYZE TABLE T COMPUTE STATISTICS FOR ALL COLUMNS;
   ```
   
   ### What doesn't meet your expectations?
   
   The statement fails:
   
   ```
   CatalogException: Flink does not support convert ColumnStats 
'CatalogColumnStatisticsDataLong{min=1673553601, max=1673553601, ndv=1, 
nullCount=0}' for Paimon column type 'TIMESTAMP(6)' yet
   ```
   
   Flink reports the min and max of a TIMESTAMP column as the epoch seconds of 
the wall-clock time, in a `CatalogColumnStatisticsDataLong`. 
`TableStatsUtil.getPaimonColStats` handles that class for the integer types and 
TIMESTAMP_LTZ, but not for TIMESTAMP, so analyzing all columns fails for any 
table with a TIMESTAMP column.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!
   


-- 
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]

Reply via email to