LadyForest commented on a change in pull request #15949:
URL: https://github.com/apache/flink/pull/15949#discussion_r636599668



##########
File path: 
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/operations/SqlToOperationConverterTest.java
##########
@@ -1161,35 +1150,24 @@ public void testAlterTable() throws Exception {
                 parse(
                         "alter table cat1.db1.tb1 set ('k1' = 'v1', 'K2' = 
'V2')",
                         SqlDialect.DEFAULT);
-        assert operation instanceof AlterTableOptionsOperation;
-        final AlterTableOptionsOperation alterTableOptionsOperation =
-                (AlterTableOptionsOperation) operation;
-        assertEquals(expectedIdentifier, 
alterTableOptionsOperation.getTableIdentifier());
-        assertEquals(2, 
alterTableOptionsOperation.getCatalogTable().getOptions().size());
-        Map<String, String> options = new HashMap<>();
-        options.put("k1", "v1");
-        options.put("K2", "V2");
-        assertEquals(options, 
alterTableOptionsOperation.getCatalogTable().getOptions());
+        Map<String, String> expectedOptions = new HashMap<>();
+        expectedOptions.put("k", "v");
+        expectedOptions.put("k1", "v1");
+        expectedOptions.put("K2", "V2");
+
+        assertAlterTableOptions(operation, expectedIdentifier, 
expectedOptions);
+
+        // test alter table reset
+        operation = parse("alter table cat1.db1.tb1 reset ()", 
SqlDialect.DEFAULT);

Review comment:
       > We can throw a useful exception to tell users reset keys shouldn't be 
empty, instead of executing it silently.
   
   +1 to throw an exception. To align the behavior for `ALTER TABLE ... SET`, I 
created FLINK-22732 to track the issue.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to