You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2017/06/27 17:36:38 UTC

[Impala-ASF-CR] IMPALA-5560: always store CHAR(N) inline in tuple

Tim Armstrong has uploaded a new patch set (#2).

Change subject: IMPALA-5560: always store CHAR(N) inline in tuple
......................................................................

IMPALA-5560: always store CHAR(N) inline in tuple

This is done to simplify the CHAR(N) logic. I believe this is overall an
improvement - any benefits of the out-of-line storage that motivated
this optimisation originally were outweighed by the added complexity.

This also avoids IMPALA-5559 (fe/be have different notions of var-len),
which will unblock IMPALA-3200.

Pros:
* Reduce the number of code paths and improve test coverage.
  (e.g. avoids IMPALA-5559: fe/be have different notions of var-len)
* Reduced memory to store non-NULL data (saves 12-byte StringValue)
* Fewer branches in code -> save CPU cycles.
* If CHAR(N) performance is important, reduced complexity makes it
  easier to implement codegen.

Cons:
* Requires N bytes to store a NULL value.
* May hurt cache locality (although this is speculative in my mind).

The change is mostly mechanical - I removed MAX_CHAR_INLINE_LENGTH
and then removed branches that depended on that.

Testing:
Ran exhaustive build.

Change-Id: I9c0b823ccff6b0c37f5267c548d096c29b8caac3
---
M be/src/exec/hash-table.cc
M be/src/exec/hdfs-avro-scanner-test.cc
M be/src/exec/hdfs-parquet-table-writer.cc
M be/src/exec/hdfs-text-table-writer.cc
M be/src/exec/parquet-column-readers.cc
M be/src/exprs/agg-fn-evaluator.cc
M be/src/exprs/anyval-util.h
M be/src/exprs/scalar-expr-evaluator.cc
M be/src/exprs/slot-ref.cc
M be/src/runtime/raw-value-ir.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.inline.h
M be/src/runtime/string-value.h
M be/src/runtime/string-value.inline.h
M be/src/runtime/types.h
M be/src/service/fe-support.cc
M be/src/service/hs2-util.cc
M fe/src/main/java/org/apache/impala/catalog/ScalarType.java
18 files changed, 55 insertions(+), 118 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9c0b823ccff6b0c37f5267c548d096c29b8caac3
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>