Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # dev >> Review Request 14155: HIVE-5297 Hive does not honor type for partition columns

Vikram Dixit Kumaraswamy 2013-09-16, 21:05
Vikram Dixit Kumaraswamy 2013-09-17, 01:14
Vikram Dixit Kumaraswamy 2013-09-17, 09:08
Vikram Dixit Kumaraswamy 2013-09-17, 17:51
Vikram Dixit Kumaraswamy 2013-09-17, 20:55
Harish Butani 2013-09-19, 00:21
Ashutosh Chauhan 2013-09-19, 20:18
Vikram Dixit Kumaraswamy 2013-09-20, 01:49
Vikram Dixit Kumaraswamy 2013-09-23, 21:51
Vikram Dixit Kumaraswamy 2013-09-23, 21:58
Copy link to this message
Re: Review Request 14155: HIVE-5297 Hive does not honor type for partition columns

This is an automatically generated e-mail. To reply, visit:

(Updated Sept. 25, 2013, 8:22 p.m.)
Review request for hive and Ashutosh Chauhan.

Fix unit test failures when enabling type check by default.
Bugs: HIVE-5297
Repository: hive-git

Hive does not consider the type of the partition column while writing partitions. Consider for example the query:

create table tab1 (id1 int, id2 string) PARTITIONED BY(month string,day int) row format delimited fields terminated by ',';
alter table tab1 add partition (month='June', day='second');

Hive accepts this query. However if you try to select from this table and insert into another expecting schema match, it will insert nulls instead.
Diffs (updated)

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 350c348
  ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java 393ef57
  ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java a704462
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 0c01749
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 767f545
  ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java 6c354d3
  ql/src/test/queries/clientnegative/illegal_partition_type.q PRE-CREATION
  ql/src/test/queries/clientnegative/illegal_partition_type2.q PRE-CREATION
  ql/src/test/queries/clientpositive/alter_partition_coltype.q 4d2e02f
  ql/src/test/queries/clientpositive/partition_type_check.q PRE-CREATION
  ql/src/test/results/clientnegative/alter_table_add_partition.q.out bd9c148
  ql/src/test/results/clientnegative/alter_view_failure5.q.out 4edb82c
  ql/src/test/results/clientnegative/illegal_partition_type.q.out PRE-CREATION
  ql/src/test/results/clientnegative/illegal_partition_type2.q.out PRE-CREATION
  ql/src/test/results/clientpositive/alter_partition_coltype.q.out fe16fdd
  ql/src/test/results/clientpositive/partition_type_check.q.out PRE-CREATION

Diff: https://reviews.apache.org/r/14155/diff/

Ran all tests.

Vikram Dixit Kumaraswamy

Vikram Dixit Kumaraswamy 2013-09-26, 18:55
Sergey Shelukhin 2013-09-16, 23:19