hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang" <>
Subject Review Request 33171: HIVE-10307:Support to use number literals in partition column
Date Tue, 14 Apr 2015 18:12:31 GMT

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

Review request for hive, Ashutosh Chauhan, Szehon Ho, and Xuefu Zhang.

Summary (updated)

HIVE-10307:Support to use number literals in partition column

Bugs: HIVE-10307

Repository: hive-git

Description (updated)

Data types like TinyInt, SmallInt, BigInt or Decimal can be expressed as literals with postfix
like Y, S, L, or BD appended to the number. These literals work in most Hive queries, but
do not when they are used as partition column value. This patch is to address the issue of
number literals used in partition specification.
Highlights of the changes:
1. Validate, convert and normalize the partVal in partSpec to match its column type when hive.partition.check.column.type
is set to true (default). It not only applies to opertion insert which used to be controlled
by "hive.typecheck.on.insert", but also for other partition operations (e.g. alter table ..
partition, partition statistics etc). The hive.typecheck.on.insert is now removed.
2. Convert and normalize legacy partition column data by using alter table partition .. rename
with set to true. this property only allows
the partVal in old PartSpec to skip the type check, conversion in partition rename.

Diffs (updated)

  common/src/java/org/apache/hadoop/hive/conf/ e138800 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ 19234b5 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ e8066be 
  ql/src/java/org/apache/hadoop/hive/ql/parse/ 8302067 
  ql/src/test/queries/clientpositive/partition_coltype_literals.q PRE-CREATION 
  ql/src/test/results/clientpositive/partition_coltype_literals.q.out PRE-CREATION 


Testing (updated)

1. Manaully tests covering various number literals (Y, S, L, BD)
2. new qfile test (partition_coltype_literals.q)
3. Precommit build


Chaoyu Tang

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message