-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance parsing the Doris create materialized view #34943
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enhances Doris SQL parsing by adding support for materialized view creation statements. Key changes include adding a new statement class for materialized views and extending the Doris DDL visitor to handle the new CREATE MATERIALIZED VIEW syntax.
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
parser/sql/statement/type/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/ddl/DorisCreateMaterializedViewStatement.java | Introduces the new statement class for materialized views |
parser/sql/dialect/doris/src/main/java/org/apache/shardingsphere/sql/parser/doris/visitor/statement/type/DorisDDLStatementVisitor.java | Adds the visitor method for parsing materialized view creation contexts |
Files not reviewed (5)
- parser/sql/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4: Language not supported
- parser/sql/dialect/doris/src/main/antlr4/imports/doris/DorisKeyword.g4: Language not supported
- parser/sql/dialect/doris/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/DorisStatement.g4: Language not supported
- test/it/parser/src/main/resources/case/ddl/create-materialized-view.xml: Language not supported
- test/it/parser/src/main/resources/sql/supported/ddl/create-materialized-view.xml: Language not supported
.../apache/shardingsphere/sql/parser/doris/visitor/statement/type/DorisDDLStatementVisitor.java
Show resolved
Hide resolved
https://shardingsphere.apache.org/community/en/involved/conduct/code/#maintenance-conduct Additionally, please update the release notes for 5.5.3-SNAPSHOT. |
Hi @iamhucong I have mark the syntax differences from MySQL and update release notes for 5.5.3-SNAPSHOT. |
Fixes #31499
Changes proposed in this pull request:
This pull request modify the parsing of the following sql:
For the completeness of SQL syntax, I added a simple SELECT at the end to ensure they work properly.
Since the original Doris DDL did not have Materialized Views, I referred to Materialized Views and added parsing syntax in DDLStatement.g4.
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.