Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MINOR][PYTHON][DOCS] Fix the type hint of
histogram_numeric
### What changes were proposed in this pull request? Fix the type hint of `histogram_numeric` ### Why are the changes needed? argument `nBins` cannot be a column name: ``` In [11]: spark.range(100).withColumn("nb", sf.lit(5)).select(sf.histogram_numeric('id', "nb")).show(truncate=False) ... AnalysisException: [DATATYPE_MISMATCH.NON_FOLDABLE_INPUT] Cannot resolve "histogram_numeric(id, nb)" due to data type mismatch: the input `nb` should be a foldable "INT" expression; however, got "nb". SQLSTATE: 42K09; 'Aggregate [unresolvedalias(histogram_numeric(id#323L, nb#324, 0, 0))] +- Project [id#323L, 5 AS nb#324] +- Range (0, 100, step=1, splits=Some(12)) ``` ### Does this PR introduce _any_ user-facing change? doc-only ### How was this patch tested? updated doctest ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#48875 from zhengruifeng/fix_histogram_numeric. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>
- Loading branch information