strongduanmu commented on code in PR #34943: URL: https://github.com/apache/shardingsphere/pull/34943#discussion_r2050436337
########## parser/sql/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4: ########## @@ -359,6 +359,43 @@ createView (WITH (CASCADED | LOCAL)? CHECK OPTION)? ; +// DORIS ADDED BEGIN +createMaterializedView + : CREATE MATERIALIZED VIEW ifNotExists? name Review Comment: Please keep the systax in one line unless it contains more than 5 branches. You can read SQL Parser of Conduct - https://shardingsphere.apache.org/community/en/involved/conduct/code/#sql-parser-of-conduct ########## parser/sql/statement/type/doris/src/main/java/org/apache/shardingsphere/sql/parser/statement/doris/ddl/DorisCreateMaterializedViewStatement.java: ########## @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.sql.parser.statement.doris.ddl; + +import org.apache.shardingsphere.sql.parser.statement.core.statement.ddl.CreateMaterializedViewStatement; +import org.apache.shardingsphere.sql.parser.statement.doris.DorisStatement; + +/** + * DorisSQL create materialized view statement. + */ +public class DorisCreateMaterializedViewStatement extends CreateMaterializedViewStatement implements DorisStatement { Review Comment: Please add final for DorisCreateMaterializedViewStatement. ########## parser/sql/dialect/doris/src/main/antlr4/imports/doris/DDLStatement.g4: ########## @@ -359,6 +359,43 @@ createView (WITH (CASCADED | LOCAL)? CHECK OPTION)? ; +// DORIS ADDED BEGIN +createMaterializedView + : CREATE MATERIALIZED VIEW ifNotExists? name + (LP_ columnDefinition RP_)? buildMode? + (REFRESH refreshMethod? refreshTrigger?)? + ((DUPLICATE)? KEY keys= LP_ identifierList RP_)? + commentClause? partitionClause? distributedbyClause? propertiesClause? + AS select + ; +// DORIS ADDED END + +// DORIS ADDED BEGIN +buildMode + : BUILD (IMMEDIATE | DEFERRED) + ; +// DORIS ADDED END + +// DORIS ADDED BEGIN +refreshMethod + : COMPLETE | AUTO + ; +// DORIS ADDED END + +// DORIS ADDED BEGIN +refreshTrigger + : ON MANUAL Review Comment: Please keep the systax in one line unless it contains more than 5 branches. You can read SQL Parser of Conduct - https://shardingsphere.apache.org/community/en/involved/conduct/code/#sql-parser-of-conduct -- 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