[ https://issues.apache.org/jira/browse/HIVE-20241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16738056#comment-16738056 ]
Barnabas Maidics commented on HIVE-20241: ----------------------------------------- I think the documentation should be updated about CTAS: [https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect(CTAS).] It says: "CTAS has these restrictions: * The target table cannot be a partitioned table." As I understand this is no longer a restriction. > Support partitioning spec in CTAS statements > -------------------------------------------- > > Key: HIVE-20241 > URL: https://issues.apache.org/jira/browse/HIVE-20241 > Project: Hive > Issue Type: Improvement > Components: Parser > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Priority: Major > Labels: TODOC3.2 > Fix For: 4.0.0, 3.2.0 > > Attachments: HIVE-20241.01.patch, HIVE-20241.01.patch, > HIVE-20241.01.patch, HIVE-20241.02.patch, HIVE-20241.03.patch, > HIVE-20241.patch > > > Currently, for partitioned tables we will declare the table and insert the > data in different operations. This issue is to extend CTAS statement to > support specifying partition columns. > For instance: > {code:sql} > CREATE TABLE partition_ctas_1 PARTITIONED BY (key) AS > SELECT value, key FROM src where key > 200 and key < 300; > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)