diff options
author | Wenchen Fan <wenchen@databricks.com> | 2015-12-14 16:48:11 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-12-14 16:48:11 -0800 |
commit | 9ea1a8efca7869618c192546ef4e6d94c17689b5 (patch) | |
tree | 02b3543fb5931c7b544390552a56b292ccda7cd4 /sql | |
parent | fb3778de685881df66bf0222b520f94dca99e8c8 (diff) | |
download | spark-9ea1a8efca7869618c192546ef4e6d94c17689b5.tar.gz spark-9ea1a8efca7869618c192546ef4e6d94c17689b5.tar.bz2 spark-9ea1a8efca7869618c192546ef4e6d94c17689b5.zip |
[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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala index b2facfda24..96bc4fe67a 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects.scala @@ -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") |