You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2023/10/12 10:51:00 UTC
[jira] [Closed] (FLINK-33248) Calling CURRENT_WATERMARK without parameters gives IndexOutOfBoundsException
[ https://issues.apache.org/jira/browse/FLINK-33248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Wysakowicz closed FLINK-33248.
------------------------------------
Fix Version/s: 1.19.0
Resolution: Fixed
Fixed in master: 35a2257af5d0cf9e671460b9770f1363b7a3d60c
> 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
> Assignee: Bonnie Varghese
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.19.0
>
>
> 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}
> Logs from sql-client:
> {code:java}
> 2023-10-11 14:58:20,576 ERROR org.apache.flink.table.gateway.service.operation.OperationManager [] - Failed to execute the operation cc8d29d3-e6ad-428a-92ea-b0a2a72c25f9.
> org.apache.flink.table.api.ValidationException: SQL validation failed. Unexpected error in type inference logic of function 'CURRENT_WATERMARK'. This is a bug.
> at org.apache.flink.table.planner.calcite.FlinkPlannerImpl.org$apache$flink$table$planner$calcite$FlinkPlannerImpl$$validate(FlinkPlannerImpl.scala:200) ~[?:?]
> at org.apache.flink.table.planner.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:117) ~[?:?]
> at org.apache.flink.table.planner.operations.SqlNodeToOperationConversion.convert(SqlNodeToOperationConversion.java:261) ~[?:?]
> at org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:106) ~[?:?]
> at org.apache.flink.table.gateway.service.operation.OperationExecutor.executeStatement(OperationExecutor.java:187) ~[flink-sql-gateway-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
> at org.apache.flink.table.gateway.service.SqlGatewayServiceImpl.lambda$executeStatement$1(SqlGatewayServiceImpl.java:212) ~[flink-sql-gateway-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
> at org.apache.flink.table.gateway.service.operation.OperationManager.lambda$submitOperation$1(OperationManager.java:119) ~[flink-sql-gateway-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
> at org.apache.flink.table.gateway.service.operation.OperationManager$Operation.lambda$run$0(OperationManager.java:258) ~[flink-sql-gateway-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
> at java.lang.Thread.run(Thread.java:829) [?:?] {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)