JingsongLi commented on code in PR #10673:
URL: https://github.com/apache/paimon/pull/10673#discussion_r4492088639
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/clone/schema/CloneHiveSchemaFunction.java:
##########
@@ -147,6 +164,12 @@ public void processElement(
"existed paimon table '%s' is not a
FileStoreTable, but a %s",
tuple.f1, existedTable.getClass().getName()));
checkCompatible(schema, (FileStoreTable) existedTable);
+ if (copyFiles) {
+ checkReadableFields(
+ schema.fields(),
+ ((FileStoreTable) existedTable).schema().fields(),
+ existedTable.fullName());
Review Comment:
[P2] Check positional ORC reader compatibility before accepting a copied
layout
This new validation assumes target readers match fields by name, but an
existing ORC target can legitimately enable
`orc.force.positional.evolution=true`. The check accepts a Hive source `(id
INT)` and target `(extra INT, id INT)`. Copying a real source row `id=7` then
succeeds, but `SELECT extra,id` returns `(7,NULL)` instead of `(NULL,7)`: the
source field is assigned to the new leading column.
The actual Hive/Flink reproduction has three controls: the same target
configuration writes/reads a normal INSERT correctly; a name-based target
clones correctly; and switching only the positional-reader option off after
copying reads `(NULL,7)` from the same copied bytes. Please reject layouts
incompatible with the target’s positional reader mode before copying, or
preserve an appropriate physical-schema mapping. Name/type/nullability checks
alone do not establish readability for this supported reader configuration.
--
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]