impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4594: WriteSlot and CodegenWriteSlot handle escaped NULL slots differently
Date Tue, 06 Dec 2016 08:10:01 GMT
Sailesh Mukil has uploaded a new change for review.

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

Change subject: IMPALA-4594: WriteSlot and CodegenWriteSlot handle escaped NULL slots differently
......................................................................

IMPALA-4594: WriteSlot and CodegenWriteSlot handle escaped NULL slots differently

CodegenWriteSlot() receives negative length values for the lengths of
the slots passed to it if the slots contains escape characters. This
differs from the behavior of WriteSlot() where the length passed to
it is always positive.

Due to this, the codegen generated code to check if the slot is NULL
or not never marks a slot NULL, when the slot contains the default
NULL pattern '\N' because the length for that slot is negative (due
to the escape character) and the IsNullString() and
IrGenericIsNullString() functions always returns false for these
cases, even though the slot is a NULL slot.

Things worked fine because of some incorrect code in CodegenWriteSlot
that marks invalid slots and NULL slots as NULL. Due to this code,
invalid slots were not marked as invalid and did not return an error.
Instead they were just sliently marked as NULL.

This patch makes sure that only positive lengths are passed to
CodegenWriteSlot() so that NULL checking is correct and it also
makes sure that invalid slots are not silently marked as NULL.

Testing: Re-enabled an older hdfs-scan-node-errors test. Formatted
it to fit new error message format after IMPALA-3859 and IMPALA-3895.

Change-Id: I858e427ad7c2b2da8c2bb657be06b7443655781f
---
M be/src/exec/hdfs-scanner.cc
M be/src/exec/text-converter.cc
M testdata/workloads/functional-query/queries/DataErrorsTest/hdfs-scan-node-errors.test
3 files changed, 68 insertions(+), 66 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I858e427ad7c2b2da8c2bb657be06b7443655781f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sailesh@cloudera.com>

Mime
View raw message