impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4518: CopyStringVal() doesn't copy null string
Date Wed, 23 Nov 2016 07:48:37 GMT
Michael Ho has uploaded a new change for review.

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

Change subject: IMPALA-4518: CopyStringVal() doesn't copy null string
......................................................................

IMPALA-4518: CopyStringVal() doesn't copy null string

Previously, CopyStringVal() mistakenly copies a null
StringVal as an emtpy string (i.e. a non-null string
with zero length). This change fixes the problem by
distinguishing between these two cases in CopyStringVal()
and handles them properly. Also added a test case for it.

This problem only started showing up recently due to
commit 51268c053ffe41dc1aa9f1b250878113d4225258 which
calls CopyStringVal() in OffsetFnInit(). All other
pre-existing callers of CopyStringVal() before that
commit checks if 'src' is null before calling it so
the problem never showed up. In that sense, this is
a latent bug exposed by the aforementioned commit.

Change-Id: I3a5b9349dd08556eba5cfedc8c0063cc59f5be03
---
M be/src/exprs/aggregate-functions-ir.cc
M testdata/workloads/functional-query/queries/QueryTest/analytic-fns.test
2 files changed, 20 insertions(+), 6 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a5b9349dd08556eba5cfedc8c0063cc59f5be03
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <kwho@cloudera.com>

Mime
View raw message