You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/02 19:07:00 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #5409: [ICEBERG-5408] Honor spark.sql.caseSensitive when merging schema

kbendick commented on code in PR #5409:
URL: https://github.com/apache/iceberg/pull/5409#discussion_r935936613


##########
api/src/main/java/org/apache/iceberg/types/ReassignIds.java:
##########
@@ -45,7 +51,9 @@ public Type schema(Schema schema, Supplier<Type> future) {
   }
 
   private int id(Types.StructType sourceStruct, String name) {
-    Types.NestedField sourceField = sourceStruct.field(name);
+    Types.NestedField sourceField =
+        caseSensitive ? sourceStruct.field(name) : sourceStruct.caseInsensitiveField(name);

Review Comment:
   I think the line on 97 is slightly longer because it uses `field.name()` instead of `name` when passing argument to the `sourceStruct` functions.
   
   So it's the formatter due to line lengths if I'm not mistaken. Sometimes I find you can refactor in a different way (like matching the style from line 97) and the formatter will accept it.



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

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


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