Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.trino.sql.planner.plan;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import io.trino.metadata.TableFunctionHandle;
import io.trino.sql.planner.OrderingScheme;
import io.trino.sql.planner.Symbol;
import io.trino.sql.planner.plan.TableFunctionNode.PassThroughSpecification;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static com.google.common.collect.Iterables.getOnlyElement;
import static java.util.Objects.requireNonNull;
public class TableFunctionProcessorNode
extends PlanNode
{
private final String name;
// symbols produced by the function
private final List properOutputs;
// pre-planned sources
private final Optional source;
// TODO do we need the info of which source has row semantics, or is it already included in the joins / join distribution?
// specifies whether the function should be pruned or executed when the input is empty
// pruneWhenEmpty is false if and only if all original input tables are KEEP WHEN EMPTY
private final boolean pruneWhenEmpty;
// all source symbols to be produced on output, ordered as table argument specifications
private final List passThroughSpecifications;
// symbols required from each source, ordered as table argument specifications
private final List> requiredSymbols;
// mapping from source symbol to helper "marker" symbol which indicates whether the source value is valid
// for processing or for pass-through. null value in the marker column indicates that the value at the same
// position in the source column should not be processed or passed-through.
// the mapping is only present if there are two or more sources.
private final Optional