blob: eefbe5bccf66eab1b56add264e12a42455ed87f5 [file] [log] [blame]
select * from functional_kudu.testtbl
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1004), (int64 id=1008))}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1008), <end>)}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
row-size=28B cardinality=0
====
select * from functional_kudu.testtbl where name = '10'
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
kudu predicates: name = '10'
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1004), (int64 id=1008))}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1008), <end>)}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
kudu predicates: name = '10'
row-size=28B cardinality=0
====
select * from functional_kudu.testtbl where name = NULL
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: name = NULL
row-size=28B cardinality=0
====
insert into functional_kudu.testtbl(id) values (10)
---- PLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
00:UNION
constant-operands=1
row-size=1B cardinality=1
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
02:PARTIAL SORT
| order by: KuduPartition(10) ASC NULLS LAST, 10 ASC NULLS LAST
| row-size=5B cardinality=1
|
01:EXCHANGE [KUDU(KuduPartition(10))]
|
00:UNION
constant-operands=1
row-size=1B cardinality=1
====
insert into functional_kudu.testtbl(id) select int_col from functional_kudu.tinyinttable
---- PLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
00:SCAN KUDU [functional_kudu.tinyinttable]
row-size=4B cardinality=10
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
02:PARTIAL SORT
| order by: KuduPartition(int_col) ASC NULLS LAST, int_col ASC NULLS LAST
| row-size=8B cardinality=10
|
01:EXCHANGE [KUDU(KuduPartition(int_col))]
|
00:SCAN KUDU [functional_kudu.tinyinttable]
row-size=4B cardinality=10
====
insert into functional_kudu.testtbl(id, name)
select count(distinct id), name from functional_kudu.dimtbl
group by name
---- PLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
02:AGGREGATE [FINALIZE]
| output: count(id)
| group by: name
| row-size=25B cardinality=10
|
01:AGGREGATE
| group by: name, id
| row-size=25B cardinality=10
|
00:SCAN KUDU [functional_kudu.dimtbl]
row-size=29B cardinality=10
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
08:PARTIAL SORT
| order by: KuduPartition(count(id)) ASC NULLS LAST, count(id) ASC NULLS LAST
| row-size=29B cardinality=10
|
07:EXCHANGE [KUDU(KuduPartition(count(id)))]
|
06:AGGREGATE [FINALIZE]
| output: count:merge(id)
| group by: name
| row-size=25B cardinality=10
|
05:EXCHANGE [HASH(name)]
|
02:AGGREGATE [STREAMING]
| output: count(id)
| group by: name
| row-size=25B cardinality=10
|
04:AGGREGATE
| group by: name, id
| row-size=25B cardinality=10
|
03:EXCHANGE [HASH(name,id)]
|
01:AGGREGATE [STREAMING]
| group by: name, id
| row-size=25B cardinality=10
|
00:SCAN KUDU [functional_kudu.dimtbl]
row-size=29B cardinality=10
====
# All predicates can be pushed down.
select * from functional_kudu.testtbl
where id >= 10 and zip <= 5 and 20 >= id and 'foo' = name and zip >= 0 and 30 >= zip
and zip > 1 and zip < 50
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
kudu predicates: name = 'foo', id <= 20, id >= 10, zip < 50, zip <= 30, zip <= 5, zip > 1, zip >= 0
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
kudu predicates: name = 'foo', id <= 20, id >= 10, zip < 50, zip <= 30, zip <= 5, zip > 1, zip >= 0
row-size=28B cardinality=0
====
# Constant propagation works for Kudu
select * from functional_kudu.alltypes t
where t.int_col = 10 and t.bigint_col = t.int_col * 100 and
cast(t.tinyint_col as bigint) = t.bigint_col
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.alltypes t]
predicates: CAST(t.tinyint_col AS BIGINT) = 1000
kudu predicates: t.bigint_col = 1000, t.int_col = 10
row-size=97B cardinality=107
====
# Test constant folding.
select * from functional_kudu.testtbl
where id < 10 + 30 and cast(sin(id) as boolean) = true and 20 * 3 >= id and 10 * 10 + 3 > id
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: CAST(sin(id) AS BOOLEAN) = TRUE
kudu predicates: id < 103, id < 40, id <= 60
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: CAST(sin(id) AS BOOLEAN) = TRUE
kudu predicates: id < 103, id < 40, id <= 60
row-size=28B cardinality=0
====
# Some predicates can be pushed down but others can't (predicate on an non-const value).
select * from functional_kudu.testtbl
where cast(sin(id) as boolean) = true and name = 'a'
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: CAST(sin(id) AS BOOLEAN) = TRUE
kudu predicates: name = 'a'
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1004), (int64 id=1008))}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1008), <end>)}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: CAST(sin(id) AS BOOLEAN) = TRUE
kudu predicates: name = 'a'
row-size=28B cardinality=0
====
# No predicates can be pushed down (predicate on a non-const value and
# non-binary predicate). There is a single tablet so no partition pruning.
select * from functional_kudu.testtbl
where cast(sin(id) as boolean) = true and name is null
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: CAST(sin(id) AS BOOLEAN) = TRUE
kudu predicates: name IS NULL
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1004), (int64 id=1008))}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1008), <end>)}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
predicates: CAST(sin(id) AS BOOLEAN) = TRUE
kudu predicates: name IS NULL
row-size=28B cardinality=0
====
# Derived EmptySets for Kudu
select * from functional_kudu.alltypes t
where t.int_col = 10 and t.bigint_col = t.int_col * 100 and
CAST(t.int_col as BIGINT) = t.bigint_col
---- PLAN
PLAN-ROOT SINK
|
00:EMPTYSET
====
# IMPALA-3856: KuduScanNode crash when pushing predicates including a cast
select o_orderkey from tpch_kudu.orders where o_orderkey < 10.0 order by 1
---- PLAN
PLAN-ROOT SINK
|
01:SORT
| order by: o_orderkey ASC
| row-size=8B cardinality=150.00K
|
00:SCAN KUDU [tpch_kudu.orders]
predicates: o_orderkey < 10.0
row-size=8B cardinality=150.00K
====
# IMPALA-3871: Casting literals to TIMESTAMP throw when pushed to KuduScanNode
select t.c from
(select cast(o_orderdate as timestamp) c from tpch_kudu.orders where o_orderkey < 10) t
where t.c <= cast('1995-01-01 00:00:00' as timestamp) order by c
---- PLAN
PLAN-ROOT SINK
|
01:SORT
| order by: c ASC
| row-size=22B cardinality=150.00K
|
00:SCAN KUDU [tpch_kudu.orders]
predicates: CAST(o_orderdate AS TIMESTAMP) <= TIMESTAMP '1995-01-01 00:00:00'
kudu predicates: o_orderkey < 10
row-size=26B cardinality=150.00K
====
# IMPALA-4213: Planner not pushing some predicates with constant exprs to Kudu
select count(*) from functional_kudu.alltypes
where id < 1475059765 + 10
and 1475059765 - 100 < id
---- PLAN
PLAN-ROOT SINK
|
01:AGGREGATE [FINALIZE]
| output: count(*)
| row-size=8B cardinality=1
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: id < 1475059775, id > 1475059665
row-size=0B cardinality=730
====
insert into table functional_kudu.alltypes
select * from functional_kudu.alltypes
---- PLAN
INSERT INTO KUDU [functional_kudu.alltypes]
|
00:SCAN KUDU [functional_kudu.alltypes]
row-size=97B cardinality=7.30K
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.alltypes]
|
02:PARTIAL SORT
| order by: KuduPartition(functional_kudu.alltypes.id) ASC NULLS LAST, id ASC NULLS LAST
| row-size=93B cardinality=7.30K
|
01:EXCHANGE [KUDU(KuduPartition(functional_kudu.alltypes.id))]
|
00:SCAN KUDU [functional_kudu.alltypes]
row-size=97B cardinality=7.30K
====
insert into table functional_kudu.testtbl
select id, name, maxzip as zip
from (
select id, max(zip) as maxzip, name
from functional_kudu.testtbl group by id, name
) as sub;
---- PLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
01:AGGREGATE [FINALIZE]
| output: max(zip)
| group by: id, name
| row-size=24B cardinality=0
|
00:SCAN KUDU [functional_kudu.testtbl]
row-size=28B cardinality=0
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.testtbl]
|
05:PARTIAL SORT
| order by: KuduPartition(id) ASC NULLS LAST, id ASC NULLS LAST
| row-size=28B cardinality=0
|
04:EXCHANGE [KUDU(KuduPartition(id))]
|
03:AGGREGATE [FINALIZE]
| output: max:merge(zip)
| group by: id, name
| row-size=24B cardinality=0
|
02:EXCHANGE [HASH(id,name)]
|
01:AGGREGATE [STREAMING]
| output: max(zip)
| group by: id, name
| row-size=24B cardinality=0
|
00:SCAN KUDU [functional_kudu.testtbl]
row-size=28B cardinality=0
====
# IMPALA-4479: Test proper folding of constant boolean exprs.
select * from functional_kudu.alltypes
where bool_col = (true and false)
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: bool_col = FALSE
row-size=97B cardinality=3.65K
====
# IMPALA-4578: Test predicate propagation for Kudu scans.
select /* +straight_join */ count(*)
from functional_kudu.alltypes a
inner join functional_kudu.alltypessmall b
on a.id = b.id
left outer join functional_kudu.alltypestiny c
on b.int_col = c.int_col
where a.id > 10 and c.int_col > 20
and cast(b.id as string) > '123'
---- PLAN
PLAN-ROOT SINK
|
05:AGGREGATE [FINALIZE]
| output: count(*)
| row-size=8B cardinality=1
|
04:HASH JOIN [LEFT OUTER JOIN]
| hash predicates: b.int_col = c.int_col
| other predicates: c.int_col > 20
| row-size=16B cardinality=1
|
|--02:SCAN KUDU [functional_kudu.alltypestiny c]
| kudu predicates: c.int_col > 20
| row-size=4B cardinality=1
|
03:HASH JOIN [INNER JOIN]
| hash predicates: a.id = b.id
| runtime filters: RF000 <- b.id, RF001 <- b.id
| row-size=12B cardinality=1
|
|--01:SCAN KUDU [functional_kudu.alltypessmall b]
| predicates: CAST(b.id AS STRING) > '123'
| kudu predicates: b.id > 10
| row-size=8B cardinality=10
|
00:SCAN KUDU [functional_kudu.alltypes a]
predicates: CAST(a.id AS STRING) > '123'
kudu predicates: a.id > 10
runtime filters: RF000 -> a.id, RF001 -> a.id
row-size=4B cardinality=10(filtered from 730)
====
# IMPALA-4662: Kudu analysis failure for NULL literal in IN list
# NULL literal in values list results in applying predicate at scan node
select id from functional_kudu.alltypestiny where
id in (1, null) and string_col in (null) and bool_col in (null) and double_col in (null)
and float_col in (null) and tinyint_col in (null) and smallint_col in (null) and
bigint_col in (null)
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.alltypestiny]
predicates: id IN (1, NULL), bigint_col IN (NULL), bool_col IN (NULL), double_col IN (NULL), float_col IN (NULL), smallint_col IN (NULL), string_col IN (NULL), tinyint_col IN (NULL)
row-size=45B cardinality=1
====
# IMPALA-3586: The operand with the Kudu scan cannot be passed through because id is
# not-nullable (primary key).
select id from functional_kudu.alltypes
union all
select id from functional.alltypes;
---- PLAN
PLAN-ROOT SINK
|
00:UNION
| pass-through-operands: 02
| row-size=4B cardinality=14.60K
|
|--01:SCAN KUDU [functional_kudu.alltypes]
| row-size=4B cardinality=7.30K
|
02:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=4B cardinality=7.30K
====
# IMPALA-3586: When both operands are Kudu scans, they should both be passed through.
select id from functional_kudu.alltypes
union all
select id from functional_kudu.alltypes;
---- PLAN
PLAN-ROOT SINK
|
00:UNION
| pass-through-operands: all
| row-size=4B cardinality=14.60K
|
|--02:SCAN KUDU [functional_kudu.alltypes]
| row-size=4B cardinality=7.30K
|
01:SCAN KUDU [functional_kudu.alltypes]
row-size=4B cardinality=7.30K
====
# Hint - noshuffle should remove the exchange node.
insert into functional_kudu.alltypes /* +noshuffle */ select * from functional.alltypes;
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.alltypes]
|
01:PARTIAL SORT
| order by: KuduPartition(functional.alltypes.id) ASC NULLS LAST, id ASC NULLS LAST
| row-size=93B cardinality=7.30K
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=89B cardinality=7.30K
====
# Hint - noclustered should remove the sort node.
insert into functional_kudu.alltypes /* +noclustered */ select * from functional.alltypes;
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.alltypes]
|
01:EXCHANGE [KUDU(KuduPartition(functional.alltypes.id))]
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=89B cardinality=7.30K
====
insert into functional_kudu.alltypes /* +noclustered,noshuffle */
select * from functional.alltypes;
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.alltypes]
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=89B cardinality=7.30K
====
# Hint - noclustered should remove the sort node from CTAS.
create /* +noclustered */ table t
primary key(id) partition by hash(id) partitions 3 stored as kudu as
select * from functional.alltypes;
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [default.t]
|
01:EXCHANGE [KUDU(KuduPartition(functional.alltypes.id))]
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=89B cardinality=7.30K
====
create /* +noclustered,noshuffle */ table t
primary key(id) partition by hash(id) partitions 3 stored as kudu as
select * from functional.alltypes;
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [default.t]
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=89B cardinality=7.30K
====
# Insert into an unpartitioned table, shouldn't partition/sort
insert into tpch_kudu.nation
select * from tpch_parquet.nation
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [tpch_kudu.nation]
|
00:SCAN HDFS [tpch_parquet.nation]
partitions=1/1 files=1 size=2.75KB
row-size=109B cardinality=25
====
# Unpartitioned table, still has an exchange due to shuffle hint.
insert into tpch_kudu.nation /* +shuffle */
select * from tpch_parquet.nation
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [tpch_kudu.nation]
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN HDFS [tpch_parquet.nation]
partitions=1/1 files=1 size=2.75KB
row-size=109B cardinality=25
====
# Unpartitioned table, clustered hint forces sort node.
insert into tpch_kudu.nation /* +clustered */
select * from tpch_parquet.nation
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [tpch_kudu.nation]
|
01:PARTIAL SORT
| order by: n_nationkey ASC NULLS LAST
| row-size=109B cardinality=25
|
00:SCAN HDFS [tpch_parquet.nation]
partitions=1/1 files=1 size=2.75KB
row-size=109B cardinality=25
====
# Unpartitioned table, no sort node without clustered hint.
insert into tpch_kudu.nation
select * from tpch_parquet.nation
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [tpch_kudu.nation]
|
00:SCAN HDFS [tpch_parquet.nation]
partitions=1/1 files=1 size=2.75KB
row-size=109B cardinality=25
====
# Partition and primary key exprs are all constant, so don't partition/sort.
insert into functional_kudu.alltypes (id)
select 1 from functional_kudu.alltypes
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.alltypes]
|
00:SCAN KUDU [functional_kudu.alltypes]
row-size=0B cardinality=7.30K
====
# Partition exprs are constant but primary key exprs aren't, so sort but don't partition.
insert into functional_kudu.jointbl (test_id, test_name, test_zip, alltypes_id)
select 1, '1', int_col, id from functional.alltypes
---- DISTRIBUTEDPLAN
INSERT INTO KUDU [functional_kudu.jointbl]
|
01:PARTIAL SORT
| order by: int_col ASC NULLS LAST, id ASC NULLS LAST
| row-size=8B cardinality=7.30K
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
row-size=8B cardinality=7.30K
====
# Decimal predicate.
select * from functional_kudu.decimal_tbl where d4 = 0.123456789;
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.decimal_tbl]
kudu predicates: d4 = 0.123456789
row-size=56B cardinality=5
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.decimal_tbl]
kudu predicates: d4 = 0.123456789
row-size=56B cardinality=5
====
# Multiple conflicting equality predicates on the Kudu table.
# EmptySetNode should be created.
select * from functional_kudu.testtbl where id = 1 and id = 10
---- PLAN
PLAN-ROOT SINK
|
00:EMPTYSET
---- SCANRANGELOCATIONS
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
00:EMPTYSET
====
# Query with "limit 0" on the Kudu table
# EmptySetNode should be created.
select * from functional_kudu.testtbl limit 0
---- PLAN
PLAN-ROOT SINK
|
00:EMPTYSET
---- SCANRANGELOCATIONS
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
00:EMPTYSET
====
# Multiple redundant equality predicates on the Kudu table.
# They should be deduplicated.
select * from functional_kudu.testtbl where name = 'Smith' and name = 'Smith'
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.testtbl]
kudu predicates: name = 'Smith'
row-size=28B cardinality=0
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1004), (int64 id=1008))}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [(int64 id=1008), <end>)}
ScanToken{table-name=impala::functional_kudu.testtbl, range-partition: [<start>, (int64 id=1004))}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.testtbl]
kudu predicates: name = 'Smith'
row-size=28B cardinality=0
====
# Redundant = and "is not distinct from" predicates.
# They are same and should be deduplicated.
select count(*) from tpch_kudu.lineitem
where l_orderkey = 1 and l_orderkey is not distinct from 1 and
l_partkey = 1 and l_suppkey = 1;
---- PLAN
PLAN-ROOT SINK
|
01:AGGREGATE [FINALIZE]
| output: count(*)
| row-size=8B cardinality=1
|
00:SCAN KUDU [tpch_kudu.lineitem]
kudu predicates: l_orderkey = 1, l_partkey = 1, l_suppkey = 1
row-size=0B cardinality=1
---- SCANRANGELOCATIONS
NODE 0:
ScanToken{table-name=impala::tpch_kudu.lineitem, hash-partition-buckets: [3]}
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
03:AGGREGATE [FINALIZE]
| output: count:merge(*)
| row-size=8B cardinality=1
|
02:EXCHANGE [UNPARTITIONED]
|
01:AGGREGATE
| output: count(*)
| row-size=8B cardinality=1
|
00:SCAN KUDU [tpch_kudu.lineitem]
kudu predicates: l_orderkey = 1, l_partkey = 1, l_suppkey = 1
row-size=0B cardinality=1
====
# DATE predicate.
select * from functional_kudu.date_tbl where date_col = DATE "1970-01-01";
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.date_tbl]
kudu predicates: date_col = DATE '1970-01-01'
row-size=12B cardinality=1
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.date_tbl]
kudu predicates: date_col = DATE '1970-01-01'
row-size=12B cardinality=1
====
# BIGINT predicate.
select * from functional_kudu.alltypes where bigint_col = 1;
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: bigint_col = 1
row-size=97B cardinality=730
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: bigint_col = 1
row-size=97B cardinality=730
====
# FLOAT predicate.
select * from functional_kudu.alltypes where float_col = 1.0;
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: float_col = 1.0
row-size=97B cardinality=730
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: float_col = 1.0
row-size=97B cardinality=730
====
# DOUBLE predicate.
select * from functional_kudu.alltypes where double_col = 1.0;
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: double_col = 1.0
row-size=97B cardinality=730
---- DISTRIBUTEDPLAN
PLAN-ROOT SINK
|
01:EXCHANGE [UNPARTITIONED]
|
00:SCAN KUDU [functional_kudu.alltypes]
kudu predicates: double_col = 1.0
row-size=97B cardinality=730
====
# BINARY predicate.
select * from functional_kudu.binary_tbl where binary_col=cast("a" as binary);
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.binary_tbl]
kudu predicates: binary_col = 'a'
row-size=36B cardinality=0
====
# BINARY predicate.
# Non-ASCII strings cannot be pushed down to Kudu (IMPALA-10349)
select * from functional_kudu.binary_tbl where binary_col=cast("á" as binary);
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.binary_tbl]
predicates: binary_col = CAST('á' AS BINARY)
row-size=36B cardinality=0
====
# BINARY predicate.
# Not valid utf8 strings cannot be pushed down to Kudu (IMPALA-10349)
select * from functional_kudu.binary_tbl where binary_col=cast(unhex("aa") as binary);
---- PLAN
PLAN-ROOT SINK
|
00:SCAN KUDU [functional_kudu.binary_tbl]
predicates: binary_col = CAST(unhex('aa') AS BINARY)
row-size=36B cardinality=0
====