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(
119119 currentlMatches = null
120120 var stop : Boolean = false
121121 while (! stop && leftElement != null && rightElement != null ) {
122- if (ordering.compare(leftKey, rightKey) > 0 )
122+ if (ordering.compare(leftKey, rightKey) > 0 ) {
123123 fetchRight()
124- else if (ordering.compare(leftKey, rightKey) < 0 )
124+ } else if (ordering.compare(leftKey, rightKey) < 0 ) {
125125 fetchLeft()
126- else
126+ } else {
127127 stop = true
128+ }
128129 }
129130 currentrMatches = new CompactBuffer [Row ]()
130131 while (stop && rightElement != null ) {
131- if (! rightKey.anyNull)
132+ if (! rightKey.anyNull) {
132133 currentrMatches += rightElement
134+ }
133135 fetchRight()
134- if (ordering.compare(leftKey, rightKey) != 0 )
136+ if (ordering.compare(leftKey, rightKey) != 0 ) {
135137 stop = false
138+ }
136139 }
137140 if (currentrMatches.size > 0 ) {
138141 stop = false
139142 currentlMatches = new CompactBuffer [Row ]()
140143 val leftMatch = leftKey.copy()
141144 while (! stop && leftElement != null ) {
142- if (! leftKey.anyNull)
145+ if (! leftKey.anyNull) {
143146 currentlMatches += leftElement
147+ }
144148 fetchLeft()
145- if (ordering.compare(leftKey, leftMatch) != 0 )
149+ if (ordering.compare(leftKey, leftMatch) != 0 ) {
146150 stop = true
151+ }
147152 }
148153 }
149154
You can’t perform that action at this time.
0 commit comments