[ https://issues.apache.org/jira/browse/FLINK-29992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17633438#comment-17633438 ]
Leonard Xu edited comment on FLINK-29992 at 11/14/22 9:13 AM: -------------------------------------------------------------- master:a4f9bfd1483ef64b0ed167bd29c98596e3bd5f49 release-1.16: c946b0b95b7b8396eac7f03019eb279becddd301 release-1.15: TODO release-1.14: 9cb7b338c90b8183aa7ab4c9e094e47221d182cb was (Author: leonard xu): master:a4f9bfd1483ef64b0ed167bd29c98596e3bd5f49 release-1.16: TODO release-1.15: TODO release-1.14: 9cb7b338c90b8183aa7ab4c9e094e47221d182cb > 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, 1.15.3 > Reporter: HunterXHunter > Assignee: luoyuxia > 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)