Skip to content

Commit a429869

Browse files
committed
fix
1 parent 9a262c0 commit a429869

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
13711371
case _: FloatType | _: DoubleType =>
13721372
(c, evPrim, evNull) =>
13731373
code"""
1374-
if ($c > ${Byte.MinValue + 1} && $c < ${Byte.MaxValue + 1}) {
1374+
if ($c > ${Byte.MinValue - 1} && $c < ${Byte.MaxValue + 1}) {
13751375
$evPrim = (byte) $c;
13761376
} else {
13771377
$evNull = true;

0 commit comments

Comments
 (0)