[
https://issues.apache.org/jira/browse/FLINK-32263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hanyu Zheng updated FLINK-32263:
--------------------------------
Description:
elt
elt(n, input1, input2, ...) - Returns the n-th input, e.g., returns input2 when
n is 2. The function returns NULL if the index exceeds the length of the array
and spark.sql.ansi.enabled is set to false. If spark.sql.ansi.enabled is set to
true, it throws ArrayIndexOutOfBoundsException for invalid indices.
{code:java}
Examples:
> SELECT elt(1, 'scala', 'java');
scala
> SELECT elt(2, 'a', 1);
1
{code}
see also:
spark:https://spark.apache.org/docs/latest/api/sql/index.html#elt
> Add ELT support in SQL & Table API
> ----------------------------------
>
> Key: FLINK-32263
> URL: https://issues.apache.org/jira/browse/FLINK-32263
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Affects Versions: 1.18.0
> Reporter: Bonnie Varghese
> Assignee: Hanyu Zheng
> Priority: Major
> Fix For: 1.18.0
>
>
> elt
> elt(n, input1, input2, ...) - Returns the n-th input, e.g., returns input2
> when n is 2. The function returns NULL if the index exceeds the length of the
> array and spark.sql.ansi.enabled is set to false. If spark.sql.ansi.enabled
> is set to true, it throws ArrayIndexOutOfBoundsException for invalid indices.
>
> {code:java}
> Examples:
> > SELECT elt(1, 'scala', 'java');
> scala
> > SELECT elt(2, 'a', 1);
> 1
> {code}
>
> see also:
> spark:https://spark.apache.org/docs/latest/api/sql/index.html#elt
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)