return createDirectPlan(context.getCurrentEndpoint(), iter, (Class<T>) obj.getClass());
}
public static <T> PhysicalPlan createDirectPlan(DrillbitEndpoint endpoint, Iterator<T> iterator, Class<T> clazz){
PojoRecordReader<T> reader = new PojoRecordReader<T>(clazz, iterator);
DirectGroupScan scan = new DirectGroupScan(reader);
Screen screen = new Screen(scan, endpoint);
PlanPropertiesBuilder propsBuilder = PlanProperties.builder();
propsBuilder.type(PlanType.APACHE_DRILL_PHYSICAL);
propsBuilder.version(1);