raminqaf commented on code in PR #28165:
URL: https://github.com/apache/flink/pull/28165#discussion_r3247009505
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlMaterializedTableNodeToOperationConverterTest.java:
##########
@@ -523,6 +523,63 @@ void testAlterMaterializedTableResume() {
.isEqualTo("ALTER MATERIALIZED TABLE builtin.default.mtbl1
RESUME WITH (k1: [v1])");
}
+ @Test
+ void testAlterMaterializedTableReset() {
+ final String sql = "ALTER MATERIALIZED TABLE base_mtbl RESET
('format', 'unknown_key')";
+ Operation operation = parse(sql);
+
assertThat(operation).isInstanceOf(AlterMaterializedTableChangeOperation.class);
+
+ AlterMaterializedTableChangeOperation op =
+ (AlterMaterializedTableChangeOperation) operation;
+
assertThat(op.getTableIdentifier().toString()).isEqualTo("`builtin`.`default`.`base_mtbl`");
+ assertThat(op.getTableChanges())
+ .containsExactly(TableChange.reset("format"),
TableChange.reset("unknown_key"));
+ // resetting an unknown key is a no-op for the catalog state
+ assertThat(op.getNewTable().getOptions())
+ .containsOnly(Map.entry("connector", "filesystem"));
+ assertThat(op.asSummaryString())
+ .isEqualTo(
+ "ALTER MATERIALIZED TABLE builtin.default.base_mtbl\n"
+ + " RESET 'format',\n"
+ + " RESET 'unknown_key'");
+ }
+
+ @Test
+ void testAlterMaterializedTableResetWithEmptyKey() {
Review Comment:
Thanks! Addressed!
--
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]