sankalpsthakur commented on code in PR #20398:
URL: https://github.com/apache/hudi/pull/20398#discussion_r4349732984


##########
hudi-common/src/main/java/org/apache/hudi/common/schema/internal/convert/InternalSchemaConverter.java:
##########
@@ -63,19 +63,27 @@ public class InternalSchemaConverter {
   static final int BLOB_DATA_FIELD_ID = -11;
   static final int BLOB_REFERENCE_FIELD_ID = -12;
 
+  // The four fields of the out-of-line reference record nested in a Blob are 
tagged with sentinel ids as
+  // well. Ids of table columns are allocated from 0 upwards, so a 
non-negative id here would shadow a table

Review Comment:
   added `testNonNegativeFieldIdsAreUniqueWithSeveralBlobAndVariantColumns` for 
it: several blob and variant columns plus blobs in a struct, an array and a 
map, asserting every id >= 0 belongs to exactly one field and negative ids only 
occur below blob/variant columns (fails on master, passes here). i left the 
throw out of `buildIdToField` because it runs under every 
`findField`/`findType` on every internal schema, so a duplicate we haven't 
found would become a hard failure on someone's table rather than a test failure 
here. happy to open a follow-up issue for the guard if you want it tracked.
   



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