hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navis Ryu" <navis....@nexr.com>
Subject Review Request 30549: SELECT max(bar) FROM foo is broken after ANALYZE ... FOR COLUMNS
Date Tue, 03 Feb 2015 06:43:43 GMT

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

Review request for hive.


Bugs: HIVE-9397
    https://issues.apache.org/jira/browse/HIVE-9397


Repository: hive-git


Description
-------

These queries produce an error :

{code:sql}
DROP TABLE IF EXISTS foo;

CREATE TABLE foo (id int) STORED AS ORC;

INSERT INTO TABLE foo VALUES (1);
INSERT INTO TABLE foo VALUES (2);
INSERT INTO TABLE foo VALUES (3);
INSERT INTO TABLE foo VALUES (4);
INSERT INTO TABLE foo VALUES (5);

SELECT max(id) FROM foo;

ANALYZE TABLE foo COMPUTE STATISTICS FOR COLUMNS id;

SELECT max(id) FROM foo;
{code}

The last query throws {{org.apache.hive.service.cli.HiveSQLException}}
{noformat}
0: jdbc:hive2://nc-h04:10000/casino> SELECT max(id) FROM foo;
+-------------+--+
|     _c0     |
+-------------+--+
org.apache.hive.service.cli.HiveSQLException: java.lang.ClassCastException
0: jdbc:hive2://nc-h04:10000/casino>
{noformat}


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/StatsOptimizer.java 6961d7f 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java d1118f1 
  ql/src/test/results/clientpositive/metadata_only_queries.q.out 90c76ed 
  ql/src/test/results/clientpositive/metadata_only_queries_with_filters.q.out 5be958f 

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


Testing
-------


Thanks,

Navis Ryu


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