Package org.apache.drill.exec.physical.impl

Examples of org.apache.drill.exec.physical.impl.SimpleRootExec


    PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
    PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/filter/test_sv4.json"), Charsets.UTF_8));
    FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
    FragmentContext context = new FragmentContext(bitContext, PlanFragment.getDefaultInstance(), connection, registry);
    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.stop();
    assertEquals(50, recordCount);

    if(context.getFailureCause() != null){
      throw context.getFailureCause();
    }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.physical.impl.SimpleRootExec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.