Skip to content

Commit 1319e82

Browse files
committed
Ignore non-InternalRow comparisons.
1 parent 9d4cf44 commit 1319e82

File tree

1 file changed

+2
-1
lines changed
  • sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions

1 file changed

+2
-1
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.HashSet;
3131
import java.util.Set;
3232

33+
import org.apache.spark.sql.catalyst.InternalRow;
3334
import org.apache.spark.sql.types.ArrayType;
3435
import org.apache.spark.sql.types.BinaryType;
3536
import org.apache.spark.sql.types.BooleanType;
@@ -610,7 +611,7 @@ public boolean equals(Object other) {
610611
return (sizeInBytes == o.sizeInBytes) &&
611612
ByteArrayMethods.arrayEquals(baseObject, baseOffset, o.baseObject, o.baseOffset,
612613
sizeInBytes);
613-
} else if (other == null) {
614+
} else if (other == null || !(other instanceof InternalRow)) {
614615
return false;
615616
} else {
616617
throw new IllegalArgumentException(

0 commit comments

Comments
 (0)