Steve Carlin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24318 )

Change subject: IMPALA-2083: (addendum) Disable pivot and unpivot in Calcite 
planner
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24318/1/java/calcite-planner/src/main/codegen/templates/Parser.jj
File java/calcite-planner/src/main/codegen/templates/Parser.jj:

http://gerrit.cloudera.org:8080/#/c/24318/1/java/calcite-planner/src/main/codegen/templates/Parser.jj@2873
PS1, Line 2873:     <PIVOT>
> Before IMPALA-2083, did these work with Calcite, or fail later?
A lengthy explanation is needed...

The PIVOT command was working with Calcite but there was a bug.  The Aggregate 
that came out of the command used a FILTER within the aggregate which was not 
handled properly.  There is a rule that allows you to change the FILTER to a 
CASE.  If I were to add that change, the PIVOT command will work, but....

...it works using SQL Server syntax.  I think whoever developed it came out of 
SQL server.  An inner select is needed.  Many cases in the test_pivot_clause.py 
file do not parse correctly.  Even worse, some of them that do parse return 
results that are compatible with SQL Server, but are different from what is 
developed on the original planner.



--
To view, visit http://gerrit.cloudera.org:8080/24318
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifd0e65721b38bca965a53f948ffc4c8a9f140ebb
Gerrit-Change-Number: 24318
Gerrit-PatchSet: 1
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Reviewer: Xuebin Su <[email protected]>
Gerrit-Comment-Date: Mon, 18 May 2026 19:11:11 +0000
Gerrit-HasComments: Yes

Reply via email to