You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/07/07 18:11:00 UTC
[jira] [Commented] (CALCITE-5821) Add FORMAT_NUMBER function (enabled in Hive and Spark library)
[ https://issues.apache.org/jira/browse/CALCITE-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741153#comment-17741153 ]
Julian Hyde commented on CALCITE-5821:
--------------------------------------
[~tjbanghart], Could you review this PR, since you've worked on similar formatting functions.
> Add FORMAT_NUMBER function (enabled in Hive and Spark library)
> --------------------------------------------------------------
>
> Key: CALCITE-5821
> URL: https://issues.apache.org/jira/browse/CALCITE-5821
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.34.0
> Reporter: Runkang He
> Priority: Major
>
> Add FORMAT_NUMBER function (enabled in Hive and Spark library):
> FORMAT_NUMBER(expr1, expr2) - Formats the number {{expr1}} like '#,###,###.##', rounded to {{expr2}} decimal places. If {{expr2}} is 0, the result has no decimal point or fractional part. {{expr2}} also accept a user specified format. This is supposed to function like MySQL's FORMAT.
> See more details in [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-StringFunctions] and [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#format_number] doc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)