Skip to content

Commit 9ea1a8e

Browse files
cloud-fanmarmbrus
authored andcommitted
[SPARK-12274][SQL] WrapOption should not have type constraint for child
I think it was a mistake, and we have not catched it so far until #10260 which begin to check if the `fromRowExpression` is resolved. Author: Wenchen Fan <wenchen@databricks.com> Closes #10263 from cloud-fan/encoder.
1 parent fb3778d commit 9ea1a8e

File tree

1 file changed

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

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,12 @@ case class UnwrapOption(
296296
* (in the case of reference types) equality with null.
297297
* @param child The expression to evaluate and wrap.
298298
*/
299-
case class WrapOption(child: Expression)
300-
extends UnaryExpression with ExpectsInputTypes {
299+
case class WrapOption(child: Expression) extends UnaryExpression {
301300

302301
override def dataType: DataType = ObjectType(classOf[Option[_]])
303302

304303
override def nullable: Boolean = true
305304

306-
override def inputTypes: Seq[AbstractDataType] = ObjectType :: Nil
307-
308305
override def eval(input: InternalRow): Any =
309306
throw new UnsupportedOperationException("Only code-generated evaluation is supported")
310307

0 commit comments

Comments
 (0)