当前位置: 首页>>代码示例>>Java>>正文


Java SimpleRootExec.close方法代码示例

本文整理汇总了Java中org.apache.drill.exec.physical.impl.SimpleRootExec.close方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleRootExec.close方法的具体用法?Java SimpleRootExec.close怎么用?Java SimpleRootExec.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.drill.exec.physical.impl.SimpleRootExec的用法示例。


在下文中一共展示了SimpleRootExec.close方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testHJMockScanCommon

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
private void testHJMockScanCommon(final DrillbitContext bitContext, UserClientConnection connection, String physicalPlan, int expectedRows) throws Throwable {

    mockDrillbitContext(bitContext);

    final PhysicalPlanReader reader = PhysicalPlanReaderTestFactory.defaultPhysicalPlanReader(c);
    final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(DrillFileUtils.getResourceAsFile(physicalPlan), Charsets.UTF_8));
    final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
    final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
    final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

    int totalRecordCount = 0;
    while (exec.next()) {
      totalRecordCount += exec.getRecordCount();
    }
    exec.close();
    assertEquals(expectedRows, totalRecordCount);
    System.out.println("Total Record Count: " + totalRecordCount);
    if (context.getFailureCause() != null) {
      throw context.getFailureCause();
    }
    assertTrue(!context.isFailed());
  }
 
开发者ID:axbaretto,项目名称:drill,代码行数:23,代码来源:TestHashJoin.java

示例2: testFilter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
public void testFilter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
  mockDrillbitContext(bitContext);

  final PhysicalPlanReader reader = PhysicalPlanReaderTestFactory.defaultPhysicalPlanReader(c);
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(DrillFileUtils.getResourceAsFile("/trace/multi_record_batch_trace.json"), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

  while(exec.next()) {
    for(final ValueVector vv: exec){
      vv.clear();
    }
  }

  exec.close();

  if(context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:24,代码来源:TestTraceMultiRecordBatch.java

示例3: testFilter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
  public void testFilter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
//    System.out.println(System.getProperty("java.class.path"));
    mockDrillbitContext(bitContext);

    final PhysicalPlanReader reader = PhysicalPlanReaderTestFactory.defaultPhysicalPlanReader(c);
    final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(DrillFileUtils.getResourceAsFile("/filter/test1.json"), Charsets.UTF_8));
    final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
    final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
    final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
    while(exec.next()) {
      assertEquals(50, exec.getRecordCount());
    }

    exec.close();

    if(context.getFailureCause() != null) {
      throw context.getFailureCause();
    }
    assertTrue(!context.isFailed());
  }
 
开发者ID:axbaretto,项目名称:drill,代码行数:22,代码来源:TestSimpleFilter.java

