incubator-streampark icon indicating copy to clipboard operation
incubator-streampark copied to clipboard

Querying an unbounded table 'default_catalog.default_database.s3' in batch mode is not allowed. The table source is unbounded.[Bug] Bug title

Open heine0310 opened this issue 1 year ago • 2 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Java Version

1.8

Scala Version

2.11.x

StreamPark Version

2.1.0

Flink Version

1.14.6

deploy mode

yarn-application

What happened

Querying an unbounded table 'default_catalog.default_database.s3' in batch mode is not allowed. The table source is unbounded.In the local IDE, I have configured the corresponding table mode as stream in the configuration file, but this error is still reported, even in conf mode, but there is no problem in writing directly on the web page

Error Exception

Exception in thread "main" org.apache.flink.table.api.ValidationException: Querying an unbounded table 'default_catalog.default_database.s3' in batch mode is not allowed. The table source is unbounded.
	at org.apache.flink.table.planner.connectors.DynamicSourceUtils.validateScanSourceForBatch(DynamicSourceUtils.java:514)
	at org.apache.flink.table.planner.connectors.DynamicSourceUtils.validateScanSource(DynamicSourceUtils.java:458)
	at org.apache.flink.table.planner.connectors.DynamicSourceUtils.prepareDynamicSource(DynamicSourceUtils.java:160)
	at org.apache.flink.table.planner.connectors.DynamicSourceUtils.convertSourceToRel(DynamicSourceUtils.java:124)
	at org.apache.flink.table.planner.plan.schema.CatalogSourceTable.toRel(CatalogSourceTable.java:85)
	at org.apache.calcite.sql2rel.SqlToRelConverter.toRel(SqlToRelConverter.java:3585)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:2507)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2144)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2093)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2050)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:663)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:644)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3438)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:570)
	at org.apache.flink.table.planner.calcite.FlinkPlannerImpl.org$apache$flink$table$planner$calcite$FlinkPlannerImpl$$rel(FlinkPlannerImpl.scala:177)
	at org.apache.flink.table.planner.calcite.FlinkPlannerImpl.rel(FlinkPlannerImpl.scala:169)
	at org.apache.flink.table.planner.operations.SqlToOperationConverter.toQueryOperation(SqlToOperationConverter.java:1057)
	at org.apache.flink.table.planner.operations.SqlToOperationConverter.convertSqlQuery(SqlToOperationConverter.java:1026)
	at org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:301)
	at org.apache.flink.table.planner.operations.SqlToOperationConverter.convertSqlInsert(SqlToOperationConverter.java:639)
	at org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:290)
	at org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:101)
	at org.apache.flink.table.api.internal.StatementSetImpl.addInsertSql(StatementSetImpl.java:53)
	at org.apache.streampark.flink.core.FlinkSqlExecutor$.$anonfun$executeSql$3(FlinkSqlExecutor.scala:118)
	at org.apache.streampark.flink.core.FlinkSqlExecutor$.$anonfun$executeSql$3$adapted(FlinkSqlExecutor.scala:57)
	at scala.collection.immutable.List.foreach(List.scala:388)
	at org.apache.streampark.flink.core.FlinkSqlExecutor$.executeSql(FlinkSqlExecutor.scala:57)
	at org.apache.streampark.flink.core.FlinkTableTrait.sql(FlinkTableTrait.scala:47)
	at com.atguigu.flink.streampark.StreamSQLDemo.main(StreamSQLDemo.java:22)

Screenshots

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!(您是否要贡献这个PR?)

Code of Conduct

heine0310 avatar Jul 22 '23 11:07 heine0310

table: planner: blink #(blink|old|any) mode: streaming #(batch|streaming)

heine0310 avatar Jul 22 '23 11:07 heine0310

You have registe catalog before read?

Mrart avatar Mar 30 '24 12:03 Mrart