spark-instrumented-optimizer/R/pkg/tests
Zhenhua Wang 365a29bdbf [SPARK-22100][SQL] Make percentile_approx support date/timestamp type and change the output type to be the same as input type
## What changes were proposed in this pull request?

The `percentile_approx` function previously accepted numeric type input and output double type results.

But since all numeric types, date and timestamp types are represented as numerics internally, `percentile_approx` can support them easily.

After this PR, it supports date type, timestamp type and numeric types as input types. The result type is also changed to be the same as the input type, which is more reasonable for percentiles.

This change is also required when we generate equi-height histograms for these types.

## How was this patch tested?

Added a new test and modified some existing tests.

Author: Zhenhua Wang <wangzhenhua@huawei.com>

Closes #19321 from wzhfy/approx_percentile_support_types.
2017-09-25 09:28:42 -07:00
..
fulltests [SPARK-22100][SQL] Make percentile_approx support date/timestamp type and change the output type to be the same as input type 2017-09-25 09:28:42 -07:00
run-all.R [SPARK-21801][SPARKR][TEST] set random seed for predictable test 2017-09-06 09:53:55 -07:00