impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5347: reduce codegen overhead of timestamp trunc()
Date Mon, 05 Jun 2017 19:17:55 GMT
Tim Armstrong has uploaded a new change for review.

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

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, 275 insertions(+), 227 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I222258f51b2093a38929df847fdb5d25bb9aafc3
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>

Mime
View raw message