apache / apache/datafusion

Move `optimize_subquery_sort` into optimizer as a new rule `EliminateSort`

Open
#15,435 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

I have no idea why we have optimize plan rule `optimize_subquery_sort` in `create_relation`, I think we should move such rule to optimizer 🤔

_Originally posted by @jayzhan211 in https://github.com/apache/datafusion/pull/15300#discussion_r2002212215_

Contributor guide

Open the contributing guide

Research direction

Locate optimize_subquery_sort in create_relation and inspect the optimizer rules to understand where the proposed EliminateSort rule belongs. Move the rule into the optimizer as EliminateSort, then verify the existing query-planning tests still pass and that the subquery sort optimization remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.