You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org> on 2023/05/02 12:41:22 UTC

[Impala-ASF-CR] IMPALA-12111: Speed up DATE to STRING conversion

Hello Impala Public Jenkins, 

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

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

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

Change subject: IMPALA-12111: Speed up DATE to STRING conversion
......................................................................

IMPALA-12111: Speed up DATE to STRING conversion

Before this patch DATE to STRING conversion seemed slow in
general (slower than TIMESTAMP to STRING) which was visible
especially on the coordinator where result DATEs are returned
as STRINGs in HS2/Beeswax and the conversion happens on a
single thread.

The main cause seems to be using std::stringstream in
DateValue::ToString(). The patch switches to using
impala::TimestampParser::Format() similarly to TimestampValue.

HS2 result set generation is also changed to avoid using
stringstream for TIMESTAMP/DATE and call ToString() directly.

Benchmarks:
- Added benchmark that shows ~4x impovement for DataValue.ToString().
- Manually tested EE scanerio: RowMaterializationTimer dropped from
  1.7s to 0.6s in
  impala-shell -B -q "select cast(l_shipdate as date) from tpch_parquet.lineitem;" > /dev/null

Testing:
- ran core tests

Change-Id: I9a233ae92b1461fc5c47d8345667e36c2632f4c4
---
M be/src/benchmarks/date-benchmark.cc
M be/src/runtime/date-value.cc
M be/src/runtime/datetime-simple-date-format-parser.h
M be/src/runtime/raw-value.cc
M be/src/service/hs2-util.cc
5 files changed, 87 insertions(+), 29 deletions(-)


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9a233ae92b1461fc5c47d8345667e36c2632f4c4
Gerrit-Change-Number: 19829
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>