Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * 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 com.facebook.presto.sql.planner.plan;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
public class UnnestNode
        extends PlanNode
    private final PlanNode source;
    private final List<SymbolreplicateSymbols;
    private final Map<SymbolList<Symbol>> unnestSymbols;
    @JsonCreator
    public UnnestNode(
            @JsonProperty("id"PlanNodeId id,
            @JsonProperty("source"PlanNode source,
            @JsonProperty("replicateSymbols"List<SymbolreplicateSymbols,
            @JsonProperty("unnestSymbols"Map<SymbolList<Symbol>> unnestSymbols)
    {
        super(id);
        this. = checkNotNull(source"source is null");
        this. = ImmutableList.copyOf(checkNotNull(replicateSymbols"replicateSymbols is null"));
        checkNotNull(unnestSymbols"unnestSymbols is null");
        checkArgument(!unnestSymbols.isEmpty(), "unnestSymbols is empty");
        ImmutableMap.Builder<SymbolList<Symbol>> builder = ImmutableMap.builder();
        for (Map.Entry<SymbolList<Symbol>> entry : unnestSymbols.entrySet()) {
            builder.put(entry.getKey(), ImmutableList.copyOf(entry.getValue()));
        }
        this. = builder.build();
    }
    @Override
    public List<SymbolgetOutputSymbols()
    {
        return ImmutableList.<Symbol>builder()
                .addAll()
                .addAll(Iterables.concat(.values()))
                .build();
    }
    public PlanNode getSource()
    {
        return ;
    }
    public List<SymbolgetReplicateSymbols()
    {
        return ;
    }
    public Map<SymbolList<Symbol>> getUnnestSymbols()
    {
        return ;
    }
    @Override
    public List<PlanNodegetSources()
    {
        return ImmutableList.of();
    }
    @Override
    public <C, R> R accept(PlanVisitor<C, R> visitor, C context)
    {
        return visitor.visitUnnest(thiscontext);
    }
New to GrepCode? Check out our FAQ X