CompiledPlan plan = env.compilePlanSql("insert into out_console " +
" select r.apply_id from t_purch_apply_sent_route r " +
" left join t_purch_apply_sent_route_goods FOR SYSTEM_TIME AS OF r.pt as t " +
"ON t.apply_id = r.apply_id and t.isdel = r.isdel" +
" where r.apply_id = 61558439941351 and t.route_goods_id is not null and
t.is_change = 2 " );
在 2023-12-25 20:46:36,"Jiabao Sun" <jiabao....@xtransfer.cn.INVALID> 写道:
>Hi,
>
>邮件中的图片没显示出来,麻烦把 SQL 贴出来一下。
>
>Best,
>Jiabao
>
>
>On 2023/12/25 12:22:41 杨光跃 wrote:
>> 我的sql如下:
>> 、
>>
>>
>> t_purch_apply_sent_route 是通过flink cdc创建的
>> t_purch_apply_sent_route_goods 是普通的jdbc
>> 我期望的结果是返回符合过滤条件的;但现在执行的结果,会返回t_purch_apply_sent_route表所有数据
>> 这显然不符合我的预期,原因应该是因为过滤条件进行了过早的下推
>> 这应该算是bug吧,或者要满足我的预期,该怎么写sql?
>>
>>
>>
>>