File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/joins Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -119,31 +119,36 @@ case class SortMergeJoin(
119
119
currentlMatches = null
120
120
var stop : Boolean = false
121
121
while (! stop && leftElement != null && rightElement != null ) {
122
- if (ordering.compare(leftKey, rightKey) > 0 )
122
+ if (ordering.compare(leftKey, rightKey) > 0 ) {
123
123
fetchRight()
124
- else if (ordering.compare(leftKey, rightKey) < 0 )
124
+ } else if (ordering.compare(leftKey, rightKey) < 0 ) {
125
125
fetchLeft()
126
- else
126
+ } else {
127
127
stop = true
128
+ }
128
129
}
129
130
currentrMatches = new CompactBuffer [Row ]()
130
131
while (stop && rightElement != null ) {
131
- if (! rightKey.anyNull)
132
+ if (! rightKey.anyNull) {
132
133
currentrMatches += rightElement
134
+ }
133
135
fetchRight()
134
- if (ordering.compare(leftKey, rightKey) != 0 )
136
+ if (ordering.compare(leftKey, rightKey) != 0 ) {
135
137
stop = false
138
+ }
136
139
}
137
140
if (currentrMatches.size > 0 ) {
138
141
stop = false
139
142
currentlMatches = new CompactBuffer [Row ]()
140
143
val leftMatch = leftKey.copy()
141
144
while (! stop && leftElement != null ) {
142
- if (! leftKey.anyNull)
145
+ if (! leftKey.anyNull) {
143
146
currentlMatches += leftElement
147
+ }
144
148
fetchLeft()
145
- if (ordering.compare(leftKey, leftMatch) != 0 )
149
+ if (ordering.compare(leftKey, leftMatch) != 0 ) {
146
150
stop = true
151
+ }
147
152
}
148
153
}
149
154
You can’t perform that action at this time.
0 commit comments