Commit 30152d0
### What changes were proposed in this pull request?
Fix type hint for `accuracy` in `percentile_approx` and `approx_percentile`
### Why are the changes needed?
float `accuracy` is not supported:
```
In [9]: df.select(approx_percentile("value", [0.25, 0.5, 0.75], 1.1).alias("quantiles")).show()
...
AnalysisException: [DATATYPE_MISMATCH.UNEXPECTED_INPUT_TYPE] Cannot resolve "approx_percentile(value, array(0.25, 0.5, 0.75), 1.1)" due to data type mismatch: The third parameter requires the "INTEGRAL" type, however "1.1" has the type "DOUBLE". SQLSTATE: 42K09;
```
### Does this PR introduce _any_ user-facing change?
yes, minor doc change
### How was this patch tested?
CI
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #47869 from zhengruifeng/py_approx_percentile_acc.
Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent 8409da3 commit 30152d0
File tree
2 files changed
+6
-6
lines changed- python/pyspark/sql
- connect/functions
- functions
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | | - | |
| 1226 | + | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
| |||
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
1238 | | - | |
| 1238 | + | |
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6339 | 6339 | | |
6340 | 6340 | | |
6341 | 6341 | | |
6342 | | - | |
| 6342 | + | |
6343 | 6343 | | |
6344 | 6344 | | |
6345 | 6345 | | |
| |||
6360 | 6360 | | |
6361 | 6361 | | |
6362 | 6362 | | |
6363 | | - | |
| 6363 | + | |
6364 | 6364 | | |
6365 | 6365 | | |
6366 | 6366 | | |
| |||
6397 | 6397 | | |
6398 | 6398 | | |
6399 | 6399 | | |
6400 | | - | |
| 6400 | + | |
6401 | 6401 | | |
6402 | 6402 | | |
6403 | 6403 | | |
| |||
6414 | 6414 | | |
6415 | 6415 | | |
6416 | 6416 | | |
6417 | | - | |
| 6417 | + | |
6418 | 6418 | | |
6419 | 6419 | | |
6420 | 6420 | | |
| |||
0 commit comments