[ https://issues.apache.org/jira/browse/SPARK-20346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970248#comment-15970248 ]
Hyukjin Kwon commented on SPARK-20346: -------------------------------------- [~jlaskowski], do you mind if I ask the expected output? I thought {{null}} for no input rows makes sense in a way. > 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