[
https://issues.apache.org/jira/browse/FLINK-33248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bonnie Varghese updated FLINK-33248:
------------------------------------
Description:
Create a table
{code:java}
Flink SQL> CREATE TABLE T (ts TIMESTAMP(3)) WITH ('connector'='values',
'bounded'='true');
[INFO] Execute statement succeed. {code}
Select CURRENT_WATERMARK without parameters
{code:java}
Flink SQL> SELECT ts, CURRENT_WATERMARK() FROM T;
[ERROR] Could not execute SQL statement. Reason:
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 {code}
{*}Expected Behavior{*}:
It should return a SqlValidatorException: No match found for function signature
CURRENT_WATERMARK()
This is inline with other functions which expects a parameter
Example:
{code:java}
Flink SQL> SELECT ARRAY_JOIN();
[ERROR] Could not execute SQL statement. Reason:
org.apache.calcite.sql.validate.SqlValidatorException: No match found for
function signature ARRAY_JOIN(){code}
was:
Create a table
{code:java}
Flink SQL> CREATE TABLE T (ts TIMESTAMP(3)) WITH ('connector'='values',
'bounded'='true');
[INFO] Execute statement succeed. {code}
Select CURRENT_WATERMARK without parameters
{code:java}
Flink SQL> SELECT ts, CURRENT_WATERMARK() FROM T;
[ERROR] Could not execute SQL statement. Reason:
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 {code}
{*}Expected Behavior{*}:
It should return a SqlValidatorException: No match found for function signature
CURRENT_WATERMARK()
This is inline with other functions which expects a parameter
Example:
{code:java}
Flink SQL> SELECT ARRAY_JOIN();
[ERROR] Could not execute SQL statement. Reason:
org.apache.calcite.sql.validate.SqlValidatorException: No match found for
function signature ARRAY_JOIN {code}
> Calling CURRENT_WATERMARK without parameters gives IndexOutOfBoundsException
> ----------------------------------------------------------------------------
>
> Key: FLINK-33248
> URL: https://issues.apache.org/jira/browse/FLINK-33248
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Bonnie Varghese
> Priority: Minor
>
> Create a table
> {code:java}
> Flink SQL> CREATE TABLE T (ts TIMESTAMP(3)) WITH ('connector'='values',
> 'bounded'='true');
> [INFO] Execute statement succeed. {code}
> Select CURRENT_WATERMARK without parameters
> {code:java}
> Flink SQL> SELECT ts, CURRENT_WATERMARK() FROM T;
> [ERROR] Could not execute SQL statement. Reason:
> java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 {code}
>
>
> {*}Expected Behavior{*}:
> It should return a SqlValidatorException: No match found for function
> signature CURRENT_WATERMARK()
> This is inline with other functions which expects a parameter
> Example:
> {code:java}
> Flink SQL> SELECT ARRAY_JOIN();
> [ERROR] Could not execute SQL statement. Reason:
> org.apache.calcite.sql.validate.SqlValidatorException: No match found for
> function signature ARRAY_JOIN(){code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)