[
https://issues.apache.org/jira/browse/HIVE-25919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis updated HIVE-25919:
---------------------------------------
Description:
The following queries fail with a {{ClassCastException}} when the optimizer
tries to push the predicates in the underlying HBase table.
{code:sql}
CREATE TABLE hbase_table(row_key string, c1 boolean, c2 boolean)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,cf:c1,cf:c2"
);
-- Q1
select * from hbase_table where c1 and c2;
-- Q2
select * from hbase_table where c1=true and c2=true;
{code}
{code:java}
ClassCastException org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc cannot be
cast to org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc
java.lang.ClassCastException: org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc
cannot be cast to org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc
at
org.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer$1.process(IndexPredicateAnalyzer.java:163)
at
org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:105)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:89)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:178)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:120)
at
org.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer.analyzePredicate(IndexPredicateAnalyzer.java:174)
at
org.apache.hadoop.hive.hbase.HBaseStorageHandler.decomposePredicate(HBaseStorageHandler.java:415)
{code}
mvn test -Dtest=TestHBaseCliDriver -Dqfile=test.q -Dtest.output.overwrite
-DskipSparkTests -pl itests/qtest -Pitests
The failure in Q2 is probably related to HIVE-13815 since the expression (c1 =
true and c2 = true) is simplified to (c1 and c2) leading to the exception above
but the problem was probably there even before as Q1 is failing as well with
the same stacktrace.
was:
The following queries fail with a {{ClassCastException}} when the optimizer
tries to push the predicates in the underlying HBase table.
{code:sql}
CREATE TABLE hbase_table(row_key string, c1 boolean, c2 boolean)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,cf:c1,cf:c2"
);
-- Q1
select * from hbase_table where c1 and c2;
-- Q2
select * from hbase_table where c1=true and c2=true;
{code}
{code:java}
ClassCastException org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc cannot be
cast to org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc
java.lang.ClassCastException: org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc
cannot be cast to org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc
at
org.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer$1.process(IndexPredicateAnalyzer.java:163)
at
org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:105)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:89)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:178)
at
org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:120)
at
org.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer.analyzePredicate(IndexPredicateAnalyzer.java:174)
at
org.apache.hadoop.hive.hbase.HBaseStorageHandler.decomposePredicate(HBaseStorageHandler.java:415)
{code}
mvn test -Dtest=TestHBaseCliDriver -Dqfile=test.q -Dtest.output.overwrite
-DskipSparkTests -pl itests/qtest -Pitests
The failure in Q2 is probably related to HIVE-13815 since the expression {{c1 =
true and c2 = true }} is simplified to {{c1 and c2}} leading to the exception
above but the problem was probably there even before as Q1 is failing as well
with the same stacktrace.
> ClassCastException when pushing boolean column predicate in
> HBaseStorageHandler
> -------------------------------------------------------------------------------
>
> Key: HIVE-25919
> URL: https://issues.apache.org/jira/browse/HIVE-25919
> Project: Hive
> Issue Type: Bug
> Reporter: Naresh P R
> Assignee: Stamatis Zampetakis
> Priority: Major
> Attachments: test.q
>
>
> The following queries fail with a {{ClassCastException}} when the optimizer
> tries to push the predicates in the underlying HBase table.
> {code:sql}
> CREATE TABLE hbase_table(row_key string, c1 boolean, c2 boolean)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> WITH SERDEPROPERTIES (
> "hbase.columns.mapping" = ":key,cf:c1,cf:c2"
> );
> -- Q1
> select * from hbase_table where c1 and c2;
> -- Q2
> select * from hbase_table where c1=true and c2=true;
> {code}
> {code:java}
> ClassCastException org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc cannot
> be cast to org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc
> java.lang.ClassCastException:
> org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc cannot be cast to
> org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc
> at
> org.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer$1.process(IndexPredicateAnalyzer.java:163)
> at
> org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
> at
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:105)
> at
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:89)
> at
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:178)
> at
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:120)
> at
> org.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer.analyzePredicate(IndexPredicateAnalyzer.java:174)
> at
> org.apache.hadoop.hive.hbase.HBaseStorageHandler.decomposePredicate(HBaseStorageHandler.java:415)
>
> {code}
> mvn test -Dtest=TestHBaseCliDriver -Dqfile=test.q -Dtest.output.overwrite
> -DskipSparkTests -pl itests/qtest -Pitests
> The failure in Q2 is probably related to HIVE-13815 since the expression (c1
> = true and c2 = true) is simplified to (c1 and c2) leading to the exception
> above but the problem was probably there even before as Q1 is failing as well
> with the same stacktrace.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)