You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Yu Xu (Jira)" <ji...@apache.org> on 2026/08/07 13:26:00 UTC

[jira] [Resolved] (CALCITE-5420) SqlToRel should populate the correlate id of a Project for queries with aggregates

     [ https://issues.apache.org/jira/browse/CALCITE-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yu Xu resolved CALCITE-5420.
----------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in https://github.com/apache/calcite/commit/30adb3635c98d0ca88aee387003599b56bae67b2

Thank you reported this Jira [~jamesstarr] 

Thank you for the review [~mbudiu] 

> SqlToRel should populate the correlate id of a Project for queries with aggregates
> ----------------------------------------------------------------------------------
>
>                 Key: CALCITE-5420
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5420
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: James Starr
>            Assignee: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> The following query does not populate correlate id in the project when SqlToRel.expand=false:
> {code:sql}
> SELECT SUM(
>   (select char_length(dname) from "scott".dept where dept.deptno = emp.empno)) as s
> FROM "scott".emp
> {code}
> Having the correlate id populated is important for expanding nested queries.



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