Arnab Karmakar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23753


Change subject: IMPALA-2083: Implement PIVOT operator in CalcitePlanner
......................................................................

IMPALA-2083: Implement PIVOT operator in CalcitePlanner

Add support for SQL PIVOT operator following Apache Calcite syntax,
similar to implementations in Apache Druid and Kylin.

Implementation Details:
- Calcite generates PIVOT as aggregates with FILTER clauses
- Transform FILTER clauses to CASE expressions for Impala backend
- Coerce nullable filter columns to NOT NULL as required
- Function resolution with supertype fallback for type coercion

Added documentation in docs/topics/impala_pivot.xml
with syntax and examples.

Testing:
- 19 positive test cases covering SUM, AVG, COUNT, MIN, MAX
- 18 negative test cases documenting error behavior
- Tests use real tables with explicit column selection

Change-Id: I3b0cc669c4edc9aff9b77ea7d40cb6dbb23f33ab
---
A docs/topics/impala_pivot.xml
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceNodes.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaAggRel.java
A testdata/workloads/functional-query/queries/QueryTest/pivot.test
M tests/custom_cluster/test_calcite_planner.py
5 files changed, 936 insertions(+), 27 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/23753/1
--
To view, visit http://gerrit.cloudera.org:8080/23753
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b0cc669c4edc9aff9b77ea7d40cb6dbb23f33ab
Gerrit-Change-Number: 23753
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar <[email protected]>

Reply via email to