You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2026/05/18 22:10:57 UTC
(impala) branch master updated: IMPALA-2083: (addendum) Disable pivot and unpivot in Calcite planner
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new 6cd06fe13 IMPALA-2083: (addendum) Disable pivot and unpivot in Calcite planner
6cd06fe13 is described below
commit 6cd06fe1387cd979bd542c495c68651fa0089ff8
Author: Steve Carlin <sc...@cloudera.com>
AuthorDate: Mon May 18 06:32:18 2026 -0700
IMPALA-2083: (addendum) Disable pivot and unpivot in Calcite planner
Calcite planner contains different semantics for pivot and unpivot.
In some cases, it fails. In some cases, it is returning different results.
This commit disables the feature for the Calcite planner until the
results can by synchronized.
Change-Id: Ifd0e65721b38bca965a53f948ffc4c8a9f140ebb
Reviewed-on: http://gerrit.cloudera.org:8080/24318
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
---
java/calcite-planner/src/main/codegen/templates/Parser.jj | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/java/calcite-planner/src/main/codegen/templates/Parser.jj b/java/calcite-planner/src/main/codegen/templates/Parser.jj
index 36a766169..4f064a051 100644
--- a/java/calcite-planner/src/main/codegen/templates/Parser.jj
+++ b/java/calcite-planner/src/main/codegen/templates/Parser.jj
@@ -2870,7 +2870,10 @@ SqlNode Pivot(SqlNode tableRef) :
final SqlNodeList inList;
}
{
- <PIVOT> { s = span(); checkNotJoin(tableRef); }
+ <PIVOT>
+ { throw new ParseException("Pivot not supported for Calcite Planner");}
+ // TODO: implement PIVOT with Impala semantics
+ // { s = span(); checkNotJoin(tableRef); }
<LPAREN>
AddPivotAgg(aggList) ( <COMMA> AddPivotAgg(aggList) )*
<FOR> axisList = SimpleIdentifierOrList()
@@ -2938,7 +2941,10 @@ SqlNode Unpivot(SqlNode tableRef) :
final SqlNodeList inList;
}
{
- <UNPIVOT> { s = span(); checkNotJoin(tableRef); }
+ <UNPIVOT>
+ { throw new ParseException("Unpivot not supported for Calcite Planner");}
+ // TODO: implement UNPIVOT with Impala semantics
+ //{ s = span(); checkNotJoin(tableRef); }
(
<INCLUDE> <NULLS> { includeNulls = true; }
| <EXCLUDE> <NULLS> { includeNulls = false; }