YannByron commented on code in PR #6377:
URL: https://github.com/apache/paimon/pull/6377#discussion_r2418994665


##########
paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkWriteITCase.java:
##########
@@ -339,15 +339,24 @@ public void testWriteWithNestedComplexDefaultValue() {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = {"order", "zorder", "hilbert"})
-    public void testWriteWithClustering(String clusterStrategy) {
+    @CsvSource({
+        "order, true",
+        "zorder, true",
+        "hilbert, true",
+        "order, false",
+        "zorder, false",
+        "hilbert, false"
+    })
+    public void testWriteWithClustering(String clusterStrategy, boolean 
useV2Write) {
+        spark.conf().set("spark.paimon.write.use-v2-write", 
String.valueOf(useV2Write));
         spark.sql(
                 "CREATE TABLE T (a INT, b INT) TBLPROPERTIES ("
                         + "'clustering.columns'='a,b',"
                         + String.format("'clustering.strategy'='%s')", 
clusterStrategy));
         spark.sql("INSERT INTO T VALUES (2, 2), (1, 1), (3, 
3)").collectAsList();
         List<Row> rows = spark.sql("SELECT * FROM T").collectAsList();
         assertThat(rows.toString()).isEqualTo("[[1,1], [2,2], [3,3]]");
+        spark.conf().unset("spark.paimon.write.use-v2-write");

Review Comment:
   Put this in `try-finally` block.



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

Reply via email to