mirror of
https://github.com/apache/impala.git
synced 2026-01-31 09:00:19 -05:00
Running the query
select inner_arr.ITEM
from functional_orc_def.complextypestbl_non_transactional.nested_struct.c.d.ITEM
as inner_arr;
crashes Impala because in OrcStructReader::NumElements() 'vbatch_' is
NULL and we dereference it.
This commit adds a NULL check and if 'vbatch_' is NULL, NumElements()
returns 0.
Testing:
- added a regression test in
'testdata/workloads/functional-query/queries/QueryTest/struct-in-select-list.test'
that runs the above query.
Change-Id: I19cea7afdd1b3542a20a81b9f212fa320f3c1427
Reviewed-on: http://gerrit.cloudera.org:8080/18007
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>