Search in sources :

Example 1 with Descriptor

use of io.prestosql.sql.DynamicFilters.Descriptor in project hetu-core by openlookeng.

the class LocalDynamicFilter method mapProbeSymbols.

private static void mapProbeSymbols(RowExpression predicate, Set<String> joinDynamicFilters, Multimap<String, Symbol> probeSymbols) {
    DynamicFilters.ExtractResult extractResult = extractDynamicFilters(predicate);
    for (Descriptor descriptor : extractResult.getDynamicConjuncts()) {
        if (descriptor.getInput() instanceof VariableReferenceExpression) {
            // Add descriptors that match the local dynamic filter (from the current join node).
            if (joinDynamicFilters.contains(descriptor.getId())) {
                Symbol probeSymbol = new Symbol(((VariableReferenceExpression) descriptor.getInput()).getName());
                log.debug("Adding dynamic filter %s: %s", descriptor, probeSymbol);
                probeSymbols.put(descriptor.getId(), probeSymbol);
            }
        }
    }
}
Also used : DynamicFilters(io.prestosql.sql.DynamicFilters) DynamicFilters.extractDynamicFilters(io.prestosql.sql.DynamicFilters.extractDynamicFilters) VariableReferenceExpression(io.prestosql.spi.relation.VariableReferenceExpression) Symbol(io.prestosql.spi.plan.Symbol) Descriptor(io.prestosql.sql.DynamicFilters.Descriptor)

Aggregations

Symbol (io.prestosql.spi.plan.Symbol)1 VariableReferenceExpression (io.prestosql.spi.relation.VariableReferenceExpression)1 DynamicFilters (io.prestosql.sql.DynamicFilters)1 Descriptor (io.prestosql.sql.DynamicFilters.Descriptor)1 DynamicFilters.extractDynamicFilters (io.prestosql.sql.DynamicFilters.extractDynamicFilters)1