Hello Michael Ho,

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

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

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

Change subject: IMPALA-5347: reduce codegen overhead of timestamp trunc()
......................................................................

IMPALA-5347: reduce codegen overhead of timestamp trunc()

Trunc has many implementations that are switched between based on a
string argument. Before this patch all implementations were compiled for
every call to trunc(), which added a lot of unnecessary codegen time.

This patch avoids the problem by moving the implementation out of the
cross-compiled code.

Testing:
Ran expr-test.

I ran the repro query from IMPALA-5347 and verified that codegen time
was significantly reduced from ~1.4s to ~.35s.

Perf:
I ran the following targeted benchmark:
  set num_nodes=1;
  set num_scanner_threads=1;
  select count(*) from lineitem where trunc(l_shipdate, 'yy') >=
  '1998-01-01'

The end-to-end query latency was reduced to 0.52s from 0.72s on
average. The time spent in the scanner increased slightly from
around 390ms to around 410ms. This seems like a good-tradeoff.

Change-Id: I222258f51b2093a38929df847fdb5d25bb9aafc3
---
M be/src/exprs/CMakeLists.txt
M be/src/exprs/udf-builtins-ir.cc
A be/src/exprs/udf-builtins.cc
M be/src/exprs/udf-builtins.h
4 files changed, 277 insertions(+), 229 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/81/7081/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7081
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I222258f51b2093a38929df847fdb5d25bb9aafc3
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>

Reply via email to