Mihai Budiu created CALCITE-7945:
------------------------------------

             Summary: Lambda next to a window function produces an assertion 
failure
                 Key: CALCITE-7945
                 URL: https://issues.apache.org/jira/browse/CALCITE-7945
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.42.0
            Reporter: Mihai Budiu


{code:java}
select x, row_number() over (order by x) as rn, "EXISTS"(array[2, 3], e -> e = 
x) as r from (values (1), (3), (2)) as t(x) {code}
produces the following exception:
{code:java}
 java.lang.AssertionError
        at 
org.apache.calcite.rel.rules.CalcRelSplitter.execute(CalcRelSplitter.java:133)
        at 
org.apache.calcite.rel.rules.ProjectToWindowRule$ProjectToLogicalProjectAndWindowRule.onMatch(ProjectToWindowRule.java:188)
        at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223)
        at 
org.apache.calcite.plan.volcano.IterativeRuleDriver.drive(IterativeRuleDriver.java:61)
        at 
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:526){code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to