Files
impala/testdata/workloads/functional-query/queries/QueryTest/decimal_avro.test
Michael Ho df2fc08d22 IMPALA-3206: Enable codegen for AVRO_DECIMAL
This change adds the missing switch statement in
CodegenReadScalar() for AVRO_DECIMAL so that we will
also codegen if an avro table contains AVRO_DECIMAL.
With this change, the following query improves by 37.5%,
going from 8s to 5s:

select count(distinct l_linenumber), avg(l_extendedprice), max(l_discount), min(l_tax) from tpch15_avro.lineitem;

This change also un-inlines BitUtil::ByteSwap() as the
third argument 'len' is not compilation constant for
all call sites.

Change-Id: I51adf0c1ba76e055f31ccb0034a0d23ea2afb30e
Reviewed-on: http://gerrit.cloudera.org:8080/3489
Reviewed-by: Michael Ho <kwho@cloudera.com>
Tested-by: Internal Jenkins
2016-07-14 19:04:44 +00:00

56 lines
863 B
Plaintext

====
---- QUERY
select * from avro_decimal_tbl
---- RESULTS
'Tom',234.79
'Beck',77.34
'Snow',55.71
'Mary',4.33
'Cluck',5.96
'Tom',12.25
'Mary',33.33
'Tom',19.00
'Beck',3.15
'Beck',79.90
---- TYPES
STRING, DECIMAL
====
---- QUERY
select name from avro_decimal_tbl
---- RESULTS
'Tom'
'Beck'
'Snow'
'Mary'
'Cluck'
'Tom'
'Mary'
'Tom'
'Beck'
'Beck'
---- TYPES
STRING
====
---- QUERY
select count(*) from avro_decimal_tbl
---- RESULTS
10
---- TYPES
BIGINT
====
---- QUERY
select l_shipmode, count(distinct l_quantity), avg(l_extendedprice), max(l_discount), ndv(l_tax)
from tpch_avro_snap.lineitem
group by l_shipmode
---- RESULTS
'SHIP',50,38267.37,0.10,9
'REG AIR',50,38268.41,0.10,9
'TRUCK',50,38209.82,0.10,9
'RAIL',50,38269.81,0.10,9
'FOB',50,38246.23,0.10,9
'MAIL',50,38224.29,0.10,9
'AIR',50,38299.98,0.10,9
----TYPES
STRING,DECIMAL,DECIMAL,DECIMAL,DECIMAL
====