Hi,
这个异常信息可以提升的准确说是需要主键和even-time 时间属性,你的自定义维表是同时支持lookup和scan的吗?
这个异常信息可以提升的,如果确定问题的话可以再社区建个JIRA提升下的。

祝好
Leonard Xu

> 在 2021年1月9日,09:39,张韩 <[email protected]> 写道:
> 
> 版本:1.12
> 问题:维表关联若是支持事件时间,维表需要有主键和时间属性,在满足这两个条件前提下,自定义维表若是实现LookupTableSource接口则优化会报异常:
> 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 conversion is FlinkLogicalTableSourceScan[convention: LOGICAL -> 
> STREAM_PHYSICAL]
> 建议:LookupTableSource的维表关联需是系统时间,在优化规则LogicalCorrelateToJoinFromTemporalTableRule中把这种限制信息提示出来是不是更好些

回复