[ https://issues.apache.org/jira/browse/FLINK-35987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872241#comment-17872241 ]
Dylan He edited comment on FLINK-35987 at 8/9/24 8:28 AM: ---------------------------------------------------------- [~lincoln.86xy] After conducting some research, I have concluded that employing an *OrInputTypeStrategy* is inevitable. However, performing range checks within its child strategies results in the loss of valuable error message. Thus, we will continue to conduct checks for the index during runtime. BTW, there may be a need for an intermediate {{or}} strategy, positioned between the *OrInputTypeStrategy* and {*}OrArgumentTypeStrategy{*}, which allows us to specify certain parameters as optionally consistent in type without impacting others. This would facilitate more precise error message. I may create a new issue for that. was (Author: JIRAUSER305836): [~lincoln.86xy] After conducting some research, I have concluded that employing an *OrInputTypeStrategy* is inevitable. However, performing range checks within its child strategies results in the loss of valuable error information. Consequently, we will continue to conduct checks for the index during runtime. BTW, there may be a need for an intermediate {{or}} strategy, positioned between the *OrInputTypeStrategy* and {*}OrArgumentTypeStrategy{*}, which allows us to specify certain parameters as optionally consistent in type without impacting others. This would facilitate more precise error message. I may create a new issue for that. > Add ELT function > ---------------- > > Key: FLINK-35987 > URL: https://issues.apache.org/jira/browse/FLINK-35987 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / API > Reporter: Dylan He > Assignee: Dylan He > Priority: Major > Labels: pull-request-available > > Add ELT function. > ---- > Returns the {{index}}-th expression. > Example: > {code:sql} > > SELECT ELT(1, 'scala', 'java'); > scala > {code} > Syntax: > {code:sql} > ELT(index, expr...) > {code} > Arguments: > * {{index}}: An INTEGER expression. > * {{expr}}: A STRING or BINARY expression. One expr is required as least. > Returns: > The result has the type of the least common type of all {{expr}}. > {{index}} must be between 1 and the number of {{expr}}. Otherwise, the > function returns an error. > 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/elt.html] > * > [MySQL|https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_elt] -- This message was sent by Atlassian Jira (v8.20.10#820010)