[ 
https://issues.apache.org/jira/browse/HIVE-4533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Hanson updated HIVE-4533:
------------------------------

    Description: 
See file NotCol.java in org.apache.hadoop.hive.ql.exec.vector.expressions.

This code does not look at the selection vector so it may waste time 
propagating nulls if the batch has already been filtered. 

A more serious problem is that it only copies over n entries. So if a filter 
has been applied, nulls my not be copied over when they should.

    // handle NULLs
    if (inputColVector.noNulls) {
      outV.noNulls = true;
    } else {
      outV.noNulls = false;
      if (inputColVector.isRepeating) {
        outV.isNull[0] = inputColVector.isNull[0];
      } else {
        System.arraycopy(inputColVector.isNull, 0, outV.isNull, 0, n);
      }
    }



  was:
See file NotNull.java in org.apache.hadoop.hive.ql.exec.vector.expressions.

This code does not look at the selection vector so it may waste time 
propagating nulls if the batch has already been filtered. 

A more serious problem is that it only copies over n entries. So if a filter 
has been applied, nulls my not be copied over when they should.

    // handle NULLs
    if (inputColVector.noNulls) {
      outV.noNulls = true;
    } else {
      outV.noNulls = false;
      if (inputColVector.isRepeating) {
        outV.isNull[0] = inputColVector.isNull[0];
      } else {
        System.arraycopy(inputColVector.isNull, 0, outV.isNull, 0, n);
      }
    }



    
> vectorized NotNull operation does not handle short-circuit evaluation for 
> NULL propagation correctly
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-4533
>                 URL: https://issues.apache.org/jira/browse/HIVE-4533
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Eric Hanson
>
> See file NotCol.java in org.apache.hadoop.hive.ql.exec.vector.expressions.
> This code does not look at the selection vector so it may waste time 
> propagating nulls if the batch has already been filtered. 
> A more serious problem is that it only copies over n entries. So if a filter 
> has been applied, nulls my not be copied over when they should.
>     // handle NULLs
>     if (inputColVector.noNulls) {
>       outV.noNulls = true;
>     } else {
>       outV.noNulls = false;
>       if (inputColVector.isRepeating) {
>         outV.isNull[0] = inputColVector.isNull[0];
>       } else {
>         System.arraycopy(inputColVector.isNull, 0, outV.isNull, 0, n);
>       }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to