jackylee-ch opened a new pull request, #10367:
URL: https://github.com/apache/paimon/pull/10367

   ### Purpose
   
   `FieldMergeMapWithKeyTimeAggFactory` validates that the aggregated field is 
a `MAP`
   whose value is a `ROW` with at least two fields, and that the configured 
timestamp field
   exists — but it never checks that field's *type*. The merge path
   (`FieldMergeMapWithKeyTimeAgg`) reads the timestamp with 
`InternalRow#getString` and
   compares it lexicographically, so a non-string timestamp field — declared 
`BIGINT` /
   `TIMESTAMP` / `INT`, which is a natural choice for a "ts" field — is 
accepted at DDL and
   only fails at the first merge/compaction with a `ClassCastException` that 
names neither
   the field nor the function.
   
   The aggregation docs already mandate a string timestamp field. This 
validates it is
   `CHAR` / `VARCHAR` at factory creation, matching the type checks the other 
aggregate
   factories (sum, product, …) already perform, so the misconfiguration fails 
fast with a
   clear message.
   
   ### Tests
   
   
`FieldAggregatorTest#testFieldMergeMapWithKeyTimeAggFactoryRejectsNonStringTsField`
   asserts a `BIGINT` timestamp field is rejected; `…AcceptsStringTsField` 
asserts a string
   field still builds.
   
   ### API and Format
   
   No change.
   
   ### Documentation
   
   No change.
   


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