SingleInputPlanNode otherNode = (SingleInputPlanNode) in; if (thisNode.getPredecessor() == otherNode) { } else if (otherNode.getPredecessor() == thisNode) { shouldAdd = false;
/** * Verifies that a robust repartitioning plan with a hash join is created in the absence of statistics. */ @Test public void testQueryNoStatistics() { try { Plan p = getTPCH3Plan(); p.setExecutionConfig(defaultExecutionConfig); // compile final OptimizedPlan plan = compileNoStats(p); final OptimizerPlanNodeResolver or = getOptimizerPlanNodeResolver(plan); // get the nodes from the final plan final SinkPlanNode sink = or.getNode(SINK); final SingleInputPlanNode reducer = or.getNode(REDUCE_NAME); final SingleInputPlanNode combiner = reducer.getPredecessor() instanceof SingleInputPlanNode ? (SingleInputPlanNode) reducer.getPredecessor() : null; final DualInputPlanNode join = or.getNode(JOIN_NAME); final SingleInputPlanNode filteringMapper = or.getNode(MAPPER_NAME); // verify the optimizer choices checkStandardStrategies(filteringMapper, join, combiner, reducer, sink); Assert.assertTrue(checkRepartitionShipStrategies(join, reducer, combiner)); Assert.assertTrue(checkHashJoinStrategies(join, reducer, true) || checkHashJoinStrategies(join, reducer, false)); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
SingleInputPlanNode combineNode = (SingleInputPlanNode) reduceNode.getPredecessor(); SingleInputPlanNode keyExtractorNode = (SingleInputPlanNode) combineNode.getPredecessor(); SingleInputPlanNode filterNode = (SingleInputPlanNode) keyExtractorNode.getPredecessor(); SingleInputPlanNode mapNode = (SingleInputPlanNode) filterNode.getPredecessor();
final SingleInputPlanNode combiner = reducer.getPredecessor() instanceof SingleInputPlanNode ? (SingleInputPlanNode) reducer.getPredecessor() : null; final DualInputPlanNode join = or.getNode(JOIN_NAME); final SingleInputPlanNode filteringMapper = or.getNode(MAPPER_NAME);
final SingleInputPlanNode combiner = (SingleInputPlanNode) reducer.getPredecessor(); final SingleInputPlanNode mapper = or.getNode(MAPPER_NAME);
SingleInputPlanNode map2Node = (SingleInputPlanNode) red2Node.getPredecessor();
SingleInputPlanNode map2Node = (SingleInputPlanNode) red2Node.getPredecessor();
SingleInputPlanNode map2Node = (SingleInputPlanNode) red2Node.getPredecessor();
SingleInputPlanNode map2Node = (SingleInputPlanNode) red2Node.getPredecessor();
SingleInputPlanNode mapNode = (SingleInputPlanNode) filterNode.getPredecessor();
SingleInputPlanNode combiner = (SingleInputPlanNode) reducer.getPredecessor(); Assert.assertEquals(DriverStrategy.SORTED_GROUP_COMBINE, combiner.getDriverStrategy()); Assert.assertEquals(l, combiner.getKeys(0));
SingleInputPlanNode minIdCombiner = (SingleInputPlanNode) minIdReducer.getPredecessor(); DualInputPlanNode updatingMatch = or.getNode(UPDATE_ID_MATCH);
SingleInputPlanNode minIdCombiner = (SingleInputPlanNode) minIdReducer.getPredecessor(); DualInputPlanNode updatingMatch = or.getNode(UPDATE_ID_MATCH);