[
https://issues.apache.org/jira/browse/FLINK-41523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martijn Visser updated FLINK-41523:
-----------------------------------
Release Note:
The planner now estimates the CPU cost of a semi or anti join without equi-join
keys as quadratic in its inputs, instead of linear.
Queries with such a join may get a different join order when table statistics
are available.
For a streaming job, a changed plan means a savepoint taken before the upgrade
may not restore. Use a compiled plan to keep the previous plan.
> Logical cost of semi/anti joins without equi-join keys underestimates CPU cost
> ------------------------------------------------------------------------------
>
> Key: FLINK-41523
> URL: https://issues.apache.org/jira/browse/FLINK-41523
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Affects Versions: 2.5.0
> Reporter: Bonnie Varghese
> Assignee: Bonnie Varghese
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.5.0
>
>
> FlinkLogicalJoin estimates the CPU cost of SEMI and ANTI joins as L + R
> This is fine when the join has equi condition. For non equi conditions, the
> physical join chosen is a NestedLoopJoin (NLJ) which costs O(m*n)
> However, due to the L+R cost, sometimes the a semi/anti join without an equi
> condition can look cheap and the planner may move it below a regular join.
> If we report the CPU cost as L*R in the logical plan then we can prevent such
> join placement issues.
> Observed while testing tpc-h q16 with row and col stats.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)