Hive
  1. Hive
  2. HIVE-1271

Case sensitiveness of type information specified when using custom reducer causes type mismatch

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      Type information specified while using a custom reduce script is converted to lower case, and causes type mismatch during query semantic analysis . The following REDUCE query where field name = "userId" failed.

      hive> CREATE TABLE SS (
      > a INT,
      > b INT,
      > vals ARRAY<STRUCT<userId:INT, y:STRING>>
      > );
      OK

      hive> FROM (select * from srcTable DISTRIBUTE BY id SORT BY id) s
      > INSERT OVERWRITE TABLE SS
      > REDUCE *
      > USING 'myreduce.py'
      > AS
      > (a INT,
      > b INT,
      > vals ARRAY<STRUCT<userId:INT, y:STRING>>
      > )
      > ;
      FAILED: Error in semantic analysis: line 2:27 Cannot insert into
      target table because column number/types are different SS: Cannot
      convert column 2 from array<struct<userId:int,y:string>> to
      array<struct<userid:int,y:string>>.

      The same query worked fine after changing "userId" to "userid".

      1. HIVE-1271.patch
        6 kB
        Arvind Prabhakar
      2. HIVE-1271-1.patch
        8 kB
        Arvind Prabhakar

        Activity

        Dilip Joseph created issue -
        Arvind Prabhakar made changes -
        Field Original Value New Value
        Assignee Arvind Prabhakar [ aprabhakar ]
        Arvind Prabhakar made changes -
        Attachment HIVE-1271.patch [ 12439946 ]
        Arvind Prabhakar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Arvind Prabhakar made changes -
        Attachment HIVE-1271-1.patch [ 12440030 ]
        John Sichi made changes -
        Fix Version/s 0.6.0 [ 12314524 ]
        Ashish Thusoo made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Carl Steinbach made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arvind Prabhakar
            Reporter:
            Dilip Joseph
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development