[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120654#comment-17120654 ] Julian Hyde commented on CALCITE-3946: -- Moving DDL classes from server to core was more work than I expected. We want to move the AST parts (i.e. the SqlNode sub-classes) into core but we do not want to move the logic that executes the DDL. So I have created a DdlExecutor interface and moved the execution code into ServerDdlExecutor, an implementation of DdlExecutor that lives in server. Should merge shortly. > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: Drew Schmitt >Assignee: Julian Hyde >Priority: Major > Fix For: 1.24.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Add support to Calcite's Babel parser for {{MULTISET}}/{{SET}} and > {{VOLATILE}} modifiers in {{CREATE TABLE}} statements. > The syntax for these statements is: > {code:sql} > CREATE TABLE [SET|MULTISET] [VOLATILE] >[IF NOT EXISTS] ( , ...); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17119885#comment-17119885 ] Drew Schmitt commented on CALCITE-3946: --- [~julianhyde], that sounds good to me - thanks! > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: Drew Schmitt >Assignee: Julian Hyde >Priority: Major > Fix For: 1.24.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Add support to Calcite's Babel parser for {{MULTISET}}/{{SET}} and > {{VOLATILE}} modifiers in {{CREATE TABLE}} statements. > The syntax for these statements is: > {code:sql} > CREATE TABLE [SET|MULTISET] [VOLATILE] >[IF NOT EXISTS] ( , ...); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17119882#comment-17119882 ] Julian Hyde commented on CALCITE-3946: -- Based on the feedback from the dev@ thread, I think that moving DDL classes to core is better than copy-pasting them from server into babel. So I'll do that. (If we start to see weird things added to core because of dialect differences in babel, I may backtrack on this decision.) I think I can push this over the finish line in the next day or two. [~dschmitt], Github says that you deleted the branch that was the source of the PR, and closed the PR. However I am still able to pull from the PR. I tend to pull from the PR, add some extra refactoring, and merge to master. Let me know if you have a problem with that. > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: Drew Schmitt >Assignee: Julian Hyde >Priority: Major > Fix For: 1.24.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Add support to Calcite's Babel parser for {{MULTISET}}/{{SET}} and > {{VOLATILE}} modifiers in {{CREATE TABLE}} statements. > The syntax for these statements is: > {code:sql} > CREATE TABLE [SET|MULTISET] [VOLATILE] >[IF NOT EXISTS] ( , ...); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108675#comment-17108675 ] Drew Schmitt commented on CALCITE-3946: --- Thanks for the feedback! - I'm interested to see what the community decides on regarding babel vs. server dependency. I agree that intuitively babel should take a dependency on server. I've preemptively updated my PR to incorporate your changes in 3946-create-table. I can change to some other model if that's the consensus. - Teradata vs. ANSI mode is controlled by the client. The mode changes the behavior of a given query (e.g. defaulting to using MULTISET vs. SET when unspecified). However, AFAIK it shouldn't impact the parsing or validation. As such, we shouldn't need to provide a way to switch between modes in Calcite. I can remove the comment altogether if it makes things more confusing. - I've line-wrapped the long lines. > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: Drew Schmitt >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > Add support to Calcite's Babel parser for {{MULTISET}}/{{SET}} and > {{VOLATILE}} modifiers in {{CREATE TABLE}} statements. > The syntax for these statements is: > {code:sql} > CREATE TABLE [SET|MULTISET] [VOLATILE] >[IF NOT EXISTS] ( , ...); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108641#comment-17108641 ] Julian Hyde commented on CALCITE-3946: -- Reviewing the PR: * I see you made "babel" depend on "server". I'm not sure we want that coupling (bringing in server's RPC capability, or over-coupling third-party DDL syntax to Calcite's DDL syntax). I sent an email to dev@ to discuss. I have also pushed a branch with a commit that solves the problem in another way - by copy-pasting some classes. See https://github.com/julianhyde/calcite/tree/3946-create-table. Let's see what consensus emerges on dev@ before moving forward. * "In teradata mode" - it would be good to be more specific how to set that mode. Reference conformance or dialect or whatever is the appropriate switch. * A couple of lines in .ftl are over long. Chop them down to 80 to 100 chars. Overall, looks good, nice work. With these fixes, when commits re-open after 1.23 we should be able to merge soon after. > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: Drew Schmitt >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > Add support to Calcite's Babel parser for {{MULTISET}}/{{SET}} and > {{VOLATILE}} modifiers in {{CREATE TABLE}} statements. > The syntax for these statements is: > {code:sql} > CREATE TABLE [SET|MULTISET] [VOLATILE] >[IF NOT EXISTS] ( , ...); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089955#comment-17089955 ] Julian Hyde commented on CALCITE-3946: -- bq. Just to clarify, is the recommendation to add parser support for the TEMPORARY keyword too as part of this change? Adding support for TEMPORARY would be a separate change, if anyone wanted to contribute it. I think this change is fine as it stands. > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: Drew Schmitt >Priority: Major > > Add support to Calcite's Babel parser for MULTISET/SET and VOLATILE modifiers > in CREATE TABLE statements. > The syntax for these statements is: > CREATE TABLE [SET|MULTISET] [VOLATILE] [IF NOT EXISTS] > ( , ...); -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089849#comment-17089849 ] dasch commented on CALCITE-3946: Based on the Snowflake doc linked above, it looks like TEMPORARY is the equivalent to VOLATILE. Just to clarify, is the recommendation to add parser support for the TEMPORARY keyword too as part of this change? > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: dasch >Priority: Major > > Add support to Calcite's Babel parser for MULTISET/SET and VOLATILE modifiers > in CREATE TABLE statements. > The syntax for these statements is: > CREATE TABLE [SET|MULTISET] [VOLATILE] [IF NOT EXISTS] > ( , ...); -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089333#comment-17089333 ] Julian Hyde commented on CALCITE-3946: -- This is Babel, where the goal is to parse other peoples SQL dialects, not design our own. Of course, we could add the PostgreSQL syntax as well. > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: dasch >Priority: Major > > Add support to Calcite's Babel parser for MULTISET/SET and VOLATILE modifiers > in CREATE TABLE statements. > The syntax for these statements is: > CREATE TABLE [SET|MULTISET] [VOLATILE] [IF NOT EXISTS] > ( , ...); -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089321#comment-17089321 ] Jin Xing commented on CALCITE-3946: --- Shall we go by PostgreSQL grammar [1] ? For MULTISET/SET, we can use "table constraint"; For VOLATILE, we can use "temporary"; If we bring these modifiers in, besides the change in parser layer, we should also add additional functionalities. (e.g. drop the temporary table when end of user session and check duplication when insert values into a table marked as UNIQUE) . [1] [https://www.postgresql.org/docs/current/sql-createtable.html] > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: dasch >Priority: Major > > Add support to Calcite's Babel parser for MULTISET/SET and VOLATILE modifiers > in CREATE TABLE statements. > The syntax for these statements is: > CREATE TABLE [SET|MULTISET] [VOLATILE] [IF NOT EXISTS] > ( , ...); -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CALCITE-3946) Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE statements
[ https://issues.apache.org/jira/browse/CALCITE-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089027#comment-17089027 ] Julian Hyde commented on CALCITE-3946: -- Currently Babel does not support {{CREATE TABLE}} (or indeed any DDL). I have no objection to it moving in that direction. There is a more divergence between databases in DDL syntax than DML and query syntax, so we'll have to be, well, careful if DDL statements turn out to be ambiguous. I notice that the {{SET}}, {{MULTISET}}, {{VOLATILE}} keywords seem to be Teradata-specific. I have no problem with that. The equivalent to VOLATILE in other DBs might be TEMPORARY or TRANSIENT (see e.g. [Snowflake|https://docs.snowflake.com/en/user-guide/tables-temp-transient.html]). > Add parser support for MULTISET/SET and VOLATILE modifiers in CREATE TABLE > statements > - > > Key: CALCITE-3946 > URL: https://issues.apache.org/jira/browse/CALCITE-3946 > Project: Calcite > Issue Type: Improvement > Components: babel >Affects Versions: 1.22.0 >Reporter: dasch >Priority: Major > > Add support to Calcite's Babel parser for MULTISET/SET and VOLATILE modifiers > in CREATE TABLE statements. > The syntax for these statements is: > CREATE TABLE [SET|MULTISET] [VOLATILE] [IF NOT EXISTS] > ( , ...); -- This message was sent by Atlassian Jira (v8.3.4#803005)