mirror of
https://github.com/apache/impala.git
synced 2025-12-30 21:02:41 -05:00
Currently we do not codegen CHAR types. This change checks for CHAR literals in a expr and disables codegen. Change-Id: I7e4e27350c53bc69ce412a004e392e7480214f73 Reviewed-on: http://gerrit.cloudera.org:8080/9102 Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Tested-by: Impala Public Jenkins
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
====
|
|
---- QUERY
|
|
# alltypes has 7300 rows - codegen should be enabled if there
|
|
# are < 1000 backend daemons.
|
|
set disable_codegen_rows_threshold=8;
|
|
select count(*) from alltypes t1
|
|
join alltypestiny t2 on t1.id = t2.id
|
|
---- RESULTS
|
|
8
|
|
---- TYPES
|
|
bigint
|
|
---- RUNTIME_PROFILE
|
|
# Verify that codegen was enabled for join and scan
|
|
row_regex: .*Build Side Codegen Enabled.*
|
|
row_regex: .*TEXT Codegen Enabled.*
|
|
====
|
|
---- QUERY
|
|
# alltypes has 7300 rows - codegen should be disabled regardless
|
|
# of # of backend impala daemons.
|
|
set disable_codegen_rows_threshold=8000;
|
|
select count(*) from alltypes t1
|
|
join alltypestiny t2 on t1.id = t2.id
|
|
---- RESULTS
|
|
8
|
|
---- TYPES
|
|
bigint
|
|
---- RUNTIME_PROFILE
|
|
# Verify that codegen was disabled
|
|
row_regex: .*Codegen Disabled: disabled due to optimization hints.*
|
|
====
|
|
---- QUERY
|
|
# IMPALA-6435: We do not codegen char columns. This fix checks for a
|
|
# CHAR type literal in the expr and disables codegen. This query will crash
|
|
# impala without the fix.
|
|
select count(*) from (
|
|
select cast('a' as char(4)) as s from functional.alltypestiny
|
|
union all
|
|
select cast('a' as char(4)) as s from functional.alltypestiny
|
|
union all
|
|
select cast(NULL as char(4)) as s from functional.alltypestiny
|
|
) t
|
|
---- RESULTS
|
|
24
|
|
---- TYPES
|
|
bigint
|
|
====
|