deserialize[T : Encoder](child: LogicalPlan): DeserializeToObject
CatalystSerde
CatalystSerde object consists of three methods:
-
deserialize to create a
DeserializeToObjectlogical plan for a logical plan.
CatalystSerde is a Scala object and belongs to org.apache.spark.sql.catalyst.plans.logical package.
Creating DeserializeToObject Logical Plan for Child Logical Plan — deserialize method
deserialize creates a DeserializeToObject logical plan for the input child logical plan.
Internally, deserialize creates a UnresolvedDeserializer for the deserializer for the type T first and passes it on to a DeserializeToObject with a AttributeReference (being the result of generateObjAttr).
DeserializeToObject Unary Logical Plan
case class DeserializeToObject(
deserializer: Expression,
outputObjAttr: Attribute,
child: LogicalPlan) extends UnaryNode with ObjectProducer
DeserializeToObject is a unary logical plan that takes the input row from the input child logical plan and turns it into the input outputObjAttr attribute using the given deserializer expression.