Skip to content

Commit 4d54c48

Browse files
author
James Cor
committed
apply to more merge joins and regen plans
1 parent 4131e06 commit 4d54c48

File tree

2 files changed

+110
-119
lines changed

2 files changed

+110
-119
lines changed

enginetest/queries/query_plans.go

Lines changed: 109 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sql/analyzer/replace_sort.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func replaceIdxSortHelper(ctx *sql.Context, scope *plan.Scope, node sql.Node, so
161161
case *plan.JoinNode:
162162
// TODO: is this applicable to other types of joins?
163163
// as long as left child is already sorted and SortFields are a prefix, then it's ok?
164-
if c.JoinType() != plan.JoinTypeMerge {
164+
if !c.JoinType().IsMerge() {
165165
continue
166166
}
167167
// It's (probably) not possible to have Sort as child of Join without Subquery/SubqueryAlias,

0 commit comments

Comments
 (0)