Csaba Ringhofer has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/17374


Change subject: IMPALA-10691: Fix crash in CAST FORMAT with MT_DOP>1
......................................................................

IMPALA-10691: Fix crash in CAST FORMAT with MT_DOP>1

The issue occurs when a CastFormatExpr is shared among threads and
multiple threads call its OpenEvaluator(). Later calls delete the
DateTimeFormatContext created by older calls which makes
fn_ctx->GetFunctionState() a dangling pointer. This can only happen
with MT_DOP>1, because scanner threads call OpenEvaluator() with
THREAD_LOCAL and return early without modifying anything.

Testing:
- added a regression test

Change-Id: I501c8a184591b1c836b2ca4cada1f2117f9f5c99
---
M be/src/exprs/cast-format-expr.cc
M be/src/exprs/cast-format-expr.h
M 
testdata/workloads/functional-query/queries/QueryTest/cast_format_from_table.test
3 files changed, 23 insertions(+), 9 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I501c8a184591b1c836b2ca4cada1f2117f9f5c99
Gerrit-Change-Number: 17374
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <[email protected]>

Reply via email to