Daniel Becker has uploaded a new patch set (#5). ( 
http://gerrit.cloudera.org:8080/22508 )

Change subject: IMPALA-13770: Updating Iceberg tables with UDFs crashes Impala
......................................................................

IMPALA-13770: Updating Iceberg tables with UDFs crashes Impala

When using a native UDF in the target value of an UPDATE statement or in
a filter predicate or target value of a MERGE statement, Impala crashes
with the following DCHECK:

  be/src/exprs/expr.cc:47 47 DCHECK(cache_entry_ == nullptr);

This DCHECK is in the destructor of Expr, and it fires because Close()
has not been called for the expression. In the UPDATE case this is
caused by MultiTableSinkConfig: it creates child DataSinkConfig objects
but does not call Close() on them, and consequently these child sink
configs do not call Close() on their output expressions.
In the MERGE case it is because various expressions are not closed in
IcebergMergeCase and IcebergMergeNode.

This patch fixes the issue by overriding Close() in MultiTableSinkConfig,
calling Close() on the child sinks as well as closing the expressions in
IcebergMergeCase and IcebergMergeNode.

Testing:
 - Added an EE regression tests for the UPDATE and MERGE cases in
   iceberg-update-basic.test

Change-Id: Id86638c8d6d86062c68cc9d708ec9c7b0a4e95eb
---
M be/src/exec/iceberg-merge-node.cc
M be/src/exec/iceberg-merge-sink.cc
M be/src/exec/iceberg-merge-sink.h
M be/src/exec/multi-table-sink.cc
M be/src/exec/multi-table-sink.h
M 
testdata/workloads/functional-query/queries/QueryTest/iceberg-update-basic.test
M tests/query_test/test_iceberg.py
7 files changed, 67 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/08/22508/5
--
To view, visit http://gerrit.cloudera.org:8080/22508
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id86638c8d6d86062c68cc9d708ec9c7b0a4e95eb
Gerrit-Change-Number: 22508
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Becker <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to