[
https://issues.apache.org/jira/browse/FLINK-16343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17057569#comment-17057569
]
Jark Wu edited comment on FLINK-16343 at 3/12/20, 3:29 AM:
-----------------------------------------------------------
After some discussion with Kurt, this happens when querying on an unbounded
source in batch mode.
The reproduce example:
{code:scala}
@Test
def testScanOnUnboundedSource(): Unit = {
val util = batchTestUtil()
util.addTable(
"""
|CREATE TABLE src (
| ts TIMESTAMP(3),
| a INT,
| b DOUBLE,
| WATERMARK FOR ts AS ts - INTERVAL '0.001' SECOND
|) WITH (
| 'connector' = 'COLLECTION',
| 'is-bounded' = 'false'
|)
""".stripMargin)
util.verifyPlan("SELECT * FROM src WHERE a > 1")
}
{code}
The exception is as following:
{code:java}
org.apache.flink.table.api.TableException: Cannot generate a valid execution
plan for the given query:
FlinkLogicalCalc(select=[ts, a, b], where=[>(a, 1)])
+- FlinkLogicalTableSourceScan(table=[[default_catalog, default_database, src,
source: [CollectionTableSource(ts, a, b)]]], fields=[ts, a, b])
{code}
was (Author: jark):
After some discussion with Kurt, this happens when querying on an unbounded
source in batch mode. The exception is as following:
{code:java}
org.apache.flink.table.api.TableException: Cannot generate a valid execution
plan for the given query:
FlinkLogicalCalc(select=[ts, a, b], where=[>(a, 1)])
+- FlinkLogicalTableSourceScan(table=[[default_catalog, default_database, src,
source: [CollectionTableSource(ts, a, b)]]], fields=[ts, a, b])
{code}
> Failed to read a table with watermark in batch mode
> ---------------------------------------------------
>
> Key: FLINK-16343
> URL: https://issues.apache.org/jira/browse/FLINK-16343
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.10.0
> Reporter: Kurt Young
> Assignee: Jark Wu
> Priority: Major
> Fix For: 1.10.1, 1.11.0
>
>
> We can just ignore watermark in batch mode.
> cc [~jark]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)