Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Currenlty there is a rule (SortJoinCopyRule) that copies a sort (without the limit and offset) under a join in order for example to use more easily operators with sorted inputs, or to have the sort integrated in an index scan. An exemple of the application of SortJoinCopyRule:
// Plan before applying SortJoinCopyRule Sort(author.name) Join(author.id = book.authid) Scan(author) Scan(book) // Plan after applying SortJoinCopyRule (& SortRemoveRule) Join(author.id = book.authid) IndexScan(author, author.name) Scan(book)
This optimization is applied to the logical operators.
It was mentionned in CALCITE-2624 that another approach (on a physical level) may be more suitable. It would be better for the optimization to be applied by physical property enforcement.
Attachments
Issue Links
- is related to
-
CALCITE-2624 Add a rule to copy a sort below a join operator
- Closed