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

Error pushing predicates to HBase storage handler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • HBase Handler
    • None

    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
          jcamachorodriguez
        2. HIVE-13831.02.patch
          24 kB
          jcamachorodriguez
        3. HIVE-13831.patch
          21 kB
          jcamachorodriguez

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: