You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dylan He (Jira)" <ji...@apache.org> on 2024/07/30 12:27:00 UTC
[jira] [Created] (FLINK-35930) Add FORMAT_STRING function
Dylan He created FLINK-35930:
--------------------------------
Summary: Add FORMAT_STRING function
Key: FLINK-35930
URL: https://issues.apache.org/jira/browse/FLINK-35930
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Dylan He
Add FORMAT_STRING function as the same in Spark.
This function is a synonym for PRINTF function.
----
Returns a formatted string from printf-style format strings.
Example:
{code:sql}
> SELECT FORMAT_STRING('Hello World %d %s', 100, 'days');
Hello World 100 days
{code}
Syntax:
{code:sql}
FORMAT_STRING(strfmt, obj...)
{code}
Arguments:
* {{strfmt}}: A STRING expression.
* {{obj}}: ANY expression.
Returns:
A STRING.
See also:
* [Spark|https://spark.apache.org/docs/3.5.1/sql-ref-functions-builtin.html#string-functions]
* [Databricks|https://docs.databricks.com/en/sql/language-manual/functions/format_string.html]
* [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-StringFunctions] printf
* [PostgreSQL|https://www.postgresql.org/docs/16/functions-string.html] format
--
This message was sent by Atlassian Jira
(v8.20.10#820010)