示例4: testSV4Filter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
@Ignore ("Filter does not support SV4")
public void testSV4Filter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
  mockDrillbitContext(bitContext);

  final PhysicalPlanReader reader = PhysicalPlanReaderTestFactory.defaultPhysicalPlanReader(c);
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(DrillFileUtils.getResourceAsFile("/filter/test_sv4.json"), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
  int recordCount = 0;
  while(exec.next()) {
    for (int i = 0; i < exec.getSelectionVector4().getCount(); i++) {
      System.out.println("Got: " + exec.getSelectionVector4().get(i));
    }
    recordCount += exec.getSelectionVector4().getCount();
  }
  exec.close();
  assertEquals(50, recordCount);

  if(context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:26,代码来源:TestSimpleFilter.java

示例5: testHJMockScanCommon

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
private void testHJMockScanCommon(final DrillbitContext bitContext, UserServer.UserClientConnection connection, String physicalPlan, int expectedRows) throws Throwable {
  final LocalPStoreProvider provider = new LocalPStoreProvider(c);
  provider.start();
  final SystemOptionManager opt = new SystemOptionManager(c, provider);
  opt.init();
  new NonStrictExpectations() {{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = RootAllocatorFactory.newRoot(c);
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
      bitContext.getOptionManager(); result = opt;
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
  }};

  final PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile(physicalPlan), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

  int totalRecordCount = 0;
  while (exec.next()) {
    totalRecordCount += exec.getRecordCount();
  }
  exec.close();
  assertEquals(expectedRows, totalRecordCount);
  System.out.println("Total Record Count: " + totalRecordCount);
  if (context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:33,代码来源:TestHashJoin.java

示例6: testFilter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
public void testFilter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
  new NonStrictExpectations() {{
    bitContext.getMetrics(); result = new MetricRegistry();
    bitContext.getAllocator(); result = RootAllocatorFactory.newRoot(c);
    bitContext.getConfig(); result = c;
    bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
    bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
  }};

  final PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/trace/multi_record_batch_trace.json"), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

  while(exec.next()) {
    for(final ValueVector vv: exec){
      vv.clear();
    }
  }

  exec.close();

  if(context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:30,代码来源:TestTraceMultiRecordBatch.java

示例7: testFilter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
  public void testFilter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
//    System.out.println(System.getProperty("java.class.path"));
    new NonStrictExpectations() {{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = RootAllocatorFactory.newRoot(c);
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
    }};

    final PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
    final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/filter/test1.json"), Charsets.UTF_8));
    final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
    final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
    final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
    while(exec.next()) {
      assertEquals(50, exec.getRecordCount());
    }

    exec.close();

    if(context.getFailureCause() != null) {
      throw context.getFailureCause();
    }
    assertTrue(!context.isFailed());
  }
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:28,代码来源:TestSimpleFilter.java

示例8: testSV4Filter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
@Ignore ("Filter does not support SV4")
public void testSV4Filter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
  new NonStrictExpectations() {{
    bitContext.getMetrics(); result = new MetricRegistry();
    bitContext.getAllocator(); result = RootAllocatorFactory.newRoot(c);
    bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
    bitContext.getConfig(); result = c;
    bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
  }};

  final PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/filter/test_sv4.json"), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
  int recordCount = 0;
  while(exec.next()) {
    for (int i = 0; i < exec.getSelectionVector4().getCount(); i++) {
      System.out.println("Got: " + exec.getSelectionVector4().get(i));
    }
    recordCount += exec.getSelectionVector4().getCount();
  }
  exec.close();
  assertEquals(50, recordCount);

  if(context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:32,代码来源:TestSimpleFilter.java

示例9: testDumpCat

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
public void testDumpCat(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable
{

    new NonStrictExpectations(){{
        bitContext.getMetrics(); result = new MetricRegistry();
        bitContext.getAllocator(); result = RootAllocatorFactory.newRoot(c);
        bitContext.getConfig(); result = c;
        bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
        bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
    }};

    final PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
    final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/trace/simple_trace.json"), Charsets.UTF_8));
    final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
    final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
    final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

    while(exec.next()) {
    }

    if(context.getFailureCause() != null) {
        throw context.getFailureCause();
    }
    assertTrue(!context.isFailed());

    exec.close();

    FragmentHandle handle = context.getHandle();

    /* Form the file name to which the trace output will dump the record batches */
    String qid = QueryIdHelper.getQueryId(handle.getQueryId());

    final int majorFragmentId = handle.getMajorFragmentId();
    final int minorFragmentId = handle.getMinorFragmentId();

    final String logLocation = c.getString(ExecConstants.TRACE_DUMP_DIRECTORY);

    System.out.println("Found log location: " + logLocation);

    final String filename = String.format("%s//%s_%d_%d_mock-scan", logLocation, qid, majorFragmentId, minorFragmentId);

    System.out.println("File Name: " + filename);

    final Configuration conf = new Configuration();
    conf.set(FileSystem.FS_DEFAULT_NAME_KEY, c.getString(ExecConstants.TRACE_DUMP_FILESYSTEM));

    final FileSystem fs = FileSystem.get(conf);
    final Path path = new Path(filename);
    assertTrue("Trace file does not exist", fs.exists(path));

    final DumpCat dumpCat = new DumpCat();

    //Test Query mode
    try (final FileInputStream input = new FileInputStream(filename)) {
      dumpCat.doQuery(input);
    }

    //Test Batch mode
    try(final FileInputStream input = new FileInputStream(filename)) {
      dumpCat.doBatch(input, 0, true);
    }
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:64,代码来源:DumpCatTest.java

示例10: testFilter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
public void testFilter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
  new NonStrictExpectations() {{
    bitContext.getMetrics(); result = new MetricRegistry();
    bitContext.getAllocator(); result = RootAllocatorFactory.newRoot(c);
    bitContext.getConfig(); result = c;
    bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
    bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
  }};

  final PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/trace/simple_trace.json"), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

  while(exec.next()) {
  }

  exec.close();

  if(context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());

  final FragmentHandle handle = context.getHandle();

  /* Form the file name to which the trace output will dump the record batches */
  final String qid = QueryIdHelper.getQueryId(handle.getQueryId());
  final int majorFragmentId = handle.getMajorFragmentId();
  final int minorFragmentId = handle.getMinorFragmentId();

  final String logLocation = c.getString(ExecConstants.TRACE_DUMP_DIRECTORY);
  System.out.println("Found log location: " + logLocation);

  final String filename = String.format("%s//%s_%d_%d_mock-scan", logLocation, qid, majorFragmentId, minorFragmentId);
  System.out.println("File Name: " + filename);

  final Configuration conf = new Configuration();
  conf.set(FileSystem.FS_DEFAULT_NAME_KEY, c.getString(ExecConstants.TRACE_DUMP_FILESYSTEM));

  final FileSystem fs = FileSystem.get(conf);
  final Path path = new Path(filename);
  assertTrue("Trace file does not exist", fs.exists(path));
  final FSDataInputStream in = fs.open(path);

  final VectorAccessibleSerializable wrap = new VectorAccessibleSerializable(context.getAllocator());
  wrap.readFromStream(in);
  final VectorAccessible container = wrap.get();

  /* Assert there are no selection vectors */
  assertTrue(wrap.getSv2() == null);

  /* Assert there is only one record */
  assertTrue(container.getRecordCount() == 1);

  /* Read the Integer value and ASSERT its Integer.MIN_VALUE */
  final int value = (int) container.iterator().next().getValueVector().getAccessor().getObject(0);
  assertTrue(value == Integer.MIN_VALUE);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:62,代码来源:TestTraceOutputDump.java

示例11: testDumpCat

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
public void testDumpCat(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable
{

    mockDrillbitContext(bitContext);

    final PhysicalPlanReader reader = defaultPhysicalPlanReader(c);
    final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(DrillFileUtils.getResourceAsFile("/trace/simple_trace.json"), Charsets.UTF_8));
    final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
    final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
    final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

    while(exec.next()) {
    }

    if(context.getFailureCause() != null) {
        throw context.getFailureCause();
    }
    assertTrue(!context.isFailed());

    exec.close();

    FragmentHandle handle = context.getHandle();

    /* Form the file name to which the trace output will dump the record batches */
    String qid = QueryIdHelper.getQueryId(handle.getQueryId());

    final int majorFragmentId = handle.getMajorFragmentId();
    final int minorFragmentId = handle.getMinorFragmentId();

    final String logLocation = c.getString(ExecConstants.TRACE_DUMP_DIRECTORY);

    System.out.println("Found log location: " + logLocation);

    final String filename = String.format("%s//%s_%d_%d_mock-scan", logLocation, qid, majorFragmentId, minorFragmentId);

    System.out.println("File Name: " + filename);

    final Configuration conf = new Configuration();
    conf.set(FileSystem.FS_DEFAULT_NAME_KEY, c.getString(ExecConstants.TRACE_DUMP_FILESYSTEM));

    final FileSystem fs = FileSystem.get(conf);
    final Path path = new Path(filename);
    assertTrue("Trace file does not exist", fs.exists(path));

    final DumpCat dumpCat = new DumpCat();

    //Test Query mode
    try (final FileInputStream input = new FileInputStream(filename)) {
      dumpCat.doQuery(input);
    }

    //Test Batch mode
    try(final FileInputStream input = new FileInputStream(filename)) {
      dumpCat.doBatch(input, 0, true);
    }
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:58,代码来源:DumpCatTest.java

示例12: testFilter

import org.apache.drill.exec.physical.impl.SimpleRootExec; //导入方法依赖的package包/类
@Test
public void testFilter(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable {
  mockDrillbitContext(bitContext);

  final PhysicalPlanReader reader = PhysicalPlanReaderTestFactory.defaultPhysicalPlanReader(c);
  final PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(DrillFileUtils.getResourceAsFile("/trace/simple_trace.json"), Charsets.UTF_8));
  final FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
  final FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
  final SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));

  while(exec.next()) {
  }

  exec.close();

  if(context.getFailureCause() != null) {
    throw context.getFailureCause();
  }
  assertTrue(!context.isFailed());

  final FragmentHandle handle = context.getHandle();

  /* Form the file name to which the trace output will dump the record batches */
  final String qid = QueryIdHelper.getQueryId(handle.getQueryId());
  final int majorFragmentId = handle.getMajorFragmentId();
  final int minorFragmentId = handle.getMinorFragmentId();

  final String logLocation = c.getString(ExecConstants.TRACE_DUMP_DIRECTORY);
  System.out.println("Found log location: " + logLocation);

  final String filename = String.format("%s//%s_%d_%d_mock-scan", logLocation, qid, majorFragmentId, minorFragmentId);
  System.out.println("File Name: " + filename);

  final Configuration conf = new Configuration();
  conf.set(FileSystem.FS_DEFAULT_NAME_KEY, c.getString(ExecConstants.TRACE_DUMP_FILESYSTEM));

  final FileSystem fs = FileSystem.get(conf);
  final Path path = new Path(filename);
  assertTrue("Trace file does not exist", fs.exists(path));
  final FSDataInputStream in = fs.open(path);

  final VectorAccessibleSerializable wrap = new VectorAccessibleSerializable(context.getAllocator());
  wrap.readFromStream(in);
  final VectorAccessible container = wrap.get();

  /* Assert there are no selection vectors */
  assertTrue(wrap.getSv2() == null);

  /* Assert there is only one record */
  assertTrue(container.getRecordCount() == 1);

  /* Read the Integer value and ASSERT its Integer.MIN_VALUE */
  final int value = (int) container.iterator().next().getValueVector().getAccessor().getObject(0);
  assertTrue(value == Integer.MIN_VALUE);
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:56,代码来源:TestTraceOutputDump.java


注:本文中的org.apache.drill.exec.physical.impl.SimpleRootExec.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。