Daniel Becker has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20970
Change subject: IMPALA-12763: Union with string struct crashes in ASAN ...................................................................... IMPALA-12763: Union with string struct crashes in ASAN In ASAN builds, if we UNION ALL an array containing a struct of a string with itself, Impala crashes. This is how to reproduce it: In Hive: create table su (arr ARRAY<STRUCT<s: STRING>>) stored as parquet; insert into su values (array(named_struct("s", "A"))); In Impala: select 1, arr from su union all select 2, arr from su; The ASAN error message indicates a heap-use-after-free. Normally, UNIONs of structs are not supported yet (see IMPALA-10752), but if the struct is inside an array it is allowed now. This was probably not intentional and it leads to the above error, so this change disables structs in unions completely, including embedded structs. Testing: - adjusted existing tests - added a query that tests that types with embedded structs are not allowed in a UNION statement, in mixed-collections-and-structs.test Change-Id: Id728f1254b74636be594a33313a478b0b77c7ae4 --- M fe/src/main/java/org/apache/impala/analysis/Analyzer.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java M testdata/workloads/functional-query/queries/QueryTest/mixed-collections-and-structs.test M testdata/workloads/functional-query/queries/QueryTest/nested-array-in-select-list.test M testdata/workloads/functional-query/queries/QueryTest/nested-map-in-select-list.test M testdata/workloads/functional-query/queries/QueryTest/struct-in-select-list.test 6 files changed, 38 insertions(+), 8 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/70/20970/1 -- To view, visit http://gerrit.cloudera.org:8080/20970 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id728f1254b74636be594a33313a478b0b77c7ae4 Gerrit-Change-Number: 20970 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Becker <daniel.bec...@cloudera.com>