[ 
https://issues.apache.org/jira/browse/IMPALA-13476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892483#comment-17892483
 ] 

Steve Carlin commented on IMPALA-13476:
---------------------------------------

I'm attaching a diff file that will fix the problem.

I would rather find a more elegant fix. This fix involves creating a 
substitution map which is used by the existing planner and things get resolved. 
 My hope is that we do not need to rely on ExprSubstitutionMap with the new 
design since the theory is that since everything has been analyzed, everything 
can be resolved within the PlanNode creation rather than relying on a 
substitution in the internals.

[^joinfix.diff] 

> Calcite Planner: IMPALA-1519 query throws exception
> ---------------------------------------------------
>
>                 Key: IMPALA-13476
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13476
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: Steve Carlin
>            Priority: Major
>         Attachments: joinfix.diff
>
>
> The following query in analytics-fn.test does not work in CalcitePlanner:
> # IMPALA-1519: Check that the first analytic sort of a select block
> # materializes TupleIsNullPredicates to be substituted in ancestor nodes.
> select
>   sum(t1.id) over (partition by t1.bool_col),
>   count(1) over (order by t1.int_col),
>   avg(g) over (order by f),
>   t2.a,
>   t2.d 
> from alltypestiny t1
> left outer join 
>   (select
>      id as a,
>      coalesce(id, 10) as b,
>      int_col as c,
>      coalesce(int_col, 20) as d,
>      bigint_col e,
>      coalesce(bigint_col, 30) as f,
>      coalesce(id + bigint_col, 40) as g 
>    from alltypestiny) t2
> on (t1.id = t2.a + 100)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to