[ 
https://issues.apache.org/jira/browse/HIVE-19357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16458250#comment-16458250
 ] 

Matt McCline commented on HIVE-19357:
-------------------------------------

Ya, the VectorUDFAdaptor class catches any Exception from evaluating the 
generic UDF and suppresses it to NULL.  So, the question becomes – is this a 
good policy?  I think no.

 
{code:java}
    // call function

    Object result;

    try {

      result = genericUDF.evaluate(deferredChildren);

    } catch (HiveException e) {



      /* For UDFs that expect primitive types (like int instead of Integer or 
IntWritable),

       * this will catch the the exception that happens if they are passed a 
NULL value.

       * Then the default NULL handling logic will apply, and the result will 
be NULL.

       */

      result = null;

    }{code}

> vectorization breaks assert functionality
> -----------------------------------------
>
>                 Key: HIVE-19357
>                 URL: https://issues.apache.org/jira/browse/HIVE-19357
>             Project: Hive
>          Issue Type: Bug
>          Components: Vectorization
>            Reporter: Zoltan Haindrich
>            Priority: Major
>
> This could be limited to assert exceptions; but might interfere with other 
> exceptions...discovered while "fixing" testreopt after HIVE-19269
> {code}
> create table tu(id_uv int,id_uw int,u int);
> create table tv(id_uv int,v int);
> create table tw(id_uw int,w int);
> insert into tu values 
> (10,10,10),(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6);
> insert into tv values (10,10),(1,1),(2,2),(3,3);
> insert into tw values 
> (10,10),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
> set zzz=0;
> set hive.vectorized.execution.enabled=false;
> select assert_true(${hiveconf:zzz}>sum(1)) from tu join tv on 
> (tu.id_uv=tv.id_uv) where u<10 and v>1;
> -- fails as expected
> set hive.vectorized.execution.enabled=true;
> select assert_true(${hiveconf:zzz}>sum(1)) from tu join tv on 
> (tu.id_uv=tv.id_uv) where u<10 and v>1;
> -- there is a result set
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to