[ https://issues.apache.org/jira/browse/SPARK-20346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970285#comment-15970285 ]
Hyukjin Kwon commented on SPARK-20346: -------------------------------------- Actually, I and [~a1ray] had a discussion about this in a PR related with this (missing values in pivot's output). It will be {{0}} for {{count}} currently but it seems {{null}} for others. Up to my knowledge, this one is related with it. I guess he has a better idea about this. > sum aggregate over empty Dataset gives null > ------------------------------------------- > > Key: SPARK-20346 > URL: https://issues.apache.org/jira/browse/SPARK-20346 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.2.0 > Reporter: Jacek Laskowski > Priority: Minor > > {code} > scala> spark.range(0).agg(sum("id")).show > +-------+ > |sum(id)| > +-------+ > | null| > +-------+ > scala> spark.range(0).agg(sum("id")).printSchema > root > |-- sum(id): long (nullable = true) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org