You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Tanner Clary (Jira)" <ji...@apache.org> on 2023/09/05 15:13:00 UTC

[jira] [Resolved] (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:all-tabpanel ]

Tanner Clary resolved CALCITE-5821.
-----------------------------------
    Fix Version/s: 1.36.0
       Resolution: Fixed

Merged via [aa5397b|https://github.com/apache/calcite/commit/aa5397bed42313865d3a43908427ad5f12b27ef3], thanks for the fix, [~Runking]!

> 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
>            Assignee: Runkang He
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.36.0
>
>
> 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)