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

Ferenc Csaky closed FLINK-39583.
--------------------------------
    Resolution: Fixed

[{{f9d81b2}}|https://github.com/apache/flink/commit/f9d81b2e11e5cff7469b523cc73ce34b1d28e5ab]
 in master

> Normalize Calcite correl variables to make subplan reuse by digest more 
> effective
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-39583
>                 URL: https://issues.apache.org/jira/browse/FLINK-39583
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>            Reporter: Ferenc Csaky
>            Assignee: Ferenc Csaky
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.4.0
>
>
> Goal is to improve digest-based subplan reuse (when 
> {{table.optimizer.reuse-optimize-block-with-digest-enabled}} is set to true) 
> for plans containing correlation variables, such as {{CROSS JOIN UNNEST}} and 
> decorrelated subqueries.
> Currently, structurally equivalent subplans can receive different Calcite 
> {{CorrelationIds}} during separate view expansions, cause {{$cor}} uses a 
> global counter. These ids become part of the relational digest, so otherwise 
> identical subplans do not match and cannot be considered for reuse. The 
> change introduces correlation-variable normalization before digest-based 
> reuse, assigning deterministic sequential correlation ids per subplan so 
> equivalent correlated plans produce matching digests.



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

Reply via email to