You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jiajun Xie (Jira)" <ji...@apache.org> on 2023/10/19 01:58:00 UTC
[jira] [Resolved] (CALCITE-6022) Support "CREATE TABLE ... LIKE" DDL in server module
[ https://issues.apache.org/jira/browse/CALCITE-6022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jiajun Xie resolved CALCITE-6022.
---------------------------------
Resolution: Fixed
> Support "CREATE TABLE ... LIKE" DDL in server module
> ----------------------------------------------------
>
> 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)