Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use TypeCollection to specify wanted input and implicit cast
  • Loading branch information
yjshen committed Jul 14, 2015
commit d10be4aa883e435cddeb909b4dcc7d1bf28f2d4b
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,10 @@ case class Round(child: Expression, scale: Expression) extends Expression with E
case t => t
}

override def inputTypes: Seq[AbstractDataType] = Seq(NumericType, IntegralType)
override def inputTypes: Seq[AbstractDataType] = Seq(
//rely on precedence to implicit cast String into Double
TypeCollection(DoubleType, FloatType, LongType, IntegerType, ShortType, ByteType),
TypeCollection(LongType, IntegerType, ShortType, ByteType))

override def checkInputDataTypes(): TypeCheckResult = {
child.dataType match {
Expand Down