Skip to content

Commit f9efbb5

Browse files
committed
Fix ORDER BY NULL
1 parent e7dc4fb commit f9efbb5

File tree

1 file changed

+1
-0
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ class CodeGenContext {
185185
// use c1 - c2 may overflow
186186
case dt: DataType if isPrimitiveType(dt) => s"($c1 > $c2 ? 1 : $c1 < $c2 ? -1 : 0)"
187187
case BinaryType => s"org.apache.spark.sql.catalyst.util.TypeUtils.compareBinary($c1, $c2)"
188+
case NullType => "0"
188189
case other => s"$c1.compare($c2)"
189190
}
190191

0 commit comments

Comments
 (0)