Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.0
-
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
Attachments
Issue Links
- blocks
-
HIVE-13693 Multi-insert query drops Filter before file output when there is a.val <> b.val
- Closed
- links to