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

   ### Purpose
   
   The `merge_map_with_keytime` aggregator reads the per-key timestamp field 
with `getString` and compares values lexicographically, but the factory never 
checked that field's type. A ROW whose ts field is TIMESTAMP, INT, or any 
non-string type was accepted, and at merge time `getString` reinterprets the 
raw `BinaryRow` bits as the string value, so the wrong map entry is retained 
with no error.
   
   This validates that the resolved ts field (the explicitly configured 
`fields.<f>.ts-field`, or the default last field) is STRING (VARCHAR or CHAR) 
in the factory. The factory runs both at schema validation and at table open, 
so a new table with a bad schema is rejected up front and a pre-existing 
misconfigured table fails loudly instead of silently corrupting merges.
   
   ### Tests
   
   Added 
`FieldAggregatorTest.testFieldMergeMapWithKeyTimeAggRejectsNonStringTsField`, 
which pins that the factory throws `IllegalArgumentException` naming the 
offending field for a TIMESTAMP default ts field and for an explicitly named 
INT ts field.
   
   ### API and Format
   
   No.
   
   ### Documentation
   
   No.
   


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