You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zhihua Deng (Jira)" <ji...@apache.org> on 2021/01/19 02:18:00 UTC
[jira] [Assigned] (HIVE-24639) Raises SemanticException other than
ClassCastException when filter has non-boolean expressions
[ https://issues.apache.org/jira/browse/HIVE-24639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhihua Deng reassigned HIVE-24639:
----------------------------------
Assignee: Zhihua Deng
> Raises SemanticException other than ClassCastException when filter has non-boolean expressions
> ----------------------------------------------------------------------------------------------
>
> Key: HIVE-24639
> URL: https://issues.apache.org/jira/browse/HIVE-24639
> Project: Hive
> Issue Type: Improvement
> Reporter: Zhihua Deng
> Assignee: Zhihua Deng
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Sometimes we see ClassCastException in filters when fetching some rows of a table or executing the query. The GenericUDFOPOr/GenericUDFOPAnd/FilterOperator assume that the output of their conditions should be a boolean, but there is no garanteed. For example:
> _select * from ccn_table where src + 1;_
> will throw ClassCastException:
> {code:java}
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
> at org.apache.hadoop.hive.ql.exec.FilterOperator.process(FilterOperator.java:125)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:888)
> at org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:173)
> at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.forward(MapOperator.java:153)
> at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:553)
> ...{code}
> We'd better to validate the filter during analyzing instead of at runtime and bring more meaningful messages.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)