bowenliang123 commented on code in PR #5248:
URL: https://github.com/apache/kyuubi/pull/5248#discussion_r1320918717


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/IcebergCatalogRangerSparkExtensionSuite.scala:
##########
@@ -233,4 +234,69 @@ class IcebergCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite
     assert(e1.getMessage.contains(s"does not have [select] privilege" +
       s" on [$namespace1/$table1]"))
   }
+
+  test("CALL RewriteDataFilesProcedure") {
+    val tableName = "table_select_call_command_table"
+    val table = s"$catalogV2.$defaultBob.$tableName"
+    val rewriteDataFiles1 = s"CALL $catalogV2.system.rewrite_data_files " +
+      s"(table => '$table', options => map('min-input-files','2'))"
+    val rewriteDataFiles2 = s"CALL $catalogV2.system.rewrite_data_files " +
+      s"(table => '$table', options => map('min-input-files','3'))"
+    var snapshotId = 0L
+    var snapshotCommand = ""
+
+    withCleanTmpResources(Seq((table, "table"))) {
+      doAs(
+        admin, {
+          sql(s"CREATE TABLE IF NOT EXISTS $table  (id int, name string) USING 
iceberg")
+          sql(s"INSERT INTO $table VALUES (1, 'chenliang'), (2, 'tom')")
+          sql(s"INSERT INTO $table VALUES (3, 'julie'), (4, 'ross')")
+          snapshotId = sql(s"select * from $table.snapshots limit 1")
+            .collect().apply(0).getAs[Long]("snapshot_id")
+          snapshotCommand = s"CALL $catalogV2.system.set_current_snapshot 
('$table', $snapshotId)"

Review Comment:
   Let's skip testing on `CALL system.set_current_snapshot` procedure this 
time. Move to the follow-ups.



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