pvary commented on a change in pull request #2053:
URL: https://github.com/apache/iceberg/pull/2053#discussion_r553941632



##########
File path: 
mr/src/main/java/org/apache/iceberg/mr/hive/serde/objectinspector/IcebergRecordObjectInspector.java
##########
@@ -48,7 +49,15 @@ public IcebergRecordObjectInspector(Types.StructType 
structType, List<ObjectInsp
 
     for (Types.NestedField field : structType.fields()) {
       ObjectInspector oi = objectInspectors.get(position);
-      IcebergRecordStructField structField = new 
IcebergRecordStructField(field, oi, position);
+
+      IcebergRecordStructField structField;
+      if (caseSensitive) {
+        structField = new IcebergRecordStructField(field, oi, position);
+      } else {
+        Types.NestedField fieldInLowercase = 
Types.NestedField.of(field.fieldId(), field.isOptional(),
+                field.name().toLowerCase(), field.type(), field.doc());
+        structField = new IcebergRecordStructField(fieldInLowercase, oi, 
position);
+      }

Review comment:
       nit: After if blocks we tend to leave an extra line




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to