[
https://issues.apache.org/jira/browse/FLINK-29748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17625440#comment-17625440
]
Aitozi commented on FLINK-29748:
--------------------------------
As I know, the \{{getScanRuntimeProvider}} will be invoked serval times during
the optimize, eg:
*
org.apache.flink.table.planner.connectors.DynamicSourceUtils#validateScanSource
*
org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecTableSourceScan#translateToPlanInternal
So, to the connector, it do not know whether the optimization is finished.
> 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)