[
https://issues.apache.org/jira/browse/CALCITE-7380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18069710#comment-18069710
]
Julian Hyde commented on CALCITE-7380:
--------------------------------------
Sounds good. If I were you I would write one or two tests for
{{EnumerableWcoJoin}} and have Claude write an initial implementation.
Typically, Calcite would leave the decision about whether to use
{{EnumerableWcoJoin}} to the cost model. {{EnumerableWcoJoin}} should just do
what it is asked, and the planner rule should convert a join-tree to a
{{EnumerableWcoJoin}} if it is valid to do so, again without thinking about
cost. But if it's useful I guess you could have a hybrid rule that imposes a
cost limit.
> Add support for worst-case optimal join algorithms
> --------------------------------------------------
>
> Key: CALCITE-7380
> URL: https://issues.apache.org/jira/browse/CALCITE-7380
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.42.0
> Reporter: TJ Banghart
> Assignee: TJ Banghart
> Priority: Major
> Attachments: p1891-freitag.pdf
>
>
> This issue proposes introducing worst-case optimal join (WCOJ) algorithms
> into Calcite as an opt-in optimization. WCOJs evaluate multi-way joins in a
> way that avoids generating large intermediate results and guarantees runtime
> proportional to the worst-case output size of the query, which can
> significantly outperform traditional binary join plans for certain query
> patterns (e.g., cyclic or graph-like joins).
> The implementation would follow a hybrid approach, similar to [Freitag et al.
> (PVLDB 2020|https://db.in.tum.de/~freitag/papers/p1891-freitag.pdf]), where
> the optimizer can choose worst-case optimal joins when beneficial but fall
> back to existing join strategies when they are more appropriate.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)