felixYyu commented on a change in pull request #3862:
URL: https://github.com/apache/iceberg/pull/3862#discussion_r805632664
##########
File path:
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/sql/TestPartitionedWrites.java
##########
@@ -176,4 +177,27 @@ public void testViewsReturnRecentResults() {
ImmutableList.of(row(1L, "a"), row(1L, "a")),
sql("SELECT * FROM tmp"));
}
+
+ @Test
+ public void testAddPartition() {
+ // only check V2 command [IF NOT EXISTS] syntax
+ AssertHelpers.assertThrows("Cannot explicitly create partitions in Iceberg
tables",
+ UnsupportedOperationException.class,
+ () -> sql("ALTER TABLE %s ADD IF NOT EXISTS PARTITION
(id_trunc=2)", tableName));
+ }
+
+ @Test
+ public void testDropPartition() {
+ // only check V2 command [IF EXISTS] syntax
+ AssertHelpers.assertThrows("Cannot explicitly drop partitions in Iceberg
tables",
+ UnsupportedOperationException.class,
+ () -> sql("ALTER TABLE %s DROP IF EXISTS PARTITION (id_trunc=0)",
tableName));
+ }
+
+ @Test
+ public void testShowPartitions() {
Review comment:
added check the return values.
--
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]