Daniel Becker has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20752
Change subject: IMPALA-12001: Informative error message for complex types with DISTINCT ...................................................................... IMPALA-12001: Informative error message for complex types with DISTINCT Before this change, queries with SELECT DISTINCT on a complex type failed. With structs, we got a FE exception: use functional_parquet; select distinct(struct_val) from alltypes_structs; ERROR: IllegalStateException: null With collections the BE hits a DCHECK and crashes: use functional_parquet; select distinct(arr1) from complextypes_arrays; Socket error 104: [Errno 104] Connection reset by peer Aggregate functions with complex DISTINCT parameters also failed without a clear error message. For example: select count(distinct struct_val) from alltypes_structs; select count(distinct arr1) from complextypes_arrays; To support DISTINCT for complex types we would need to implement equality and hash for them. We are not planning to do it in the near future, so this change introduces informative error messages in these cases. Testing: - added test queries for SELECT DISTINCT and SELECT COUNT(DISTINCT ...) with arrays, maps and structs, expecting the correct error messages. Change-Id: Ibe2642d1683a10fd05a95e2ad8470d16f0d5242c --- M fe/src/main/java/org/apache/impala/analysis/MultiAggregateInfo.java M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java 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/nested-struct-in-select-list.test 5 files changed, 53 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/52/20752/2 -- To view, visit http://gerrit.cloudera.org:8080/20752 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe2642d1683a10fd05a95e2ad8470d16f0d5242c Gerrit-Change-Number: 20752 Gerrit-PatchSet: 2 Gerrit-Owner: Daniel Becker <[email protected]>
