yihua commented on code in PR #12586:
URL: https://github.com/apache/hudi/pull/12586#discussion_r1926397912


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/ddl/TestSpark3DDL.scala:
##########
@@ -289,8 +298,18 @@ class TestSpark3DDL extends HoodieSparkSqlTestBase {
              |""".stripMargin)
 
         spark.sql(s"select id, col1_new, col2 from $tableName where id = 1 or 
id = 6 or id = 2 order by id").show(false)
-        // try schedule compact
-        if (tableType == "mor") spark.sql(s"schedule compaction  on 
$tableName")
+        if (runCompaction) {
+          // try schedule compact
+          if (tableType == "mor") spark.sql(s"schedule compaction on 
$tableName")
+        } else if (runClustering) {
+          assertEquals(0, spark.sql(s"CALL 
show_clustering('$tableName')").count)
+          spark.sql(s"CALL run_clustering(table => '$tableName', op => 
'schedule')")
+          spark.sql(s"CALL run_clustering(table => '$tableName', op => 
'execute')")
+          val clusteringRows = spark.sql(s"CALL 
show_clustering('$tableName')").collect()
+          assertResult(1)(clusteringRows.length)

Review Comment:
   Added.



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