public void testQuerySplitWithStarSchema() throws FrontendException {
planTester.buildPlan("a = load 'a' as (url, hitCount);");
LogicalPlan lp = planTester.buildPlan("split a into b if url == '3', c if COUNT(*) == '3';");
LOSplit split = (LOSplit)lp.getSuccessors(lp.getRoots().get(0)).get(0);
RequiredFields splitRelevantFields0 = split.getRelevantInputs(0, 0).get(0);
assertTrue(splitRelevantFields0.needAllFields() == false);
assertTrue(splitRelevantFields0.needNoFields() == false);
assertTrue(splitRelevantFields0.getFields().size() == 1);
assertTrue(splitRelevantFields0.getFields().contains(new Pair<Integer, Integer>(0, 0)));
RequiredFields splitRelevantFields1 = split.getRelevantInputs(0, 1).get(0);
assertTrue(splitRelevantFields1.needAllFields() == false);
assertTrue(splitRelevantFields1.needNoFields() == false);
assertTrue(splitRelevantFields1.getFields().size() == 1);
assertTrue(splitRelevantFields1.getFields().contains(new Pair<Integer, Integer>(0, 1)));
assertTrue(split.getRelevantInputs(0, 2) == null);
LOSplitOutput splitb = (LOSplitOutput)lp.getSuccessors(split).get(0);
RequiredFields splitbRelevantFields0 = splitb.getRelevantInputs(0, 0).get(0);
assertTrue(splitbRelevantFields0.getNeedAllFields() == false);
assertTrue(splitbRelevantFields0.getNeedNoFields() == false);
assertTrue(splitbRelevantFields0.getFields().size() == 1);
assertTrue(splitbRelevantFields0.getFields().get(0).first == 0);
assertTrue(splitbRelevantFields0.getFields().get(0).second == 0);
RequiredFields splitbRelevantFields1 = splitb.getRelevantInputs(0, 1).get(0);
assertTrue(splitbRelevantFields1.getNeedAllFields() == false);
assertTrue(splitbRelevantFields1.getNeedNoFields() == false);
assertTrue(splitbRelevantFields1.getFields().size() == 1);
assertTrue(splitbRelevantFields1.getFields().contains(new Pair<Integer, Integer>(0, 1)));
LOSplitOutput splitc = (LOSplitOutput)lp.getSuccessors(split).get(1);
RequiredFields splitcRelevantFields0 = splitc.getRelevantInputs(0, 0).get(0);
assertTrue(splitcRelevantFields0.getNeedAllFields() == false);
assertTrue(splitcRelevantFields0.getNeedNoFields() == false);
assertTrue(splitcRelevantFields0.getFields().size() == 1);
assertTrue(splitcRelevantFields0.getFields().contains(new Pair<Integer, Integer>(0, 0)));
RequiredFields splitcRelevantFields1 = splitc.getRelevantInputs(0, 1).get(0);
assertTrue(splitcRelevantFields1.getNeedAllFields() == false);
assertTrue(splitcRelevantFields1.getNeedNoFields() == false);
assertTrue(splitcRelevantFields1.getFields().size() == 1);
assertTrue(splitcRelevantFields1.getFields().contains(new Pair<Integer, Integer>(0, 1)));
}