Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends Loggin
child.castOrNull(c => q"$c.toDouble", DoubleType)

case Cast(child @ NumericType(), FloatType) =>
child.castOrNull(c => q"$c.toFloat", IntegerType)
child.castOrNull(c => q"$c.toFloat", FloatType)

// Special handling required for timestamps in hive test cases since the toString function
// does not match the expected output.
Expand Down Expand Up @@ -626,7 +626,7 @@ abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends Loggin
case FloatType => ru.Literal(Constant(-1.0.toFloat))
case StringType => ru.Literal(Constant("<uninit>"))
case ShortType => ru.Literal(Constant(-1.toShort))
case LongType => ru.Literal(Constant(1L))
case LongType => ru.Literal(Constant(-1L))
case ByteType => ru.Literal(Constant(-1.toByte))
case DoubleType => ru.Literal(Constant(-1.toDouble))
case DecimalType() => q"org.apache.spark.sql.types.Decimal(-1)"
Expand Down