You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Serge Rielau (Jira)" <ji...@apache.org> on 2022/08/19 17:56:00 UTC
[jira] [Created] (SPARK-40151) Fix return type for new median(interval) function
Serge Rielau created SPARK-40151:
------------------------------------
Summary: Fix return type for new median(interval) function
Key: SPARK-40151
URL: https://issues.apache.org/jira/browse/SPARK-40151
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 3.4.0
Reporter: Serge Rielau
median() right now returns an interval of the same type as the input.
We should instead match mean and avg():
The result type is computed as for the arguments:
- year-month interval: The result is an `INTERVAL YEAR TO MONTH`.
- day-time interval: The result is an `INTERVAL DAY TO SECOND`.
- In all other cases the result is a DOUBLE.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org