File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,14 @@ abstract class ExtractIntervalPart(
3030 val dataType : DataType ,
3131 func : CalendarInterval => Any ,
3232 funcName : String )
33- extends UnaryExpression
34- with ExpectsInputTypes
35- with Serializable {
33+ extends UnaryExpression with ExpectsInputTypes with Serializable {
34+
3635 override def inputTypes : Seq [AbstractDataType ] = Seq (CalendarIntervalType )
36+
3737 override protected def nullSafeEval (interval : Any ): Any = {
3838 func(interval.asInstanceOf [CalendarInterval ])
3939 }
40+
4041 override protected def doGenCode (ctx : CodegenContext , ev : ExprCode ): ExprCode = {
4142 val iu = IntervalUtils .getClass.getName.stripSuffix(" $" )
4243 defineCodeGen(ctx, ev, c => s " $iu. $funcName( $c) " )
You can’t perform that action at this time.
0 commit comments