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 2014/11/07 20:01:58 UTC
Review Request 27737: HIVE-8784:Querying partition does not work with
JDO enabled against PostgreSQL
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27737/
-----------------------------------------------------------
Review request for hive.
Repository: hive-git
Description
-------
Querying a partition in PostgreSQL fails when using JDO (with hive.metastore.try.direct.sql=false). It is because the JDO pushdown filter generated for a query having inequality/between partition predicate uses DN indexOf function which is not working properly with postgresql. Hive (see generateJDOFilterOverPartitions in org.apache.hadoop.hive.metastore.parser.ExpressTree) uses some DN string functions (substring, indexOf) to get the value for a partitionKey. Actually there is a straightforward way (as implemented in this patch) to get it which in addition avoids the DN indexOf issue with postgresql.
Diffs
-----
metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java b8d1afc57642d9b07cb6b3b48c4ac9bcf6c76704
ql/src/test/queries/clientpositive/partition_multilevels.q PRE-CREATION
ql/src/test/results/clientpositive/partition_multilevels.q.out PRE-CREATION
Diff: https://reviews.apache.org/r/27737/diff/
Testing
-------
The test cases provided in this patch have been tested against various DB including Derby, Mysql and PostgreSQL etc.
Thanks,
Chaoyu Tang
Re: Review Request 27737: HIVE-8784:Querying partition does not work
with JDO enabled against PostgreSQL
Posted by Chaoyu Tang <ct...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27737/
-----------------------------------------------------------
(Updated Nov. 10, 2014, 4:58 p.m.)
Review request for hive.
Changes
-------
Add more test cases using ORM and sqldirect.
Repository: hive-git
Description
-------
Querying a partition in PostgreSQL fails when using JDO (with hive.metastore.try.direct.sql=false). It is because the JDO pushdown filter generated for a query having inequality/between partition predicate uses DN indexOf function which is not working properly with postgresql. Hive (see generateJDOFilterOverPartitions in org.apache.hadoop.hive.metastore.parser.ExpressTree) uses some DN string functions (substring, indexOf) to get the value for a partitionKey. Actually there is a straightforward way (as implemented in this patch) to get it which in addition avoids the DN indexOf issue with postgresql.
Diffs (updated)
-----
metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java b8d1afc57642d9b07cb6b3b48c4ac9bcf6c76704
ql/src/test/queries/clientpositive/partition_multilevels.q PRE-CREATION
ql/src/test/results/clientpositive/partition_multilevels.q.out PRE-CREATION
Diff: https://reviews.apache.org/r/27737/diff/
Testing
-------
The test cases provided in this patch have been tested against various DB including Derby, Mysql and PostgreSQL etc.
Thanks,
Chaoyu Tang