Hive
  1. Hive
  2. HIVE-5382

Allow strings represented as exponential notation to be typecasted to int/smallint/bigint/tinyint

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Follow up jira for HIVE-5352

      1. HIVE-5382.1.patch
        23 kB
        Hari Sankar Sivarama Subramaniyan

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        4d 11h 57m 1 Hari Sankar Sivarama Subramaniyan 01/Oct/13 21:04
        Patch Available Patch Available Open Open
        316d 23h 44m 1 Hari Sankar Sivarama Subramaniyan 14/Aug/14 20:48
        Open Open Resolved Resolved
        14s 1 Hari Sankar Sivarama Subramaniyan 14/Aug/14 20:49
        Hari Sankar Sivarama Subramaniyan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]
        Hari Sankar Sivarama Subramaniyan made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hide
        Hari Sankar Sivarama Subramaniyan added a comment -

        This can be closed because it no longer happens in hive-0.13 possibly due to HIVE-5356.

        Thanks
        Hari

        Show
        Hari Sankar Sivarama Subramaniyan added a comment - This can be closed because it no longer happens in hive-0.13 possibly due to HIVE-5356 . Thanks Hari
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-h0.21 #2381 (See https://builds.apache.org/job/Hive-trunk-h0.21/2381/)
        HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212)

        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
        • /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-h0.21 #2381 (See https://builds.apache.org/job/Hive-trunk-h0.21/2381/ ) HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212 ) /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-hadoop1-ptest #191 (See https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/191/)
        HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212)

        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
        • /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-hadoop1-ptest #191 (See https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/191/ ) HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212 ) /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-hadoop2-ptest #125 (See https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/125/)
        HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212)

        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
        • /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-hadoop2-ptest #125 (See https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/125/ ) HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212 ) /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-hadoop2 #477 (See https://builds.apache.org/job/Hive-trunk-hadoop2/477/)
        HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212)

        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
        • /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
        • /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt
        • /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-hadoop2 #477 (See https://builds.apache.org/job/Hive-trunk-hadoop2/477/ ) HIVE-5382 - PTest2 should allow you to specify ant properties which will only be added to the command when a test is executed (brock: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1529212 ) /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java /hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java /hive/trunk/testutils/ptest2/src/main/resources/batch-exec.vm /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testAlternativeTestJVM.approved.txt /hive/trunk/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
        Hide
        Hari Sankar Sivarama Subramaniyan added a comment -

        Hi Gunther,
        Thanks for the review for addressing those issues.
        It seems like e notation explicitly means 10^value.
        I need to look more into how java language handles similar scenarios .
        One question is why cant we directly use 'Double.valueOf(string)' for this conversion as defined in http://developer.classpath.org/doc/java/lang/Double-source.html Theoretically, it should tally with the results that we obtain if we cast one number type to another number type in Hive.

        The bottom line is that the issues that Gunther addressed in RB need to be clearly understood and addressed before we can merge in the change. This will be fixed by 0.13.

        Thanks
        Hari

        Show
        Hari Sankar Sivarama Subramaniyan added a comment - Hi Gunther, Thanks for the review for addressing those issues. It seems like e notation explicitly means 10^value. I need to look more into how java language handles similar scenarios . One question is why cant we directly use 'Double.valueOf(string)' for this conversion as defined in http://developer.classpath.org/doc/java/lang/Double-source.html Theoretically, it should tally with the results that we obtain if we cast one number type to another number type in Hive. The bottom line is that the issues that Gunther addressed in RB need to be clearly understood and addressed before we can merge in the change. This will be fixed by 0.13. Thanks Hari
        Hide
        Gunther Hagleitner added a comment -

        comments on rb.

        Show
        Gunther Hagleitner added a comment - comments on rb.
        Show
        Hari Sankar Sivarama Subramaniyan added a comment - https://reviews.apache.org/r/14430/
        Hide
        Hive QA added a comment -

        Overall: +1 all checks pass

        Here are the results of testing the latest attachment:
        https://issues.apache.org/jira/secure/attachment/12606174/HIVE-5382.1.patch

        SUCCESS: +1 4077 tests passed

        Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/985/testReport
        Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/985/console

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Executing org.apache.hive.ptest.execution.ExecutionPhase
        Executing org.apache.hive.ptest.execution.ReportingPhase
        

        This message is automatically generated.

        Show
        Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12606174/HIVE-5382.1.patch SUCCESS: +1 4077 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/985/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/985/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated.
        Hari Sankar Sivarama Subramaniyan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hari Sankar Sivarama Subramaniyan made changes -
        Field Original Value New Value
        Attachment HIVE-5382.1.patch [ 12606174 ]
        Hide
        Hari Sankar Sivarama Subramaniyan added a comment -

        Allow exponential notation when the final result is within bounds.

        Show
        Hari Sankar Sivarama Subramaniyan added a comment - Allow exponential notation when the final result is within bounds.
        Hari Sankar Sivarama Subramaniyan created issue -

          People

          • Assignee:
            Hari Sankar Sivarama Subramaniyan
            Reporter:
            Hari Sankar Sivarama Subramaniyan
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development