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

Xuefu Zhang commented on HIVE-3630:
-----------------------------------

I think HIVE-3630 and HIVE-3840 are dealing with two different issues: 
HIVE-3840 is about inconsistency of null vs NULL, while HIVE-3630 about an 
internal error causing a result diff of empty string vs NULL.

With patch in HIVE-3840, the test fails with the following diff:
    [junit] 36c36
    [junit] < NULL              NULL    NULL    NULL
    [junit] ---
    [junit] > NULL      NULL    NULL    NULL    NULL
    [junit] 184c184
    [junit] < NULL              NULL    NULL    NULL    A       AB      ABC     
ABC     A       AB      ABC     ABC     B       BC      BC      BC      C       
C       C       C               C       C       C       C       B       BC      
BC      BC      A       AB      ABC     ABC
    [junit] ---
    [junit] > NULL      NULL    NULL    NULL    NULL    A       AB      ABC     
ABC     A       AB      ABC     ABC     B       BC      BC      BC      C       
C       C       C               C       C       C       C       B       BC      
BC      BC      A       AB      ABC     ABC

Compare it with the original diff in JDK7:
    [junit] 36c36
    [junit] < NULL              NULL    NULL    NULL
    [junit] ---
    [junit] > NULL      NULL    NULL    NULL    NULL
    [junit] 184c184
    [junit] < NULL              NULL    NULL    NULL    A       AB      ABC     
ABC     A       AB      ABC     ABC     B       BC      BC      BC      C       
C       C       C               C       C       C       C       B       BC      
BC      BC      A       AB      ABC     ABC
    [junit] ---
    [junit] > NULL      NULL    NULL    NULL    NULL    A       AB      ABC     
ABC     A       AB      ABC     ABC     B       BC      BC      BC      C       
C       C       C               C       C       C       C       B       BC      
BC      BC      A       AB      ABC     ABC

Please note that there is no "null" in the result any more, thanks to the patch 
in HIVE-3840.

With patch in HIVE-3630, the test passes.

In fact, with JDK7, more test failures are observed because of output ordering, 
probably due to the iterator behaviour difference introduced in JDK7, same 
cause as HIVE-3630.




                
> udf_substr.q fails when using JDK7
> ----------------------------------
>
>                 Key: HIVE-3630
>                 URL: https://issues.apache.org/jira/browse/HIVE-3630
>             Project: Hive
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 0.9.1, 0.10.0, 0.11.0
>            Reporter: Chris Drome
>            Assignee: Chris Drome
>         Attachments: HIVE-3630-0.10.patch, HIVE-3630-0.9.patch, 
> HIVE-3630-trunk.patch
>
>
> Internal error: Cannot find ConstantObjectInspector for BINARY
> This exception has two causes.
> JDK7 iterators do not return values in the same order as JDK6, which selects 
> a different implementation of this UDF when the first argument is null. With 
> JDK7 this happens to be the binary version.
> The binary version is not implemented properly which ultimately causes the 
> exception when the method is called.

--
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