shivadarshan-devadiga commented on code in PR #13676:
URL: https://github.com/apache/gluten/pull/13676#discussion_r4681248517


##########
backends-clickhouse/src/test/scala/org/apache/gluten/execution/mergetree/GlutenClickHouseMergeTreeWriteOnS3Suite.scala:
##########
@@ -512,123 +503,116 @@ class GlutenClickHouseMergeTreeWriteOnS3Suite extends 
CreateMergeTreeSuite {
       RuntimeSettings.INSERT_WITHOUT_LOCAL_STORAGE.key -> "true",
       RuntimeSettings.MERGE_AFTER_INSERT.key -> "true"
     ) {
-      spark.sql(s"""
-                   |DROP TABLE IF EXISTS $tableName;
-                   |""".stripMargin)
-
-      spark.sql(s"""
-                   |CREATE TABLE IF NOT EXISTS $tableName
-                   |USING clickhouse
-                   |LOCATION '$dataPath'
-                   | as select * from lineitem
-                   |""".stripMargin)
-
-      val ret = spark.sql(s"select count(*) from $tableName").collect()
-      assertResult(600572)(ret.apply(0).get(0))
-      assert(
-        !new 
File(s"$CH_DEFAULT_STORAGE_DIR/lineitem_mergetree_insert_optimize_basic").exists())
+      withTable(tableName) {
+        spark.sql(s"""
+                     |CREATE TABLE $tableName
+                     |USING clickhouse
+                     |LOCATION '$dataPath'
+                     | as select * from lineitem
+                     |""".stripMargin)
+
+        val ret = spark.sql(s"select count(*) from $tableName").collect()
+        assertResult(600572)(ret.apply(0).get(0))
+        assert(
+          !new 
File(s"$CH_DEFAULT_STORAGE_DIR/lineitem_mergetree_insert_optimize_basic").exists())

Review Comment:
   Thanks, you're right on both counts. Without storage_policy='__s3_main' the 
table uses the default policy, so SparkMergeTreeSink never stages locally and 
INSERT_WITHOUT_LOCAL_STORAGE has no effect. The assertion also checks a path 
without the _s3 suffix, so it can't fail. Since it predates this PR, I'll fix 
it in a follow-up: add storage_policy='__s3_main' as the HDFS case does with 
__hdfs_main and drop the local-directory assertion, as you suggested. I'll link 
it here once it's up. Thanks for the approval! Can this be checked in if 
nothing else remains?



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