[ https://issues.apache.org/jira/browse/CALCITE-6022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-6022: ------------------------------------ Labels: pull-request-available (was: ) > Support "CREATE TABLE ... LIKE" DDL > ----------------------------------- > > Key: CALCITE-6022 > URL: https://issues.apache.org/jira/browse/CALCITE-6022 > Project: Calcite > Issue Type: New Feature > Components: server > Affects Versions: 1.35.0 > Reporter: hongyu guo > Assignee: hongyu guo > Priority: Major > Labels: pull-request-available > Fix For: 1.36.0 > > > "CREATE TABLE ... LIKE" is SQL standard syntax, and some other dbms(mysql, > postgresql, sparksql) support it. So I think it is worth implementing. > Syntax: > {code:sql} > CREATE TABLE [IF NOT EXISTS] table_name > LIKE source_table [ like_option ... ]{code} > And for the `like_option`, I think the syntax of postgreSQL is more flexible > and powerful, and I believe it is reasonable to be similar to postgreSQL. But > there are not so many attributes in calcite, just keep GENERATED, DEFAULTS > and ALL. > {code:sql} > { INCLUDING | EXCLUDING } { GENERATED | DEFAULTS | ALL }{code} > Some related link: > [https://www.postgresql.org/docs/current/sql-createtable.html] > [https://ronsavage.github.io/SQL/sql-2003-2.bnf.html#table%20definition] > [https://dev.mysql.com/doc/refman/8.0/en/create-table-like.html] > -- This message was sent by Atlassian Jira (v8.20.10#820010)