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/15 04:10:00 UTC
[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=17265672#comment-17265672 ]
Zhihua Deng edited comment on HIVE-24639 at 1/15/21, 4:09 AM:
--------------------------------------------------------------
Seems we have already implemented it somewhere when filter has non-boolean expressions in vectorization, but may not take care of the cases of _and_ and _or_ , and the simple fetcher, etc. Maybe we should cover these cases instead of just raising exceptions.
was (Author: dengzh):
Seems we have already implemented it somewhere when the filter is non-boolean expressions in vectorization, but may not take care of cases of _and_ and _or_ , and the simple fetcher, etc. Maybe we should cover these cases instead of raising exceptions.
> 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
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> 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)