L. C. Hsieh created SPARK-55994:
-----------------------------------

             Summary: Support CREATE TABLE LIKE for V2
                 Key: SPARK-55994
                 URL: https://issues.apache.org/jira/browse/SPARK-55994
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 4.2.0
            Reporter: L. C. Hsieh


CREATE TABLE LIKE was implemented solely via CreateTableLikeCommand, a V1-only 
command that bypasses the DataSource V2 analysis pipeline entirely. As a 
result, it was impossible to use CREATE TABLE LIKE to create a table in a 
non-session V2 catalog (e.g., testcat.dst): a 2-part name like testcat.dst was 
misinterpreted as database testcat in the session catalog and threw 
NoSuchDatabaseException, while a 3-part name like testcat.ns.dst was a parse 
error because the grammar only accepted 2-part tableIdentifier.

We should support CREATE TABLE LIKE through the standard V2 DDL pipeline so 
that V2 catalog targets are fully supported, while preserving the existing V1 
behavior when both target and source resolve to the session catalog.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to