mirror of
https://github.com/apache/impala.git
synced 2026-01-01 09:00:42 -05:00
Change-Id: Idea277ea2d20c47b2a81b0f2f06c48455de2ea45 Reviewed-on: http://gerrit.ent.cloudera.com:8080/1780 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: jenkins
121 lines
2.2 KiB
Plaintext
121 lines
2.2 KiB
Plaintext
====
|
|
---- QUERY
|
|
# hdfs table sink
|
|
drop table if exists udfinserttest;
|
|
create table udfinserttest (udf_was_opened boolean);
|
|
|
|
insert overwrite table udfinserttest
|
|
select validate_open(int_col) from functional.alltypestiny limit 1;
|
|
====
|
|
---- QUERY
|
|
select * from udfinserttest;
|
|
---- TYPES
|
|
boolean
|
|
---- RESULTS
|
|
true
|
|
====
|
|
---- QUERY
|
|
# merge node
|
|
select validate_open(0);
|
|
---- TYPES
|
|
boolean
|
|
---- RESULTS
|
|
true
|
|
====
|
|
---- QUERY
|
|
# merge node with conjuncts
|
|
select validate_open(0) from functional.alltypestiny where validate_open(0) limit 1;
|
|
---- TYPES
|
|
boolean
|
|
---- RESULTS
|
|
true
|
|
====
|
|
---- QUERY
|
|
# hdfs scan node
|
|
select count(*) from functional.alltypestiny where validate_open(int_col);
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
8
|
|
====
|
|
---- QUERY
|
|
# aggregation
|
|
select validate_open(int_col), count(*) from functional.alltypestiny
|
|
group by validate_open(int_col)
|
|
---- TYPES
|
|
boolean, bigint
|
|
---- RESULTS
|
|
true,8
|
|
====
|
|
---- QUERY
|
|
# aggregation
|
|
select count(if(validate_open(int_col), null, 1)) from functional.alltypestiny
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
0
|
|
====
|
|
---- QUERY
|
|
# aggregation (conjuncts)
|
|
select int_col, count(*) from functional.alltypestiny
|
|
group by int_col having validate_open(int_col)
|
|
---- TYPES
|
|
int, bigint
|
|
---- RESULTS
|
|
0,4
|
|
1,4
|
|
====
|
|
---- QUERY
|
|
# hash join
|
|
select b.bool_col from functional.alltypestiny a join functional.alltypestiny b
|
|
on validate_open(a.int_col) = b.bool_col
|
|
where a.month = 3 and b.month = 3
|
|
---- TYPES
|
|
boolean
|
|
---- RESULTS
|
|
true
|
|
true
|
|
====
|
|
---- QUERY
|
|
# hash join (other join predicate)
|
|
select count(*) from functional.alltypestiny a left outer join functional.alltypessmall b
|
|
on (a.bigint_col = b.bigint_col and validate_open(a.int_col))
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
96
|
|
====
|
|
---- QUERY
|
|
# hash join (other predicate)
|
|
select count(*) from functional.alltypestiny a left outer join functional.alltypessmall b
|
|
on (a.bigint_col = b.bigint_col)
|
|
where validate_open(a.int_col) = validate_open(b.int_col)
|
|
and validate_open(a.int_col)
|
|
---- TYPES
|
|
bigint
|
|
---- RESULTS
|
|
96
|
|
====
|
|
---- QUERY
|
|
# coordinator
|
|
select validate_open(int_col) from functional.alltypestiny;
|
|
---- TYPES
|
|
boolean
|
|
---- RESULTS
|
|
true
|
|
true
|
|
true
|
|
true
|
|
true
|
|
true
|
|
true
|
|
true
|
|
====
|
|
---- QUERY
|
|
# FE
|
|
select bool_col from functional.alltypestiny limit if(validate_open(1), 0, 1)
|
|
---- TYPES
|
|
boolean
|
|
---- RESULTS
|
|
====
|