Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/12599#discussion_r60789861
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/object.scala
---
@@ -83,6 +83,28 @@ 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]) {
+ val underlyingPlan = child.find { p =>
--- End diff --
+1 to Davies suggestion
On Apr 22, 2016 10:19 AM, "Davies Liu" <[email protected]> wrote:
> In
>
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/object.scala
> <https://github.com/apache/spark/pull/12599#discussion_r60772736>:
>
> > @@ -83,6 +83,28 @@ 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]) {
> > + val underlyingPlan = child.find { p =>
>
> Can we just have a default size (for example, 4k) for ObjectType ?
>
> â
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub
>
<https://github.com/apache/spark/pull/12599/files/3ff11a12b6a148b08f6dfc7677be37d4de4a703b#r60772736>
>
---
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]