You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2016/04/22 09:41:44 UTC

[GitHub] spark pull request: [SPARK-14838][SQL] Implement statistics in Ser...

Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12599#discussion_r60701211
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/object.scala ---
    @@ -83,6 +83,16 @@ case class SerializeFromObject(
         child: LogicalPlan) extends UnaryNode with ObjectConsumer {
     
       override def output: Seq[Attribute] = serializer.map(_.toAttribute)
    +
    +  // We can't estimate the size of ObjectType. We implement statistics here to avoid
    +  // directly estimate any child plan which produces domain objects as output.
    +  override def statistics: Statistics = {
    +    if (child.output.head.dataType.isInstanceOf[ObjectType]) {
    +      Statistics(sizeInBytes = Long.MaxValue)
    --- End diff --
    
    bring back this discussion: https://github.com/apache/spark/pull/12599#discussion_r60697122
    
    We can calculate the row size by `this.output.map(_.dataType)`, can't we?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org