[ 
https://issues.apache.org/jira/browse/FLINK-29748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626343#comment-17626343
 ] 

Shengkai Fang commented on FLINK-29748:
---------------------------------------

Yes. I think you are right. 

But I am confused about 

> If I want to validate the source do not consume too much partition, from the 
> connector's perspective, It do not know whether the optimization is finished, 
> so it do not know when to apply the validation on the final optimization 
> results.

The rule will only apply once during the optimization because the rule uses hep 
optimizer which is not based on the cost.


> Expose the optimize phase in the connector context
> --------------------------------------------------
>
>                 Key: FLINK-29748
>                 URL: https://issues.apache.org/jira/browse/FLINK-29748
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner, Table SQL / Runtime
>            Reporter: Aitozi
>            Priority: Minor
>
> Currently, in the connector it can not know whether the whole optimize is 
> finished.
> When the optimize finished, the all information is static, eg: the reading 
> partitions. If I want to validate the final optimized result (like whether 
> the reading partition is too much or empty), it needs the context of what is 
> the current phase. I think the {{ScanContext}} is ok to expose this 
> information. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to