Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/21157 )

Change subject: IMPALA-12926: Refactor BINARY type handling in the backend
......................................................................

IMPALA-12926: Refactor BINARY type handling in the backend

Currently the STRING and BINARY types are not distinguished in most of
the backend. In contrast to the frontend, PrimitiveType::TYPE_BINARY is
not used there at all, TYPE_STRING being used instead. This is to ensure
that everything that works for STRING also works for BINARY. So far only
file readers and writers have had to handle them differently, and they
have access to ColumnDescriptors which contain AuxColumnType fields that
differentiate these two types.

However, only top-level columns have ColumnDescriptors. Adding support
for BINARYs within complex types (see IMPALA-11491 and IMPALA-12651)
necessitates adding type information about STRING vs BINARY to embedded
fields as well.

Using PrimitiveType::TYPE_BINARY would probably be the cleanest solution
but it would affect huge parts of the code as TYPE_BINARY would have to
be added to hundreds of switch statements and this would be error prone.

Instead, this change introduces a new field in ColumnType: 'is_binary',
which is true if the type is a BINARY and false otherwise. We keep using
TYPE_STRING as the PrimitiveType of the ColumnType for BINARYs. This way
full type information is present in ColumnType but code that does not
differentiate between STRING and BINARY will continue to work for
BINARY.

With this change, AuxColumnType is no longer needed and is removed.

See also IMPALA-5323 - https://gerrit.cloudera.org/#/c/18868/. This
change is a very similar implementation of the same refactoring, except
for the Kudu related parts.

Testing:
 - added an extra test in binary-type.test

Change-Id: Icedbad4e24a46e7731de11cc14218761d11fb86f
Reviewed-on: http://gerrit.cloudera.org:8080/21157
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/exec/file-metadata-utils.cc
M be/src/exec/hbase/hbase-scan-node.cc
M be/src/exec/hbase/hbase-table-writer.cc
M be/src/exec/hdfs-scanner-ir.cc
M be/src/exec/hdfs-scanner.cc
M be/src/exec/hdfs-text-table-writer.cc
M be/src/exec/json/hdfs-json-scanner.cc
M be/src/exec/parquet/hdfs-parquet-table-writer.cc
M be/src/exec/parquet/parquet-metadata-utils.cc
M be/src/exec/parquet/parquet-metadata-utils.h
M be/src/exec/rcfile/hdfs-rcfile-scanner.cc
M be/src/exec/text-converter.cc
M be/src/exec/text-converter.h
M be/src/exec/text-converter.inline.h
M be/src/exec/text/hdfs-text-scanner.cc
M be/src/runtime/descriptors.cc
M be/src/runtime/descriptors.h
M be/src/runtime/types.cc
M be/src/runtime/types.h
M be/src/service/hs2-util.cc
M testdata/workloads/functional-query/queries/QueryTest/binary-type.test
21 files changed, 80 insertions(+), 111 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/21157
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icedbad4e24a46e7731de11cc14218761d11fb86f
Gerrit-Change-Number: 21157
Gerrit-PatchSet: 7
Gerrit-Owner: Daniel Becker <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>

Reply via email to