Tim Armstrong has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2535

Change subject: Inject precision and scale constants for all decimal builtins
......................................................................

Inject precision and scale constants for all decimal builtins

Decimal functions already had some codegen support, but in many cases
they would still have to to branch on the precision and scale at
runtime. The patch uses the Expr::GetConstant() mechanism to inject
tese constants into decimal cross-compiled code. All uses of
FunctionContext::GetArgType() to get decimal precision and scale
in operators, functions, and aggregated functions have been replaced
with Expr::GetConstant().

This required adding support for Expr::GetConstant() to UDAFs and
adding support for getting precision and scale information from
Expr::GetConstant().

This leads to significant speedups for many decimal operations.
E.g. in TPC-H Q1 scale factor 20 the aggregation went from
~18s of CPU time to ~10s of CPU time: an 80% speedup.

Change-Id: I7b7d1485f357ba88517ca15c5c7428c0ffe25dfd
---
M be/src/exec/partitioned-aggregation-node.cc
M be/src/exprs/aggregate-functions.cc
M be/src/exprs/decimal-functions.cc
M be/src/exprs/decimal-functions.h
M be/src/exprs/decimal-operators.cc
M be/src/exprs/decimal-operators.h
M be/src/exprs/expr.cc
M be/src/exprs/expr.h
M be/src/exprs/scalar-fn-call.cc
M be/src/udf/udf-internal.h
M be/src/udf/udf.h
11 files changed, 306 insertions(+), 224 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/35/2535/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2535
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b7d1485f357ba88517ca15c5c7428c0ffe25dfd
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <[email protected]>

Reply via email to