jay841224 opened a new pull request, #34943: URL: https://github.com/apache/shardingsphere/pull/34943
Fixes #31499 Changes proposed in this pull request: This pull request modify the parsing of the following sql: ```sql CREATE MATERIALIZED VIEW mv1 BUILD IMMEDIATE CREATE MATERIALIZED VIEW mv1 REFRESH COMPLETE CREATE MATERIALIZED VIEW mv1 REFRESH ON SCHEDULE EVERY 2 HOUR STARTS "2023-12-13 21:07:09" CREATE MATERIALIZED VIEW mv1 KEY(k1,k2) ``` For the completeness of SQL syntax, I added a simple SELECT at the end to ensure they work properly. ```sql CREATE MATERIALIZED VIEW mv1 BUILD IMMEDIATE AS SELECT k1, k2 FROM test_table; CREATE MATERIALIZED VIEW mv1 REFRESH COMPLETE AS SELECT k1, k2 FROM test_table; CREATE MATERIALIZED VIEW mv1 REFRESH ON SCHEDULE EVERY 2 HOUR STARTS "2023-12-13 21:07:09" AS SELECT k1, k2 FROM test_table; CREATE MATERIALIZED VIEW mv1 KEY(k1,k2) AS SELECT k1, k2 FROM test_table; ``` Since the original Doris DDL did not have Materialized Views, I referred to [Materialized Views](https://doris.apache.org/docs/query-acceleration/materialized-view/async-materialized-view/functions-and-demands) and added parsing syntax in DDLStatement.g4. --- Before committing this PR, I'm sure that I have checked the following options: - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project. - [x] I have self-reviewed the commit code. - [x] I have (or in comment I request) added corresponding labels for the pull request. - [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`. - [] I have made corresponding changes to the documentation. - [x] I have added corresponding unit tests for my changes. - [ ] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/) -- 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: notifications-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org