Skip to content

ColocateJoin should support table join itself no need to check colocate group #4230

@HappenLee

Description

@HappenLee

Is your feature request related to a problem? Please describe.
Now the sql TPCDS 95:

with ws_wh as
(select ws1.ws_order_number,ws1.ws_warehouse_sk wh1,ws2.ws_warehouse_sk wh2
 from web_sales ws1,web_sales ws2
 where ws1.ws_order_number = ws2.ws_order_number
   and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)

web_sales join itself, but the Doris chose shuffle join. This is an unreasonable choice, f left table and right table is same table, they are naturally colocate relationship no need to check colocate group.

Describe the solution you'd like

ColocateJoin should support table join itself no need to check colocate group.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/plannerIssues or PRs related to the query planner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions