use of io.trino.execution.SqlQueryExecution in project trino by trinodb.
the class DynamicFilterService method registerQuery.
public void registerQuery(SqlQueryExecution sqlQueryExecution, SubPlan fragmentedPlan) {
PlanNode queryPlan = sqlQueryExecution.getQueryPlan().getRoot();
Set<DynamicFilterId> dynamicFilters = getProducedDynamicFilters(queryPlan);
Set<DynamicFilterId> replicatedDynamicFilters = getReplicatedDynamicFilters(queryPlan);
Set<DynamicFilterId> lazyDynamicFilters = fragmentedPlan.getAllFragments().stream().flatMap(plan -> getLazyDynamicFilters(plan).stream()).collect(toImmutableSet());
// register query only if it contains dynamic filters
if (!dynamicFilters.isEmpty()) {
registerQuery(sqlQueryExecution.getQueryId(), sqlQueryExecution.getSession(), dynamicFilters, lazyDynamicFilters, replicatedDynamicFilters);
}
}
Aggregations