[ 
https://issues.apache.org/jira/browse/SPARK-41473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-41473:
------------------------------------

    Assignee:     (was: Apache Spark)

> Implement `functions.format_number`
> -----------------------------------
>
>                 Key: SPARK-41473
>                 URL: https://issues.apache.org/jira/browse/SPARK-41473
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Connect, PySpark
>    Affects Versions: 3.4.0
>            Reporter: Xinrong Meng
>            Priority: Major
>
> Currently, `functions.format_number` has data type mismatch issue as shown 
> below:
> {code:python}
> >>> from pyspark.sql.connect.session import SparkSession as RemoteSparkSession
> >>> cspark = RemoteSparkSession.builder.remote().getOrCreate()
> >>> from pyspark.sql.connect import functions as CF
> >>> cspark.createDataFrame([(5,)], ['a']).select(CF.format_number('a', 4))
> 22/12/09 14:46:52 ERROR SparkConnectService: Error analyzing plan.
> org.apache.spark.sql.AnalysisException: 
> [DATATYPE_MISMATCH.UNEXPECTED_INPUT_TYPE] Cannot resolve "format_number(a, 
> 4)" due to data type mismatch: Parameter 2 requires the ("INT" or "STRING") 
> type, however "4" has the type "BIGINT".;
> 'Project [unresolvedalias(format_number(a#2L, 4), None)]
> +- Project [0#0L AS a#2L]
>    +- LocalRelation [0#0L]
> ...
> {code}
> The jira aims to fix the data type mismatch issue and implement 
> `functions.format_number`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to