mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
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 EE regression tests for the UPDATE and MERGE cases in iceberg-update-basic.test and iceberg-merge.test Change-Id: Id86638c8d6d86062c68cc9d708ec9c7b0a4e95eb Reviewed-on: http://gerrit.cloudera.org:8080/22508 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>