Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/13167#discussion_r63675936
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/objects.scala ---
@@ -28,17 +28,41 @@ import
org.apache.spark.sql.catalyst.expressions.objects.Invoke
import org.apache.spark.sql.catalyst.plans.physical._
import org.apache.spark.sql.types.{DataType, ObjectType}
+
+/**
+ * Physical version of `ObjectProducer`.
+ */
+trait ObjectProducerExec extends SparkPlan {
+ // The attribute that reference to the single object field this operator
outputs.
+ protected def outputObjAttr: Attribute
+
+ override def output: Seq[Attribute] = outputObjAttr :: Nil
+
+ override def producedAttributes: AttributeSet =
AttributeSet(outputObjAttr)
+
+ def outputObjectType: DataType = outputObjAttr.dataType
+}
+
+/**
+ * Physical version of `ObjectConsumer`.
+ */
+trait ObjectConsumerExec extends UnaryExecNode {
+ assert(child.output.length == 1)
+
+ // This operator always need all columns of its child, even it doesn't
reference to.
+ override def references: AttributeSet = child.outputSet
+
+ def inputObjectType: DataType = child.output.head.dataType
+}
+
/**
* Takes the input row from child and turns it into object using the given
deserializer expression.
* The output of this operator is a single-field safe row containing the
deserialized object.
*/
-case class DeserializeToObject(
+case class DeserializeToObjectExec(
--- End diff --
not related, but to make the name consistent with other physical plans.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]