DynamicFilters
PrestoSql 中的功能是什么DistributedExecutionPlanner.Visitor
?
private Map<PlanNodeId, SplitSource> visitScanAndFilter(TableScanNode node, Optional<FilterNode> filter)
{
// ***What's the purpose of dynamicFilters and how to use it?***
List<DynamicFilters.Descriptor> dynamicFilters = filter
.map(FilterNode::getPredicate)
.map(expression -> extractDynamicFilters(metadata, expression))
.map(DynamicFilters.ExtractResult::getDynamicConjuncts)
.orElse(ImmutableList.of());
// TODO: Execution must be plugged in here
if (!dynamicFilters.isEmpty()) {
log.debug("Dynamic filters: %s", dynamicFilters);
}
// get dataSource for table
SplitSource splitSource = splitManager.getSplits(
session,
node.getTable(),
stageExecutionDescriptor.isScanGroupedExecution(node.getId()) ? GROUPED_SCHEDULING : UNGROUPED_SCHEDULING);
splitSources.add(splitSource);
return ImmutableMap.of(node.getId(), splitSource);
}