[ https://issues.apache.org/jira/browse/FLINK-29992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-29992: ----------------------------------- Labels: pull-request-available (was: ) > Join execution plan parsing error > --------------------------------- > > Key: FLINK-29992 > URL: https://issues.apache.org/jira/browse/FLINK-29992 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.16.0, 1.17.0 > Reporter: HunterXHunter > Priority: Major > Labels: pull-request-available > > {code:java} > // > tableEnv.executeSql(" CREATE CATALOG hive WITH (\n" > + " 'type' = 'hive',\n" > + " 'default-database' = 'flinkdebug',\n" > + " 'hive-conf-dir' = '/programe/hadoop/hive-3.1.2/conf'\n" > + " )"); > tableEnv.executeSql("create table datagen_tbl (\n" > + "id STRING\n" > + ",name STRING\n" > + ",age bigint\n" > + ",ts bigint\n" > + ",`par` STRING\n" > + ",pro_time as PROCTIME()\n" > + ") with (\n" > + " 'connector'='datagen'\n" > + ",'rows-per-second'='10'\n" > + " \n" > + ")"); > String dml1 = "select * " > + " from datagen_tbl as p " > + " join hive.flinkdebug.default_hive_src_tbl " > + " FOR SYSTEM_TIME AS OF p.pro_time AS c" > + " ON p.id = c.id"; > // Execution succeeded > System.out.println(tableEnv.explainSql(dml1)); > String dml2 = "select p.id " > + " from datagen_tbl as p " > + " join hive.flinkdebug.default_hive_src_tbl " > + " FOR SYSTEM_TIME AS OF p.pro_time AS c" > + " ON p.id = c.id"; > // Throw an exception > System.out.println(tableEnv.explainSql(dml2)); {code} > {code:java} > org.apache.flink.table.api.TableException: Cannot generate a valid execution > plan for the given query: FlinkLogicalCalc(select=[id]) +- > FlinkLogicalJoin(condition=[=($0, $1)], joinType=[inner]) :- > FlinkLogicalCalc(select=[id]) : +- > FlinkLogicalTableSourceScan(table=[[default_catalog, default_database, > datagen_tbl]], fields=[id, name, age, ts, par]) +- > FlinkLogicalSnapshot(period=[$cor1.pro_time]) +- > FlinkLogicalTableSourceScan(table=[[hive, flinkdebug, default_hive_src_tbl, > project=[id]]], fields=[id])This exception indicates that the query uses an > unsupported SQL feature. Please check the documentation for the set of > currently supported SQL features. at > org.apache.flink.table.planner.plan.optimize.program.FlinkVolcanoProgram.optimize(FlinkVolcanoProgram.scala:70) > at > org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram.$anonfun$optimize$1(FlinkChainedProgram.scala:59) > > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)