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


##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWriterV2.java:
##########
@@ -184,4 +190,27 @@ public void testMergeSchemaIcebergProperty() throws 
Exception {
             row(1L, "a", null), row(2L, "b", null), row(3L, "c", 12.06F), 
row(4L, "d", 14.41F)),
         sql("select * from %s order by id", tableName));
   }
+
+  @Test
+  public void testWriteWithCaseSensitiveOption() throws NoSuchTableException, 
ParseException {
+    sql(
+        "ALTER TABLE %s SET TBLPROPERTIES ('%s'='true')",
+        tableName, TableProperties.SPARK_WRITE_ACCEPT_ANY_SCHEMA);
+
+    Dataset<Row> ds =
+        jsonToDF(
+            "ID bigint, DaTa string",
+            "{ \"id\": 1, \"data\": \"a\" }",
+            "{ \"id\": 2, \"data\": \"b\" }");
+    // disable spark.sql.caseSensitive
+    sql("SET %s=false", SQLConf.CASE_SENSITIVE().key());

Review Comment:
   since this is the default we probably need a "true" case sensitive test. 
Last thing I promise :)



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