liyubin117 commented on code in PR #24735:
URL: https://github.com/apache/flink/pull/24735#discussion_r1592242102
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlDdlToOperationConverterTest.java:
##########
@@ -102,6 +103,23 @@
/** Test cases for the DDL statements for {@link
SqlNodeToOperationConversion}. */
public class SqlDdlToOperationConverterTest extends
SqlNodeToOperationConversionTestBase {
+ @Test
+ public void testAlterCatalog() {
+ // test alter catalog options
+ final String sql1 = "ALTER CATALOG cat2 SET ('K1' = 'V1', 'k2' = 'v2',
'k2' = 'v2_new')";
+ Operation operation = parse(sql1);
+ assertThat(operation).isInstanceOf(AlterCatalogOptionsOperation.class);
+ assertThat(((AlterCatalogOptionsOperation)
operation).getCatalogName()).isEqualTo("cat2");
+ assertThat(operation.asSummaryString())
+ .isEqualTo("ALTER CATALOG cat2\n SET 'K1' = 'V1',\n SET 'k2'
= 'v2_new'");
+
+ final Map<String, String> expectedOptions = new HashMap<>();
+ expectedOptions.put("K1", "V1");
+ expectedOptions.put("k2", "v2_new");
+ assertThat(((AlterCatalogOptionsOperation) operation).getProperties())
+ .isEqualTo(expectedOptions);
Review Comment:
Got it ! it is more concise now :)
--
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]