[
https://issues.apache.org/jira/browse/HIVE-15899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997547#comment-15997547
]
Eugene Koifman commented on HIVE-15899:
---------------------------------------
CTAS doesn't support bucketed or partitioned tables.
ErrorMsgs.CTAS_PARCOL_COEXISTENCE.
Bucketing is currently required for Acid.
in TestAcidOnTez
{noformat}
public void testUnion() throws Exception {
runStatementOnDriver("create temporary table if not exists data1 (x int)");
runStatementOnDriver("create temporary table if not exists data2 (x int)");
runStatementOnDriver("insert into data1 values (1),(2),(3)");
runStatementOnDriver("insert into data2 values (4),(5),(6)");
d.destroy();
HiveConf hc = new HiveConf(hiveConf);
setupTez(hc);
hc.setVar(HiveConf.ConfVars.DYNAMICPARTITIONINGMODE, "nonstrict");
hc.setBoolVar(HiveConf.ConfVars.HIVE_EXPLAIN_USER, false);
d = new Driver(hc);
r = runStatementOnDriver("create table srcpart3 stored as orc as select x,
1, 2 from data1 union all select x, 3, 4 from data2");
}
{noformat}
This creates a file system layout with 2 subfolders
{noformat}
ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ ./bin/hive --orcfiledump -j
-p -d
/Users/ekoifman/dev/hiverwgit/itests/hive-unit/target/tmp/org.apache.hadoop.hive.ql.TestAcidOnTez-1493936793357/warehouse/srcpart3/
Processing data file
file:/Users/ekoifman/dev/hiverwgit/itests/hive-unit/target/tmp/org.apache.hadoop.hive.ql.TestAcidOnTez-1493936793357/warehouse/srcpart3/1/000000_0
[length: 291]
{"x":1,"_c1":1,"_c2":2}
{"x":2,"_c1":1,"_c2":2}
{"x":3,"_c1":1,"_c2":2}
________________________________________________________________________________________________________________________
Processing data file
file:/Users/ekoifman/dev/hiverwgit/itests/hive-unit/target/tmp/org.apache.hadoop.hive.ql.TestAcidOnTez-1493936793357/warehouse/srcpart3/2/000000_0
[length: 295]
{"x":4,"_c1":3,"_c2":4}
{"x":5,"_c1":3,"_c2":4}
{"x":6,"_c1":3,"_c2":4}
________________________________________________________________________________________________________________________
{noformat}
> check CTAS over acid table
> ---------------------------
>
> Key: HIVE-15899
> URL: https://issues.apache.org/jira/browse/HIVE-15899
> Project: Hive
> Issue Type: Task
> Reporter: Eugene Koifman
> Assignee: Eugene Koifman
>
> need to add a test to check if create table as works correctly with acid
> tables
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)