> On July 30, 2018, 10:06 p.m., Ashutosh Chauhan wrote: > > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g > > Lines 2002 (patched) > > <https://reviews.apache.org/r/68086/diff/1/?file=2064678#file2064678line2002> > > > > I don't think we want to allow type in partitioned by clause. Only > > _createTablePartitionColumnSpec_ should be allowed.
The problem is that this rule matches normal CREATE TABLE statement as well as CTAS. In SemanticAnalyzer, I check whether the right type of partitionSpec has been specified and fail otherwise. > On July 30, 2018, 10:06 p.m., Ashutosh Chauhan wrote: > > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java > > Lines 7620 (patched) > > <https://reviews.apache.org/r/68086/diff/1/?file=2064679#file2064679line7630> > > > > Will this guanatee atomicity for Acid and MM tables? Specifically case > > where table gets created but some or all of partitions didnt get added in > > metastore. Add TODO comment if this will be handled later. The commitTxn is triggered by the Driver when tasks have been completed, thus I think current model guarantees atomiticy for data for any kind of transactional table. However, if tasks fail, we may end up with an empty table and dangling partitions in the metastore. I believe this problem probably exists nowadays even for INSERT statements? > On July 30, 2018, 10:06 p.m., Ashutosh Chauhan wrote: > > ql/src/test/queries/clientnegative/partition_ctas_wrong_order.q > > Lines 3 (patched) > > <https://reviews.apache.org/r/68086/diff/1/?file=2064685#file2064685line3> > > > > Is there a reason to disallow partition column other than last one, > > since columns are referred explictly by name, I imagine user would expect > > this to work. Especially since we have recently allowed this to work for > > insert statements as well. Yes, it would be good to support this, I will work on it. Difficulty was that for CTAS we infer the table schema from the query schema, so I will need to change that logic. - Jesús ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68086/#review206615 ----------------------------------------------------------- On July 27, 2018, 6:12 p.m., Jesús Camacho Rodríguez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68086/ > ----------------------------------------------------------- > > (Updated July 27, 2018, 6:12 p.m.) > > > Review request for hive and Ashutosh Chauhan. > > > Bugs: HIVE-20241 > https://issues.apache.org/jira/browse/HIVE-20241 > > > Repository: hive-git > > > Description > ------- > > HIVE-20241 > > > Diffs > ----- > > itests/src/test/resources/testconfiguration.properties > 50bfe6a06a77814decb6d48a19c56e8a41e34432 > ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java > 397cee2a5f5db8874b402377f36d9a33551327c3 > ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java > a1f5133c8626cb5e2fb64ea29236bea48aacacea > ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java > fa923853785b078dd30f000bd803e1bf4b86bcde > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g > 6be48ca23beeadd03d822f211130176d41ca5164 > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java > b5adf1bd046bece1affce6bb0f962cdf5c4af03b > ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java > 7a2a2c7a2841640adc6414087efa8ef5e9ab360d > ql/src/java/org/apache/hadoop/hive/ql/plan/CreateTableDesc.java > 871844b30d17ac351da90c8a7ba03bcc6341b085 > ql/src/java/org/apache/hadoop/hive/ql/plan/DynamicPartitionCtx.java > 6af783302220de51c9c3933039a4122b28400d12 > ql/src/java/org/apache/hadoop/hive/ql/plan/LoadTableDesc.java > af2ece44dc9853607a8737f31284f9442f6c1d69 > ql/src/test/org/apache/hadoop/hive/ql/exec/TestFileSinkOperator.java > 71127c20b7e7d99394c5251ecf7a04a89e0abfc4 > ql/src/test/queries/clientnegative/partition_ctas_wrong_order.q > PRE-CREATION > ql/src/test/queries/clientpositive/partition_ctas.q PRE-CREATION > ql/src/test/results/clientnegative/partition_ctas_wrong_order.q.out > PRE-CREATION > ql/src/test/results/clientpositive/llap/partition_ctas.q.out PRE-CREATION > > > Diff: https://reviews.apache.org/r/68086/diff/1/ > > > Testing > ------- > > > Thanks, > > Jesús Camacho Rodríguez > >
