huaxingao commented on code in PR #14072:
URL: https://github.com/apache/iceberg/pull/14072#discussion_r2347699604


##########
api/src/main/java/org/apache/iceberg/PartitionSpec.java:
##########
@@ -400,6 +400,12 @@ Builder checkConflicts(boolean check) {
     private void checkAndAddPartitionName(String name, Integer sourceColumnId) 
{
       Types.NestedField schemaField =
           this.caseSensitive ? schema.findField(name) : 
schema.caseInsensitiveFindField(name);
+      // corner case: extra partition column in metadata table and whose field 
id is extremely large
+      if (null != schemaField
+          && schemaField.name().equals("partition")
+          && schemaField.fieldId() > 2000) {

Review Comment:
   This change feels brittle: it hard-codes a special case for a field named 
`partition` and uses a heuristic (>2000) to infer metadata field ids.



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to