Daniel Becker has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19597
Change subject: IMPALA-9551: (Addendum) disable sorting if select list contains struct containing collection ...................................................................... IMPALA-9551: (Addendum) disable sorting if select list contains struct containing collection Sorting is not supported if the select list contains collection columns (see IMPALA-10939). IMPALA-9551 added support for mixed complex types (collections in structs and structs in collections). However, the case of having structs containing collections in the select list when sorting was not handled explicitly. The query select id, struct_contains_arr from collection_struct_mix order by id; resulted in ERROR: IllegalStateException: null After this change, a meaningful error message is given (the same as in the case of pure collection columns): ERROR: IllegalStateException: Sorting is not supported if the select list contains collection columns. The check for collections in the sorting tuple was moved to an earlier stage of analysis from SingleNodePlanner to QueryStmt, as otherwise we would hit another precondition check first in the case of structs containing collections. Testing: - Added tests in mixed-collections-and-structs.test that test sorting when a struct in the select list contains an array and a map respectively. Change-Id: I09ac27cba34ee7c6325a7e7895f3a3c9e1a088e5 --- M fe/src/main/java/org/apache/impala/analysis/QueryStmt.java M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java M testdata/workloads/functional-query/queries/QueryTest/mixed-collections-and-structs.test 3 files changed, 33 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/97/19597/1 -- To view, visit http://gerrit.cloudera.org:8080/19597 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I09ac27cba34ee7c6325a7e7895f3a3c9e1a088e5 Gerrit-Change-Number: 19597 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Becker <[email protected]>
