impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) Inject precision and scale constants for all decimal builtins
Date Fri, 18 Mar 2016 00:34:21 GMT
Hello Skye Wanderman-Milne,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#10).

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 time was reduced
from ~18s of CPU time to ~10s of CPU time: an 80% speedup.

Change-Id: I7b7d1485f357ba88517ca15c5c7428c0ffe25dfd
---
M be/src/codegen/llvm-codegen.cc
M be/src/exec/partitioned-aggregation-node.cc
M be/src/exprs/aggregate-functions.cc
M be/src/exprs/conditional-functions-ir.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-codegen-test.cc
M be/src/exprs/expr.cc
M be/src/exprs/expr.h
M be/src/exprs/math-functions.cc
M be/src/udf/udf-internal.h
M be/src/udf/udf.h
14 files changed, 336 insertions(+), 258 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7b7d1485f357ba88517ca15c5c7428c0ffe25dfd
Gerrit-PatchSet: 10
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Huaisi Xu <hxu@cloudera.com>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Skye Wanderman-Milne <skye@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>

Mime
View raw message