[SPARK-7234][SQL] Fix DateType mismatch when codegen on.

Author: 云峤 <chensong.cs@alibaba-inc.com>

Closes #5778 from kaka1992/fix_codegenon_datetype_mismatch and squashes the following commits:

1ad4cff [云峤] SPARK-7234 fix dateType mismatch
This commit is contained in:
云峤 2015-04-29 18:23:42 -07:00 committed by Reynold Xin
parent 1b7106b867
commit 7143f6e971

View file

@ -672,6 +672,7 @@ abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends Loggin
case DoubleType => ru.Literal(Constant(-1.toDouble))
case DecimalType() => q"org.apache.spark.sql.types.Decimal(-1)"
case IntegerType => ru.Literal(Constant(-1))
case DateType => ru.Literal(Constant(-1))
case _ => ru.Literal(Constant(null))
}