Github user ogirardot commented on the pull request:
https://github.com/apache/spark/pull/6237#issuecomment-103349381
@marmbrus I may misunderstand the nullable flag, but I can have an empty
dataset with a non-nullable column.
For example :
```
scala> val r = sc.parallelize(List((1, true), (3, false)))
scala> val a = r.toDF
scala> a.printSchema
root
|-- _1: integer (nullable = false)
|-- _2: boolean (nullable = false)
scala> a.filter("_1 < 1").groupBy("_1").agg(avg("_1")).show()
AVG('_1)
scala> a.filter("_1 < 1").groupBy("_1").agg(avg("_1")).printSchema
root
|-- AVG('_1): double (nullable = true)
```
I don't think that AVG(_1) should be nullable, if you think so then yes
this PR is useless.
Regards,
Olivier.
---
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]