You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/12/27 03:55:00 UTC
[jira] [Assigned] (SPARK-41473) Implement `functions.format_number`
[ https://issues.apache.org/jira/browse/SPARK-41473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-41473:
------------------------------------
Assignee: 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
> Assignee: Apache Spark
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org