You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "jackylee-ch (via GitHub)" <gi...@apache.org> on 2026/10/04 01:01:06 UTC
[PR] [core] Validate the timestamp field type for merge_map_with_keytime [paimon]
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Validate the timestamp field type for merge_map_with_keytime [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #10367:
URL: https://github.com/apache/paimon/pull/10367
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org