yabola commented on code in PR #5394:
URL: https://github.com/apache/kyuubi/pull/5394#discussion_r1354146292


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/IcebergCatalogRangerSparkExtensionSuite.scala:
##########
@@ -286,4 +289,48 @@ class IcebergCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite
         })
     }
   }
+
+  test("CALL snapshot management") {
+    val tableName = "table_select_call_command_table"
+    val table = s"$catalogV2.$namespace1.$tableName"
+    val initDataFilesCount = 2
+
+    withCleanTmpResources(Seq((table, "table"))) {
+      doAs(
+        admin, {
+          sql(s"CREATE TABLE IF NOT EXISTS $table  (id int, name string) USING 
iceberg")
+          // insert 2 data files
+          (0 until initDataFilesCount)
+            .foreach(i => sql(s"INSERT INTO $table VALUES ($i, 'user_$i')"))
+        })
+
+      val calendar = Calendar.getInstance()
+      calendar.add(Calendar.DAY_OF_MONTH, 1)

Review Comment:
   The meaning of Iceberg's rollbackToTimestamp command is to roll back the 
snapshot to the latest snapshot less than `calendar` time. In order to ensure 
that this snapshot must exist, I added for one day.



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