[
https://issues.apache.org/jira/browse/IMPALA-9059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18080635#comment-18080635
]
ASF subversion and git services commented on IMPALA-9059:
---------------------------------------------------------
Commit 1381810b3c87c5c44b2d44ae1d9f9ae96053711f in impala's branch
refs/heads/master from Xuebin Su
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=1381810b3 ]
IMPALA-9059: Add UNPIVOT clause
This patch adds support for the UNPIVOT clause by creating a new
subclass of `TableRef` called `UnpivotTableRef`. The concepts and an
example are explained in `UnpivotTableRef.java`.
A new keyword `UNPIVOT` is added.
A new type of plan node and a new type of execution node called
`UnpivotNode` are added.
Two new notification methods are added in `TableRef.java` for
`UnpivotTableRef`:
- `notifySlotRefRegistered()` to register the SlotDescriptors in the
TupleDescriptor of the source TableRef and
- `notifySlotsMaterialized()` to mark the SlotDescriptors in the
TupleDescriptor of the source TableRef as materialized.
To support column masking, `Analyzer.resolveTableMask()` is moved and
renamed to `TableRef.applyTableMask()` so that `UnpivotTableRef` can
override it.
Limitations:
- IMPALA-14927: Different but compatible types are not supported in the
UNPIVOT clause
- IMPALA-14928: Multiple UNPIVOT clauses following the same path is not
supported
Testing:
- Added E2E tests in `test_unpivot_clause.py` and
`ranger_column_masking_and_row_filtering.test`.
- Added PlannerTest to ensure the predicates can be pushed down.
- Added AnalyzerTest.
Change-Id: I10e9d0a1bd70de02c7998afca274b895055d9b6a
Reviewed-on: http://gerrit.cloudera.org:8080/23922
Reviewed-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Zoltan Borok-Nagy <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Add UNPIVOT operator
> --------------------
>
> Key: IMPALA-9059
> URL: https://issues.apache.org/jira/browse/IMPALA-9059
> Project: IMPALA
> Issue Type: New Feature
> Components: Frontend
> Reporter: Greg Rahn
> Assignee: Xuebin Su
> Priority: Critical
> Labels: sql-language
>
> References:
> *
> https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_10002.htm#CHDCEJJE
> *
> https://docs.microsoft.com/en-us/sql/t-sql/queries/from-using-pivot-and-unpivot?view=sql-server-ver15
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]