Condizionatori dual split: come trovare elettricisti
Come trovare Elettricisti per Installare Condizionatori Dual Split.
Come Trovare un Elettricista per Installare un Condizionatore Dual Split.
Scopri come trovare i migliori elettricisti per l'installazione di condizionatori dual split e assicurati un servizio di qualità. In questo articolo, esploreremo consigli pratici e suggerimenti utili per scegliere professionisti esperti, garantendo comfort e efficienza nella tua casa o ufficio.
Trova professionisti vicino a te
Trova professionisti
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.prestosql.sql.planner.iterative.rule;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import io.prestosql.matching.Capture;
import io.prestosql.matching.Captures;
import io.prestosql.matching.Pattern;
import io.prestosql.sql.planner.iterative.Rule;
import io.prestosql.sql.planner.plan.JoinNode;
import io.prestosql.sql.planner.plan.PlanNode;
import java.util.Map;
import java.util.Optional;
import static io.prestosql.matching.Capture.newCapture;
import static io.prestosql.sql.planner.iterative.rule.Util.restrictOutputs;
import static io.prestosql.sql.planner.plan.Patterns.Join.Type.CROSS;
import static io.prestosql.sql.planner.plan.Patterns.Join.Type.INNER;
import static io.prestosql.sql.planner.plan.Patterns.join;
/**
* Cross joins can be restricted to their outputs in the same way as inner joins
*/
public class PruneCrossJoinColumns
implements Rule
{
private static final Capture CHILD = newCapture();
private static final Pattern PATTERN = join()
.with(Type.equalTo(CROSS).or(INNER))
.capturedAs(CHILD);
@Override
public Pattern getPattern()
{
return PATTERN;
}
@Override
public Optional apply(JoinNode joinNode, Captures captures, Context context)
{
JoinNode child = captures.get(CHILD);
if (joinNode.getOutputSymbols().equals(child.getOutputSymbols())) {
return Optional.empty();
}
Map replacements = ImmutableMap.of(
joinNode,
restrictOutputs(context.getIdAllocator(), child, joinNode.getOutputSymbols()));
return Optional.of(context.getReplacer().replaceChildren(joinNode, replacements, ImmutableList.of(child)));
}
}