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.operator.index;
import static com.facebook.presto.operator.index.PageBufferOperator.PageBufferOperatorFactory;
import static com.facebook.presto.operator.index.PagesIndexBuilderOperator.PagesIndexBuilderOperatorFactory;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
    private final int outputOperatorId;
    private final boolean inputDriver;
    private final List<OperatorFactorycoreOperatorFactories;
    private final List<TypeoutputTypes;
    public IndexBuildDriverFactoryProvider(int outputOperatorIdboolean inputDriverList<OperatorFactorycoreOperatorFactoriesOptional<DynamicTupleFilterFactorydynamicTupleFilterFactory)
    {
        checkNotNull(coreOperatorFactories"coreOperatorFactories is null");
        checkArgument(!coreOperatorFactories.isEmpty(), "coreOperatorFactories is empty");
        checkNotNull(dynamicTupleFilterFactory"dynamicTupleFilterFactory is null");
        this. = outputOperatorId;
        this. = inputDriver;
        this. = ImmutableList.copyOf(coreOperatorFactories);
        this. = ImmutableList.copyOf(this..get(this..size() - 1).getTypes());
        this. = dynamicTupleFilterFactory;
    }
    public List<TypegetOutputTypes()
    {
        return ;
    }
    public DriverFactory createSnapshot(IndexSnapshotBuilder indexSnapshotBuilder)
    {
        checkArgument(indexSnapshotBuilder.getOutputTypes().equals());
        return new DriverFactory(false, ImmutableList.<OperatorFactory>builder()
                .addAll()
                .add(new PagesIndexBuilderOperatorFactory(indexSnapshotBuilder))
                .build());
    }
    public DriverFactory createStreaming(PageBuffer pageBufferPage indexKeyTuple)
    {
        ImmutableList.Builder<OperatorFactoryoperatorFactories = ImmutableList.<OperatorFactory>builder()
                .addAll();
        if (.isPresent()) {
            // Bind in a dynamic tuple filter if necessary
            operatorFactories.add(.get().filterWithTuple(indexKeyTuple));
        }
        operatorFactories.add(new PageBufferOperatorFactory(pageBuffer));
        return new DriverFactory(falseoperatorFactories.build());
    }
New to GrepCode? Check out our FAQ X