Bonnie Varghese created FLINK-33248:
---------------------------------------

             Summary: 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


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)

Reply via email to