hi. yuxia, Shengkai. thanks for your explanation. I originally wanted to say whether we can let SupportsReadingMetadata handle the metadata column alone (may provide an ability to merge 2 produced types), so that the 2 interfaces don't matter.
But through your explanation on the planner side just now, it's maybe not a easy job and involved too many places. I agree that we have no other better way to avoid it currently. yuxia <luoyu...@alumni.sjtu.edu.cn> 于2023年2月13日周一 10:16写道: > Sorry for the misktake, correct it. > "but I'm afraid that we have no other better way to avoid it. > > Best regards, > Yuxia > > ----- 原始邮件 ----- > 发件人: "yuxia" <luoyu...@alumni.sjtu.edu.cn> > 收件人: "dev" <dev@flink.apache.org> > 发送时间: 星期一, 2023年 2 月 13日 上午 10:11:53 > 主题: Re: Confusion about some overlapping functionality of > SupportsProjectionPushDown and SupportsReadingMetadata > > Hi, Ran Tao. > I agree to Shengkai that physical column pushdown and metadata processing > are different things and should be processed separately. > To me, it'll be more weird that SupportsReadingMetadata do the both. > > I agree you that that the developer may have unexpected behaviors due to > the sequence problem, but I don't think we have no other better way to > avoid it. > > Best regards, > Yuxia > > ----- 原始邮件 ----- > 发件人: "fskmine" <fskm...@gmail.com> > 收件人: "dev" <dev@flink.apache.org> > 发送时间: 星期五, 2023年 2 月 10日 下午 12:02:36 > 主题: Re: Confusion about some overlapping functionality of > SupportsProjectionPushDown and SupportsReadingMetadata > > Hi, Ran. > > I think it's a little difficult to split the rule into two parts. Because > the ProjectDown and ReadingMetadata both need to reorder the fields. The > ReadingMetadata requires the metadata columns to be at the last and the > ProjectPushDown now is responsible to reorder the columns as the user > specified. > > One more concern, the push-down optimization occurs in the logical phase > that uses the volcano planner. I am not sure whether the rule will be > applied at last because metadata push-down doesn't change the cost. > > Best, > Shengkai > -- Best Regards, Ran Tao https://github.com/chucheng92