abhishekagarwal87 commented on a change in pull request #12163: URL: https://github.com/apache/druid/pull/12163#discussion_r794262744
########## File path: sql/src/main/codegen/includes/insert.ftl ########## @@ -0,0 +1,65 @@ +/* + * 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. + */ + +SqlNode DruidSqlInsert() : +{ + SqlNode insertNode; + SqlNode partitionBy = null; + SqlNodeList clusterBy = null; +} +{ + insertNode = SqlInsert() + [ + <PARTITION> <BY> + partitionBy = StringLiteral() Review comment: I initially suggested (3) but then moved back to camp (1) / (2) because we can only partition on time. `PARTITIONED BY DAY/ALL` is a much easier syntax to write. It's also probably easy to give typeahead hints with (2) (console showing a list of all possible granularities as you type PARTITIONED BY). I, for one, don't have a strong opinion between (1) and (2). -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
