IMPALA-2514: DCHECK on destroying an ExprContext

If an error occurs while processing an Expr, only that ExprContext
is closed and the others are still left open. This leads to a DCHECK
during teardown of the query because the destructor of ExprContext
expects it to be closed.

In this patch, we close all the ExprContexts if an error occurs in any
one.

Change-Id: Ic748bfd213511c314c59594d075048f6c6d82073
Reviewed-on: http://gerrit.cloudera.org:8080/1222
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Internal Jenkins
This commit is contained in:
Sailesh Mukil
2015-10-09 11:41:39 -07:00
committed by Harrison Sheinblatt
parent b669800432
commit c66ea8ad03
2 changed files with 13 additions and 2 deletions

View File

@@ -173,3 +173,10 @@ select count(*) from alltypesagg where day not in (1, 2, null)
---- TYPES
BIGINT
====
---- QUERY
# IMPALA-2514: DCHECK on ExprContext::Close()
select int_col from functional.alltypes
where year=date_part('yyyyMMMdd hh:mm:ss', current_timestamp());
---- CATCH
InternalException: invalid extract field: yyyyMMMdd hh:mm:ss
====