You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/01 02:18:00 UTC

[jira] [Work logged] (HIVE-24639) Raises SemanticException other than ClassCastException when filter has non-boolean expressions

     [ https://issues.apache.org/jira/browse/HIVE-24639?focusedWorklogId=545018&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-545018 ]

ASF GitHub Bot logged work on HIVE-24639:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Feb/21 02:17
            Start Date: 01/Feb/21 02:17
    Worklog Time Spent: 10m 
      Work Description: dengzhhu653 edited a comment on pull request #1871:
URL: https://github.com/apache/hive/pull/1871#issuecomment-763557258


   > Hey @dengzhhu653 are you going to open a new PR for this? Happy to take a look
   
   Thanks much @pgaref! maybe we should fix the HIVE-24666 firstly before we move on....


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 545018)
    Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)