[ 
https://issues.apache.org/jira/browse/SPARK-20346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacek Laskowski updated SPARK-20346:
------------------------------------
    Description: 
{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}

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to