raminqaf commented on code in PR #28277:
URL: https://github.com/apache/flink/pull/28277#discussion_r3360837980
##########
flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl:
##########
@@ -1923,6 +1923,7 @@ SqlCreate SqlCreateOrAlterMaterializedTable(Span s,
boolean replace, boolean isT
SqlNode freshness = null;
SqlRefreshMode refreshMode = null;
SqlNode asQuery = null;
+ SqlParserPos asKeywordPos = null;
Review Comment:
As far as I understood and debuged the `asQuery` SqlNode` does not contain
the `AS` keyword. In other words, it starts from the `S` of the `SELECT...`.
For instance the debugger shows on this query
```sql
CREATE MATERIALIZED TABLE base_mtbl (
CONSTRAINT ct1 PRIMARY KEY(a) NOT ENFORCED)
COMMENT 'materialized table comment'
PARTITIONED BY (a, d)
WITH (
'connector' = 'filesystem',
'format' = 'json'
)
FRESHNESS = INTERVAL '30' SECOND
REFRESH_MODE = FULL
AS SELECT * FROM t1
```
<img width="451" height="339" alt="image"
src="https://github.com/user-attachments/assets/fc97fd40-8aab-4c7f-bc67-3d1dc701b065"
/>
##########
flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl:
##########
@@ -1923,6 +1923,7 @@ SqlCreate SqlCreateOrAlterMaterializedTable(Span s,
boolean replace, boolean isT
SqlNode freshness = null;
SqlRefreshMode refreshMode = null;
SqlNode asQuery = null;
+ SqlParserPos asKeywordPos = null;
Review Comment:
As far as I understood and debugged the `asQuery` SqlNode` does not contain
the `AS` keyword. In other words, it starts from the `S` of the `SELECT...`.
For instance the debugger shows on this query
```sql
CREATE MATERIALIZED TABLE base_mtbl (
CONSTRAINT ct1 PRIMARY KEY(a) NOT ENFORCED)
COMMENT 'materialized table comment'
PARTITIONED BY (a, d)
WITH (
'connector' = 'filesystem',
'format' = 'json'
)
FRESHNESS = INTERVAL '30' SECOND
REFRESH_MODE = FULL
AS SELECT * FROM t1
```
<img width="451" height="339" alt="image"
src="https://github.com/user-attachments/assets/fc97fd40-8aab-4c7f-bc67-3d1dc701b065"
/>
--
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]