You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Maxwell Guo (Jira)" <ji...@apache.org> on 2024/01/09 06:07:00 UTC
[jira] [Comment Edited] (CASSANDRA-7662) Implement templated CREATE TABLE functionality (CREATE TABLE LIKE)
[ https://issues.apache.org/jira/browse/CASSANDRA-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17804584#comment-17804584 ]
Maxwell Guo edited comment on CASSANDRA-7662 at 1/9/24 6:06 AM:
----------------------------------------------------------------
Any update on this ? [~epsi.rex] , I think I can take over this if you do not have time working on this ticket.
And [~aleksey] , do you think we should make a DISCUSS in the mailing list as we are going to introduce a new grammar.
was (Author: maxwellguo):
Any update on this ? [~epsi.rex] , I think I can take over this if you do not have some time .
And [~aleksey] , do you think we should make a DISCUSS in the mailing list as we are going to introduce a new grammar.
> Implement templated CREATE TABLE functionality (CREATE TABLE LIKE)
> ------------------------------------------------------------------
>
> Key: CASSANDRA-7662
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7662
> Project: Cassandra
> Issue Type: New Feature
> Components: Legacy/CQL
> Reporter: Aleksey Yeschenko
> Priority: Low
> Labels: AdventCalendar2021, lhf
> Fix For: 5.x
>
> Attachments: 7662.patch, CASSANDRA-7662.patch
>
>
> Implement templated CREATE TABLE functionality (CREATE TABLE LIKE) to simplify creating new tables duplicating existing ones (see parent_table part of http://www.postgresql.org/docs/9.1/static/sql-createtable.html).
> CREATE TABLE <new_table> LIKE <old_table>; - would create a new table with the same columns and options as <old_table>
> +Additional info for newcomers:+
> In order to implement this change you will need to change the Parser.g ANTLR file located in the src/antlr directory and the java classes corresponding to the CREATE statement located in the org.apache.cassandra.cql3.statements.schema package.
> The unit test for the CQL logic are located under org.apache.cassandra.cql3.validation
> cqlsh parsing will need to be modified to support the new LIKE syntax. The logic is in pylib/cqlshlib/cql3handling.py and the test in pylib/cqlshlib/test/test_cqlsh_completion.py
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org