shameersss1 commented on code in PR #26162:
URL: https://github.com/apache/flink/pull/26162#discussion_r1963492616
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/optimize/program/FlinkRecomputeStatisticsProgram.java:
##########
@@ -115,25 +115,26 @@ private TableStats recomputeStatistics(
FilterPushDownSpec filterPushDownSpec,
boolean reportStatEnabled) {
TableStats origTableStats = table.getStatistic().getTableStats();
+ // bail out early if stats computation is disabled.
+ if (!reportStatEnabled) {
+ return origTableStats;
+ }
DynamicTableSource tableSource = table.tableSource();
if (filterPushDownSpec != null &&
!filterPushDownSpec.isAllPredicatesRetained()) {
// filter push down but some predicates are accepted by source and
not in reaming
// predicates
// the catalog do not support get statistics with filters,
- // so only call reportStatistics method if reportStatEnabled is
true
+ // so only call reportStatistics
Review Comment:
Ack. Will reword it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]