Aleksandr Efimov has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24724


Change subject: IMPALA-15284: Cover the pre-conversion seam programs
......................................................................

IMPALA-15284: Cover the pre-conversion seam programs

The direct Calcite-only harness pins the client-visible labels, the
exact output types, the PERCENT_RANK rewrite and seven query shapes.
Everything the seam runs in between is exercised only indirectly, so a
change there surfaces as a golden-file diff elsewhere, or not at all.

Widen the corpus to twenty-four shapes: conditional expressions, string
and decimal functions, DISTINCT, HAVING, LIMIT with OFFSET, INTERSECT,
EXCEPT, outer and cross joins, semi and anti joins from IN and NOT IN,
EXISTS, a scalar subquery, an inline view, a common table expression
and LEAD/LAG. The synthetic fixture gains the columns and the second
table these need.

Pin what the programs at the seam do to the plan: CUME_DIST and NTILE
expansion next to the existing PERCENT_RANK case, nested projects
merging into one, unused columns trimmed, multi-row VALUES arriving as
a single Values, and the Impala decimal typing of FLOOR and CEIL
including the cap at the maximum precision. Check the unsupported
complex-type case on unnesting as well as on projection.

Pin cte_threshold too: off by default, and above the threshold the
repeated subtree becomes an ImpalaSequence over a producer and one
consumer per reference. With the option set the seam stops being a
plan of standard Calcite relations, which is worth stating in a test.

Testing:
- CalciteOptimizerTest: 11 tests, 0 failures, 0 errors on Linux
- git diff --check

Change-Id: I8a4403b5fbdd59e2eea79139891d8bb7c4a0413b
Assisted-by: Claude Opus 5 (Anthropic)
---
M 
java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteOptimizerTest.java
1 file changed, 277 insertions(+), 10 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a4403b5fbdd59e2eea79139891d8bb7c4a0413b
Gerrit-Change-Number: 24724
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <[email protected]>

Reply via email to