...
private LogicalTableScan recomputeStatistics(LogicalTableScan scan) {
final RelOptTable scanTable = scan.getTable();
if (!(scanTable instanceof TableSourceTable)) {
return scan;
}
boolean reportStatEnabled =
ShortcutUtils.unwrapContext(scan)
.getTableConfig()
.get(TABLE_OPTIMIZER_SOURCE_COLLECTREPORT_STATISTICS_ENABLED)
&& table.tableSource() instanceof SupportsStatisticReport;
...