Skip to content

Commit 318dc04

Browse files
committed
revert useless changes
1 parent 55cf0c3 commit 318dc04

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,17 @@ object GenerateOrdering extends CodeGenerator[Seq[SortOrder], Ordering[InternalR
131131
return 0;
132132
"""
133133
},
134-
foldFunctions = _.map { funCall =>
135-
val comp = ctx.freshName("comp")
136-
s"""
137-
int $comp = $funCall;
138-
if ($comp != 0) {
139-
return $comp;
140-
}
141-
"""
142-
}.mkString)
134+
foldFunctions = { funCalls =>
135+
funCalls.zipWithIndex.map { case (funCall, i) =>
136+
val comp = ctx.freshName("comp")
137+
s"""
138+
int $comp = $funCall;
139+
if ($comp != 0) {
140+
return $comp;
141+
}
142+
"""
143+
}.mkString
144+
})
143145
}
144146

145147
protected def create(ordering: Seq[SortOrder]): BaseOrdering = {

0 commit comments

Comments
 (0)