rdblue commented on a change in pull request #3545:
URL: https://github.com/apache/iceberg/pull/3545#discussion_r753859129



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java
##########
@@ -448,6 +451,19 @@ public static boolean extensionsEnabled(SparkSession 
spark) {
     return extensions.contains("IcebergSparkSessionExtensions");
   }
 
+  public static String toIcebergField(String name) {
+    Preconditions.checkArgument(!name.isEmpty(), "Invalid column name: 
(empty)");
+    if (!isCaseSensitiveEnabled()) {

Review comment:
       This isn't the right way to make sort order case insensitive. If the 
table was created with an upper case name, this would no longer work.
   
   I think the right way to fix this problem is to set the `caseSensitive` 
config property in the `SortOrderBuilder`. That is currently defaulted to 
`true`. I think you need to expose a way to set that and call it appropriately.




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



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

Reply via email to