[
https://issues.apache.org/jira/browse/FLINK-35920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dylan He updated FLINK-35920:
-----------------------------
Description:
Add PRINTF function as the same in Spark & Hive.
----
Returns a formatted string from printf-style format strings.
Example:
{code:sql}
> SELECT PRINTF('Hello World %d %s', 100, 'days');
Hello World 100 days
{code}
Syntax:
{code:sql}
PRINTF(strfmt[, obj1, ...])
{code}
Arguments:
* {{strfmt}}: A STRING expression.
* {{objN}}: A STRING or NUMERIC 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/printf.html]
*
[Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-StringFunctions]
* [PostgreSQL|https://www.postgresql.org/docs/16/functions-string.html] format
was:
Add PRINTF function as the same in Spark & Hive.
----
Returns a formatted string from printf-style format strings.
Example:
{code:sql}
> SELECT PRINTF('Hello World %d %s', 100, 'days');
Hello World 100 days
{code}
Syntax:
{code:sql}
PRINTF(strfmt[, obj1, ...])
{code}
Arguments:
* {{strfmt}}: A STRING expression.
* {{objN}}: A STRING or NUMERIC 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/printf.html]
*
[Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-StringFunctions]
> Add PRINTF function
> -------------------
>
> Key: FLINK-35920
> URL: https://issues.apache.org/jira/browse/FLINK-35920
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Dylan He
> Priority: Major
>
> Add PRINTF function as the same in Spark & Hive.
> ----
> Returns a formatted string from printf-style format strings.
> Example:
> {code:sql}
> > SELECT PRINTF('Hello World %d %s', 100, 'days');
> Hello World 100 days
> {code}
> Syntax:
> {code:sql}
> PRINTF(strfmt[, obj1, ...])
> {code}
> Arguments:
> * {{strfmt}}: A STRING expression.
> * {{objN}}: A STRING or NUMERIC 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/printf.html]
> *
> [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-StringFunctions]
> * [PostgreSQL|https://www.postgresql.org/docs/16/functions-string.html] format
--
This message was sent by Atlassian Jira
(v8.20.10#820010)