[
https://issues.apache.org/jira/browse/FLINK-32264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-32264:
-----------------------------------
Labels: pull-request-available stale-assigned (was: pull-request-available)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issue is assigned but has not
received an update in 30 days, so it has been labeled "stale-assigned".
If you are still working on the issue, please remove the label and add a
comment updating the community on your progress. If this issue is waiting on
feedback, please consider this a reminder to the committer/reviewer. Flink is a
very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone
else may work on it.
> Add FIELD support in SQL & Table API
> ------------------------------------
>
> Key: FLINK-32264
> URL: https://issues.apache.org/jira/browse/FLINK-32264
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Affects Versions: 1.18.0
> Reporter: Bonnie Varghese
> Assignee: Hanyu Zheng
> Priority: Major
> Labels: pull-request-available, stale-assigned
> Fix For: 1.18.0
>
>
> FIELD Function
> Description
> The FIELD function returns the position of a value in a list of values (val1,
> val2, val3, ...).
> Syntax
> The syntax for the FIELD function is:
> FIELD( value, ...)
> Parameters or Arguments
> value
> The value to find in the list.
> val1, val2, val3, ...
> The list of values that is to be searched.
> Note
> If value is not found in the list of values (val1, val2, val3, ...), the
> FIELD function will return 0.
> If value is NULL, the FIELD function will return 0.
> If list of values is NULL, return 0.
> Example
> Let's look at some FIELD function examples and explore how to use the FIELD
> function.
> For example:
>
> {code:java}
> SELECT FIELD('b', 'a', 'b', 'c', 'd', 'e', 'f');
> Result: 2
> SELECT FIELD('B', 'a', 'b', 'c', 'd', 'e', 'f');
> Result: 2
> SELECT FIELD(15, 10, 20, 15, 40);
> Result: 3
> SELECT FIELD('c', 'a', 'b');
> Result: 0
> SELECT FIELD('g', '');
> Result: 0
> SELECT FIELD(null, 'a', 'b', 'c');
> Result: 0
> SELECT FIELD('a', null);
> Result: 0
> {code}
> see also:
> MySQL:https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_field
--
This message was sent by Atlassian Jira
(v8.20.10#820010)