mirror of
https://github.com/apache/impala.git
synced 2026-01-01 18:00:30 -05:00
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.hbasestringids
|
|
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.hbasealltypesagg
|
|
where id = 5
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1
|
|
====
|
|
---- QUERY
|
|
# ids are stored in ascii and ordered lexicographically
|
|
# exclusive upper bound
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id < '5'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4445
|
|
====
|
|
---- QUERY
|
|
# inclusive upper bound
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id <= '5'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4446
|
|
====
|
|
---- QUERY
|
|
# inclusive lower bound
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id >= '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4444
|
|
====
|
|
---- QUERY
|
|
# exclusive lower bound
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id > '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
4443
|
|
====
|
|
---- QUERY
|
|
# combinations
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id > '5'
|
|
and id < '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1110
|
|
====
|
|
---- QUERY
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id >= '5'
|
|
and id < '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1111
|
|
====
|
|
---- QUERY
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
where id > '5'
|
|
and id <= '6'
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
1111
|
|
====
|
|
---- QUERY
|
|
select count(*)
|
|
from functional.hbasestringids
|
|
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.hbasestringids
|
|
where id < '5'
|
|
and smallint_col < 5
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
180
|
|
====
|