Daniel Becker has uploaded a new patch set (#12). ( http://gerrit.cloudera.org:8080/18736 )
Change subject: IMPALA-10918: Allow map type in SELECT list ...................................................................... IMPALA-10918: Allow map type in SELECT list Adding support for MAP types in the select list. An example of how maps are printed: {"k1":2,"k2":null} Nested collection types (maps and arrays) are supported in any combination. However, structs in collections and collections in structs are not supported. Limitations (other than map support) as described in the commit for IMPALA-9498 still apply, the following are to be implemented later: - Unify HS2 / Beeswax logic with the way STRUCTs are handled. This could be done in a "final" logic that can handle STRUCTS/ARRAYS nested to each other - Implement "deep copy" and "deep serialize" for collections in BE. This would enable all operators, e.g. ORDER BY and UNION. Testing: - modified the FE tests that checked that maps were not allowed in the select list - now the test expect maps are allowed there - added FE and EE tests involving maps based on the array tests Change-Id: I921c647f1779add36e7f5df4ce6ca237dcfaf001 --- M be/src/codegen/codegen-anyval.cc M be/src/runtime/raw-value.cc M be/src/runtime/raw-value.h M be/src/runtime/types.h M be/src/service/hs2-util.cc M be/src/service/impala-beeswax-server.cc M be/src/service/impala-server.h M be/src/service/query-result-set.cc M be/src/service/query-result-set.h M fe/src/main/java/org/apache/impala/analysis/Analyzer.java M fe/src/main/java/org/apache/impala/analysis/InlineViewRef.java M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java M fe/src/main/java/org/apache/impala/analysis/SetOperationStmt.java M fe/src/main/java/org/apache/impala/catalog/Type.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeUpsertStmtTest.java M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java M testdata/datasets/functional/functional_schema_template.sql M testdata/datasets/functional/schema_constraints.csv M testdata/workloads/functional-query/queries/QueryTest/nested-array-in-select-list.test A testdata/workloads/functional-query/queries/QueryTest/nested-map-in-select-list.test M testdata/workloads/functional-query/queries/QueryTest/ranger_column_masking_complex_types.test M testdata/workloads/functional-query/queries/QueryTest/ranger_column_masking_struct_in_select_list.test M testdata/workloads/functional-query/queries/QueryTest/struct-in-select-list.test M tests/authorization/test_ranger.py M tests/query_test/test_nested_types.py 26 files changed, 652 insertions(+), 140 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/36/18736/12 -- To view, visit http://gerrit.cloudera.org:8080/18736 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I921c647f1779add36e7f5df4ce6ca237dcfaf001 Gerrit-Change-Number: 18736 Gerrit-PatchSet: 12 Gerrit-Owner: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>