GitHub user wzhfy opened a pull request:
https://github.com/apache/spark/pull/19321
[SPARK-22100] [SQL] Make percentile_approx support numeric/date/timestamp
types
## What changes were proposed in this pull request?
Currently `percentile_approx` only supports double type.
But since all numeric types, date and timestamp types are represented as
numerics internally, `percentile_approx` can support them easily.
## How was this patch tested?
Added a new test and modified some existing tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wzhfy/spark approx_percentile_support_types
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19321.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19321
----
commit 958715b54d36d4bd5875c53ec59d71e4cd22cade
Author: Zhenhua Wang <[email protected]>
Date: 2017-09-22T07:28:09Z
percentile_approx supports all atomic types
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]