mirror of
https://github.com/apache/impala.git
synced 2026-01-03 06:00:52 -05:00
Change-Id: Ia01181a1e10eb108419122d347e9d869a69e8922 Reviewed-on: http://gerrit.ent.cloudera.com:8080/102 Reviewed-by: Ishaan Joshi <ishaan@cloudera.com> Tested-by: Ishaan Joshi <ishaan@cloudera.com>
117 lines
1.8 KiB
Plaintext
117 lines
1.8 KiB
Plaintext
====
|
|
---- QUERY
|
|
# predicate on row key col is applied to scan if row key is mapped as string col
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id = '5'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1
|
|
====
|
|
---- QUERY
|
|
# predicate on row key col is not applied to scan if row key is mapped as non-string col
|
|
# but the result is still correct
|
|
select count(*)
|
|
from functional_hbase.alltypesagg
|
|
where id = 5
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1
|
|
====
|
|
---- QUERY
|
|
# ids are stored in ascii and ordered lexicographically
|
|
# exclusive upper bound
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id < '5'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4445
|
|
====
|
|
---- QUERY
|
|
# inclusive upper bound
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id <= '5'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4446
|
|
====
|
|
---- QUERY
|
|
# inclusive lower bound
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id >= '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4444
|
|
====
|
|
---- QUERY
|
|
# exclusive lower bound
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id > '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4443
|
|
====
|
|
---- QUERY
|
|
# combinations
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id > '5'
|
|
and id < '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1110
|
|
====
|
|
---- QUERY
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id >= '5'
|
|
and id < '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1111
|
|
====
|
|
---- QUERY
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id > '5'
|
|
and id <= '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1111
|
|
====
|
|
---- QUERY
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id >= '5'
|
|
and id <= '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1112
|
|
====
|
|
---- QUERY
|
|
# predicates on non-key cols are evaluated in the executor
|
|
# and non-string comparisons work
|
|
select count(*)
|
|
from functional_hbase.stringids
|
|
where id < '5'
|
|
and smallint_col < 5
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
180
|
|
====
|