Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
1.11.0
-
None
-
None
Description
// code placeholder val sql0 = "create view v1 AS SELECT * FROM user_table" val sql = "SELECT T.id, T.len, T.content, D.name FROM src AS T JOIN v1 " + "for system_time as of T.proctime AS D ON T.id = D.id" val sink = new TestingAppendSink tEnv.executeSql(sql0) tEnv.sqlQuery(sql).toAppendStream[Row].addSink(sink) env.execute()
// code placeholder private void convertTemporalTable(Blackboard bb, SqlCall call) { final SqlSnapshot snapshot = (SqlSnapshot) call; final RexNode period = bb.convertExpression(snapshot.getPeriod()); // convert inner query, could be a table name or a derived table SqlNode expr = snapshot.getTableRef(); convertFrom(bb, expr); final TableScan scan = (TableScan) bb.root; final RelNode snapshotRel = relBuilder.push(scan).snapshot(period).build(); bb.setRoot(snapshotRel, false); }
it will exist cast Exception at final TableScan scan = (TableScan) bb.root;
java.lang.ClassCastException:
class org.apache.calcite.rel.logical.LogicalProject cannot be cast to class org.apache.calcite.rel.core.TableScan (org.apache.calcite.rel.logical.LogicalProject and org.apache.calcite.rel.core.TableScan are in unnamed module of loader 'app')
Attachments
Issue Links
- is duplicated by
-
FLINK-18548 Support temporal join on temporal table with computed columns
- Closed