gustavodemorais commented on code in PR #27794:
URL: https://github.com/apache/flink/pull/27794#discussion_r2965109416
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlMaterializedTableNodeToOperationConverterTest.java:
##########
@@ -596,6 +596,48 @@ void
testAlterMaterializedTableAsQueryWithConflictColumnName() {
+ "FROM `builtin`.`default`.`t3` AS
`t3`"));
}
+ @Test
+ void testAlterMaterializedTableAsQueryWithDefinedSchema() {
+ String sql =
+ "CREATE OR ALTER MATERIALIZED TABLE base_mtbl ("
+ + "`a` BIGINT NOT NULL, `b` STRING, `c` INT, `d`
STRING, `a1` BIGINT NOT NULL, `f` INT) "
+ + "AS SELECT a, b, c, d, a as `a1`, 3 as f FROM t3";
+ FullAlterMaterializedTableOperation sqlAlterMaterializedTableAsQuery =
+ (FullAlterMaterializedTableOperation) parse(sql);
+
+ assertThat(sqlAlterMaterializedTableAsQuery.getTableChanges())
+ .containsExactly(
+ // If NOT NULL defined in schema it should stay
Review Comment:
nit
```suggestion
// If NOT NULL is defined in schema, it should stay
```
--
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]