Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.5.0, 0.6.0
    • Fix Version/s: 0.7.0
    • Component/s: UDF
    • Labels:
      None

      Description

      I tried it against one of my table:

      hive> desc r;
      OK
      key int
      value string
      a string

      hive> select * from r;
      OK
      4 val_356 NULL
      4 val_356 NULL
      484 val_169 NULL
      484 val_169 NULL
      2000 val_169 NULL
      2000 val_169 NULL
      3000 val_169 NULL
      3000 val_169 NULL
      4000 val_125 NULL
      4000 val_125 NULL

      hive> select *, field(value, 'val_169') from r;
      OK
      4 val_356 NULL 0
      4 val_356 NULL 0
      484 val_169 NULL 0
      484 val_169 NULL 0
      2000 val_169 NULL 0
      2000 val_169 NULL 0
      3000 val_169 NULL 0
      3000 val_169 NULL 0
      4000 val_125 NULL 0
      4000 val_125 NULL 0

      1. HIVE-1385.1.patch
        9 kB
        Siying Dong
      2. HIVE-1385.2.patch
        9 kB
        Siying Dong

        Activity

        Hide
        He Yongqiang added a comment -

        I just committed. Thanks Siying!

        Show
        He Yongqiang added a comment - I just committed. Thanks Siying!
        Hide
        Siying Dong added a comment -

        use ObjectInspector.compare() and add some test cases.

        Show
        Siying Dong added a comment - use ObjectInspector.compare() and add some test cases.
        Hide
        He Yongqiang added a comment -

        discussed with Siying offline.
        1. use ObjectInspectUtils.compare
        2. add more test, the first argument can also be a column
        3. add a negative test for complex types.

        Show
        He Yongqiang added a comment - discussed with Siying offline. 1. use ObjectInspectUtils.compare 2. add more test, the first argument can also be a column 3. add a negative test for complex types.
        Hide
        He Yongqiang added a comment -

        will take a look.

        Show
        He Yongqiang added a comment - will take a look.
        Hide
        Siying Dong added a comment -

        Fix UDF field()

        Show
        Siying Dong added a comment - Fix UDF field()
        Hide
        John Sichi added a comment -

        I think the bug is with usage of Object.equals for the comparison. Doing a toString on both sides first seems like a reasonable fix given the current spec for the function, or we could do whatever Paul did for IN.

        Show
        John Sichi added a comment - I think the bug is with usage of Object.equals for the comparison. Doing a toString on both sides first seems like a reasonable fix given the current spec for the function, or we could do whatever Paul did for IN.

          People

          • Assignee:
            Siying Dong
            Reporter:
            Siying Dong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development