Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13831

Error pushing predicates to HBase storage handler

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: HBase Handler
    • Labels:
      None
    • Target Version/s:

      Description

      Discovered while working on HIVE-13693.

      There is an error on the predicates that we can push to HBaseStorageHandler. In particular, range predicates of the shape (bounded, open) and (open, bounded) over long or int columns get pushed and return wrong results.

      The problem has to do with the storage order for keys in HBase. Keys are sorted lexicographically. Since the byte representation of negative values comes after the positive values, open range predicates need special handling that we do not have right now.

      Thus, for instance, when we push the predicate key > 2, we return all records with column key greater than 2, plus the records with negative values for the column key. This problem does not get exposed if a filter is kept in the Hive operator tree, but we should not assume the latest.

      This fix avoids pushing this kind of predicates to the storage handler, returning them in the residual part of the predicate that cannot be pushed. In the future, special handling might be added to support this kind of predicates.

        Attachments

        1. HIVE-13831.01.patch
          26 kB
          Jesus Camacho Rodriguez
        2. HIVE-13831.02.patch
          24 kB
          Jesus Camacho Rodriguez
        3. HIVE-13831.patch
          21 kB
          Jesus Camacho Rodriguez

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                jcamachorodriguez Jesus Camacho Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: