Hi, I'm trying to run a UNION ALL query on two LookupTableSource tables defined with JDBC. When attempting this Flink complains that this is an unsupported feature:
Caused by: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: There are not enough rules to produce a node with desired properties: convention=STREAM_PHYSICAL, FlinkRelDistributionTraitDef=any, MiniBatchIntervalTraitDef=None: 0, ModifyKindSetTraitDef=[NONE], UpdateKindTraitDef=[NONE]. Missing conversions are FlinkLogicalTableSourceScan[convention: LOGICAL -> STREAM_PHYSICAL] (2 cases) There are 2 empty subsets: Empty subset 0: rel#191:RelSubset#4.STREAM_PHYSICAL.any.None: 0.[NONE].[NONE], the relevant part of the original plan is as follows 168:FlinkLogicalTableSourceScan(table=[[default_catalog, default_database, table]], fields=[...]) Empty subset 1: rel#192:RelSubset#5.STREAM_PHYSICAL.any.None: 0.[NONE].[NONE], the relevant part of the original plan is as follows 170:FlinkLogicalTableSourceScan(table=[[default_catalog, default_database, other_table]], fields=[...]) Root: rel#189:RelSubset#7.STREAM_PHYSICAL.any.None: 0.[NONE].[NONE] Original rel: FlinkLogicalSink(subset=[rel#166:RelSubset#3.LOGICAL.any.None: 0.[NONE].[NONE]], table=[default_catalog.default_database.table_output], fields=[...]): rowcount = 2.0E8, cumulative cost = {2.0E8 rows, 2.0E8 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 174 FlinkLogicalUnion(subset=[rel#173:RelSubset#2.LOGICAL.any.None: 0.[NONE].[NONE]], all=[true]): rowcount = 2.0E8, cumulative cost = {2.0E8 rows, 0.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 172 FlinkLogicalTableSourceScan(subset=[rel#169:RelSubset#0.LOGICAL.any.None: 0.[NONE].[NONE]], table=[[default_catalog, default_database, table]], fields=[...]): rowcount = 1.0E8, cumulative cost = {1.0E8 rows, 1.0E8 cpu, 1.32E10 io, 0.0 network, 0.0 memory}, id = 168 FlinkLogicalTableSourceScan(subset=[rel#171:RelSubset#1.LOGICAL.any.None: 0.[NONE].[NONE]], table=[[default_catalog, default_database, other_table]], fields=[...]): rowcount = 1.0E8, cumulative cost = {1.0E8 rows, 1.0E8 cpu, 1.32E10 io, 0.0 network, 0.0 memory}, id = 170 I do understand that the semantics of unioning two lookups may be a bit complicated, but was wondering if this is planned to be supported in the future? -- Best Regards, Yuval Itzchakov.