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)