You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Dylan He (Jira)" <ji...@apache.org> on 2024/08/01 13:00:00 UTC
[jira] [Created] (FLINK-35965) Add ENDSWITH function
Dylan He created FLINK-35965:
--------------------------------
Summary: Add ENDSWITH function
Key: FLINK-35965
URL: https://issues.apache.org/jira/browse/FLINK-35965
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Dylan He
Add ENDSWITH function.
----
Returns if {{expr}} ends with {{endExpr}}.
Example:
{code:sql}
> SELECT ENDSWITH('SparkSQL', 'SQL');
true
> SELECT ENDSWITH('SparkSQL', 'sql');
false
{code}
Syntax:
{code:sql}
ENDSWITH(expr, endExpr)
{code}
Arguments:
* {{expr}}: A STRING or BINARY expression.
* {{endExpr}}: A STRING or BINARY expression.
Returns:
A BOOLEAN.
{{expr}} and {{endExpr}} should have same type.
If {{expr}} or {{endExpr}} is NULL, the result is NULL.
If {{endExpr}} is the empty, the result is true.
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/endswith.html]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)