Skip to content
Snippets Groups Projects
Commit 9ea1a8ef authored by Wenchen Fan's avatar Wenchen Fan Committed by Michael Armbrust
Browse files

[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 https://github.com/apache/spark/pull/10260 which begin to check if the `fromRowExpression` is resolved.

Author: Wenchen Fan <wenchen@databricks.com>

Closes #10263 from cloud-fan/encoder.
parent fb3778de
No related branches found
No related tags found
No related merge requests found
......@@ -296,15 +296,12 @@ case class UnwrapOption(
* (in the case of reference types) equality with null.
* @param child The expression to evaluate and wrap.
*/
case class WrapOption(child: Expression)
extends UnaryExpression with ExpectsInputTypes {
case class WrapOption(child: Expression) extends UnaryExpression {
override def dataType: DataType = ObjectType(classOf[Option[_]])
override def nullable: Boolean = true
override def inputTypes: Seq[AbstractDataType] = ObjectType :: Nil
override def eval(input: InternalRow): Any =
throw new UnsupportedOperationException("Only code-generated evaluation is supported")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment