Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Casting to and from short does not work.

      1. patch-68.txt
        24 kB
        Ashish Thusoo

        Activity

        Hide
        dhruba borthakur added a comment -

        I just committed this. Thanks Ashish!

        Show
        dhruba borthakur added a comment - I just committed this. Thanks Ashish!
        Hide
        Namit Jain added a comment -

        +1

        Show
        Namit Jain added a comment - +1
        Hide
        Ashish Thusoo added a comment -

        Ran the tests and the tail is as follows:

        [junit] Test testTBinarySortableProtocol passed!
        [junit] bytes in text =234 firstStringsecondString firstKey1secondKey2>
        [junit] compare to =234 firstStringsecondString firstKey1secondKey2>
        [junit] o class = class java.util.ArrayList
        [junit] o size = 3
        [junit] o[0] class = class java.lang.Integer
        [junit] o[1] class = class java.util.ArrayList
        [junit] o[2] class = class java.util.HashMap
        [junit] o = [234, [firstString, secondString],

        {firstKey=1, secondKey=2}]
        [junit] bytes in text =234 firstStringsecondString firstKey1secondKey2>
        [junit] compare to =234 firstStringsecondString firstKey1secondKey2>
        [junit] o class = class java.util.ArrayList
        [junit] o size = 3
        [junit] o = [234, null, {firstKey=1, secondKey=2}

        ]
        [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0.434 sec
        [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestObjectInspectorUtils
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.173 sec
        [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestReflectionObjectInspectors
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.166 sec
        [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestStandardObjectInspectors
        [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
        [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestThriftObjectInspectors
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.172 sec
        [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestUnionStructObjectInspector
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.159 sec

        BUILD SUCCESSFUL
        Total time: 13 minutes 12 seconds

        Show
        Ashish Thusoo added a comment - Ran the tests and the tail is as follows: [junit] Test testTBinarySortableProtocol passed! [junit] bytes in text =234 firstStringsecondString firstKey1secondKey2> [junit] compare to =234 firstStringsecondString firstKey1secondKey2> [junit] o class = class java.util.ArrayList [junit] o size = 3 [junit] o [0] class = class java.lang.Integer [junit] o [1] class = class java.util.ArrayList [junit] o [2] class = class java.util.HashMap [junit] o = [234, [firstString, secondString] , {firstKey=1, secondKey=2}] [junit] bytes in text =234 firstStringsecondString firstKey1secondKey2> [junit] compare to =234 firstStringsecondString firstKey1secondKey2> [junit] o class = class java.util.ArrayList [junit] o size = 3 [junit] o = [234, null, {firstKey=1, secondKey=2} ] [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0.434 sec [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestObjectInspectorUtils [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.173 sec [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestReflectionObjectInspectors [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.166 sec [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestStandardObjectInspectors [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.163 sec [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestThriftObjectInspectors [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.172 sec [junit] Running org.apache.hadoop.hive.serde2.objectinspector.TestUnionStructObjectInspector [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.159 sec BUILD SUCCESSFUL Total time: 13 minutes 12 seconds
        Hide
        Ashish Thusoo added a comment -

        submitted patch.

        Show
        Ashish Thusoo added a comment - submitted patch.
        Hide
        Ashish Thusoo added a comment -

        Patch uploaded.

        Show
        Ashish Thusoo added a comment - Patch uploaded.
        Hide
        Ashish Thusoo added a comment -

        Using cast to cast from or to short gives a null pointer exception. Short is the same as SMALLINT in the language.

        Show
        Ashish Thusoo added a comment - Using cast to cast from or to short gives a null pointer exception. Short is the same as SMALLINT in the language.

          People

          • Assignee:
            Ashish Thusoo
            Reporter:
            Ashish Thusoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development