Details
-
Task
-
Status: In Progress
-
Normal
-
Resolution: Unresolved
-
Normal
Description
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
Attachments
Attachments
Issue Links
- is a parent of
-
CASSANDRA-19965 CREATE TABLE LIKE with indexes/ triggers /ALL option
- In Progress
-
CASSANDRA-19966 CREATE TABLE LIKE for table for UDT
- In Progress
-
CASSANDRA-20120 Add doc for CREATE TABLE LIKE
- In Progress
-
CASSANDRA-20111 Add Guardrail for CREATE TABLE LIKE
- Resolved
-
CASSANDRA-19964 CREATE TABLE LIKE for copying Basic Table definition
- Review In Progress
- is duplicated by
-
CASSANDRA-7643 Cassandra Schema Template
- Resolved
-
CASSANDRA-5194 LIKE Operator in CQL When Creating Column Families
- Resolved