Aleksandr Efimov created IMPALA-15284:
-----------------------------------------
Summary: Calcite planner: Cover the pre-conversion seam programs
in the direct harness
Key: IMPALA-15284
URL: https://issues.apache.org/jira/browse/IMPALA-15284
Project: IMPALA
Issue Type: Improvement
Reporter: Aleksandr Efimov
Assignee: Aleksandr Efimov
IMPALA-15237 added a direct Calcite-only harness around the logical plan that
createPreImpalaConvertPlan() returns. It pins the client-visible labels and the
exact output types, the PERCENT_RANK rewrite, and seven query shapes that have
to keep reaching an Impala plan. The phases in between - node expansion, type
coercion, field trimming, CTE planning - are exercised only indirectly, so a
change in any of them shows up as a golden-file diff somewhere else, or not at
all.
Extend the harness:
- widen the query corpus that has to keep reaching an Impala plan with the
same client-visible labels: 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;
- pin the rules that rewrite the plan at the seam: CUME_DIST and NTILE
expansion next to the existing PERCENT_RANK case, nested projects merging
into one, unused columns being trimmed, and multi-row VALUES arriving as a
single Values relation;
- pin the Impala-specific decimal typing of FLOOR and CEIL, including the
cap at the maximum precision;
- pin what cte_threshold does at the seam: off by default, and above the
threshold the repeated subtree becomes an ImpalaSequence over a producer and
one consumer per reference. That is worth stating explicitly, because with
the option set the seam is no longer a plan of standard Calcite relations;
- check the unsupported complex-type case on unnesting as well as projection.
Test-only change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)