hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihang Karajgaonkar (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-18622) Vectorization: IF Statements, Comparisons, and more do not handle NULLs correctly
Date Fri, 16 Feb 2018 00:57:00 GMT

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

Vihang Karajgaonkar edited comment on HIVE-18622 at 2/16/18 12:56 AM:
----------------------------------------------------------------------

Thanks [~mmccline] for fixing this. I left minor comments which need to be addressed else
this patch would regress fix for HIVE-18421. Would appreciate if you could take a look at
them. We basically need to handle the overflows before returning in case the inputVector.isRepeating
is true.


was (Author: vihangk1):
Thanks [~mmccline] for fixing this. I left minor comments which would regress fix for HIVE-18421
unless fixed. Would appreciate if you could take a look at them. We basically need to handle
the overflows before returning in case the inputVector.isRepeating is true.

> Vectorization: IF Statements, Comparisons, and more do not handle NULLs correctly
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-18622
>                 URL: https://issues.apache.org/jira/browse/HIVE-18622
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Matt McCline
>            Assignee: Matt McCline
>            Priority: Critical
>             Fix For: 3.0.0
>
>         Attachments: HIVE-18622.03.patch, HIVE-18622.04.patch, HIVE-18622.05.patch, HIVE-18622.06.patch,
HIVE-18622.07.patch, HIVE-18622.08.patch, HIVE-18622.09.patch, HIVE-18622.091.patch, HIVE-18622.092.patch,
HIVE-18622.093.patch, HIVE-18622.094.patch, HIVE-18622.095.patch, HIVE-18622.096.patch, HIVE-18622.097.patch,
HIVE-18622.098.patch, HIVE-18622.099.patch, HIVE-18622.0991.patch
>
>
>  
>  Many vector expression classes are setting noNulls to true which does not work if the
VRB is a scratch column being reused. The previous use may have set noNulls to false and the
isNull array will have some rows marked as NULL. The result is wrong query results and sometimes
NPEs (for BytesColumnVector).
> So, many vector expressions need this:
> {code:java}
>       // Carefully handle NULLs...
>       /*
>        * For better performance on LONG/DOUBLE we don't want the conditional
>        * statements inside the for loop.
>        */
>       outputColVector.noNulls = false;
>  {code}
> And, vector expressions need to make sure the isNull array entry is set when outputColVector.noNulls
is false.
> And, all place that assign column value need to set noNulls to false when the value is
NULL.
> Almost all cases where noNulls is set to true are incorrect.



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

Mime
View raw message