You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Chaoyu Tang <ct...@gmail.com> on 2015/04/07 01:17:38 UTC

Review Request 32908: HIVE-10231: Compute partition column stats fails if partition col type is date

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32908/
-----------------------------------------------------------

Review request for hive, Ashutosh Chauhan, Gopal V, Jimmy Xiang, Sergio Pena, and Szehon Ho.


Repository: hive-git


Description
-------

Computing column stats for a partition fails if the partition column is type of date. It is caused by a bug in rewriting the analyze query in ColumnStatsSemanticAnalyzer. The date value should be quoted in the rewritten query, but was not. In this patch, for the simplicity I quote the partition value in the rewritten query regardless of its data type.


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java b84ea46 
  ql/src/test/queries/clientpositive/columnstats_part_coltype.q PRE-CREATION 
  ql/src/test/results/clientpositive/columnstats_part_coltype.q.out PRE-CREATION 

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


Testing
-------

Local manually tests passed
A new qfile test columnstats_part_coltype.q passed
submitted to prebuild testing.


Thanks,

Chaoyu Tang


Re: Review Request 32908: HIVE-10231: Compute partition column stats fails if partition col type is date

Posted by Chaoyu Tang <ct...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32908/
-----------------------------------------------------------

(Updated April 7, 2015, 4:11 a.m.)


Review request for hive, Ashutosh Chauhan, Gopal V, Jimmy Xiang, Sergio Pena, and Szehon Ho.


Changes
-------

Made changes based on Ashutosh's suggestion and added more test cases for other data types.


Repository: hive-git


Description
-------

Computing column stats for a partition fails if the partition column is type of date. It is caused by a bug in rewriting the analyze query in ColumnStatsSemanticAnalyzer. The date value should be quoted in the rewritten query, but was not. In this patch, for the simplicity I quote the partition value in the rewritten query regardless of its data type.


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java b84ea46 
  ql/src/test/queries/clientpositive/columnstats_part_coltype.q PRE-CREATION 
  ql/src/test/results/clientpositive/columnstats_part_coltype.q.out PRE-CREATION 

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


Testing
-------

Local manually tests passed
A new qfile test columnstats_part_coltype.q passed
submitted to prebuild testing.


Thanks,

Chaoyu Tang