junmuz commented on PR #9822:
URL: https://github.com/apache/paimon/pull/9822#issuecomment-6019029931
@JingsongLi Thanks for the detailed reproductions. All three are addressed
as of 36ba0fba5.
1. [P1] Drop aliasing: Metadata field IDs are now allocated above
TableSchema#highestFieldId(), so they never reuse a dropped field's ID.
ChangelogEventMetadataSchemaEvolutionTest reproduces your Parquet/Avro DROP
scenario on both the merged and raw read paths.
2. [P2] Historical type cast: Each file's metadata fields now use the
source column's type from that file's schema, so schema evolution casts them
like the source column. testSourceTypeChangeCastsHistoricalMetadata covers your
BIGINT → DECIMAL case on Parquet/Avro.
3. [P2] Sink materialization: The docs now explain why retractions with
metadata cannot be matched by full-row comparison, and require keeping sink and
source keys equal or using upsert-materialize=NONE, with TRY_RESOLVE as a
safeguard. The example shows the explicit source-to-sink mapping.
LookupChangelogEventMetadataITCase covers both the NONE and TRY_RESOLVE cases.
One behavior change: renaming or dropping a column listed in
changelog-producer.event-metadata-fields is now rejected, because it would
silently change metadata names that downstream jobs reference. Remove the
column from the option first.
On Spark scope: I'm happy to split the Spark changes into a follow-up PR if
you'd still prefer that.
--
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]