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.execution;
 
 
 import java.util.List;
 
 import static com.facebook.presto.SessionTestUtils.TEST_SESSION;
 import static com.facebook.presto.spi.type.VarcharType.VARCHAR;
 
 public final class TaskTestUtils
 {
     private TaskTestUtils()
     {
     }
 
     public static final ScheduledSplit SPLIT = new ScheduledSplit(0, new Split("test", TestingSplit.createLocalSplit()));
 
     public static final PlanNodeId TABLE_SCAN_NODE_ID = new PlanNodeId("tableScan");
 
     public static final ImmutableList<TaskSourceEMPTY_SOURCES = ImmutableList.of();
 
     public static final Symbol SYMBOL = new Symbol("column");
 
     public static final PlanFragment PLAN_FRAGMENT = new PlanFragment(
             new PlanFragmentId("fragment"),
             new TableScanNode(
                     ,
                     new TableHandle("test"new TestingTableHandle()),
                     ImmutableList.of(),
                     ImmutableMap.of(new ColumnHandle("test"new TestingColumnHandle("column"))),
                     null,
                     Optional.empty()),
             ImmutableMap.<SymbolType>of(),
             ImmutableList.of(),
             .,
             ,
             .,
             ImmutableList.<Symbol>of(),
             Optional.empty());
 
     public static LocalExecutionPlanner createTestingPlanner()
     {
         MetadataManager metadata = new MetadataManager();
 
         PageSourceManager pageSourceManager = new PageSourceManager(new SystemRecordSetProvider());
         pageSourceManager.addConnectorPageSourceProvider("test"new TestingPageSourceProvider());
         return new LocalExecutionPlanner(
                 metadata,
                 new SqlParser(),
                 pageSourceManager,
                 new IndexManager(),
                 new PageSinkManager(),
                 new MockExchangeClientSupplier(),
                 new ExpressionCompiler(metadata),
                 new IndexJoinLookupStats(),
                 new CompilerConfig(),
                 new TaskManagerConfig());
    }
    public static TaskInfo updateTask(SqlTask sqlTaskList<TaskSourcetaskSourcesOutputBuffers outputBuffers)
    {
        return sqlTask.updateTask(taskSourcesoutputBuffers);
    }
New to GrepCode? Check out our FAQ X