/** * Set all missing indexes to scan indexes recursively. */ private void setScanIndexes() { if (index == null) { setIndex(table.getScanIndex(session)); } if (join != null) { join.setScanIndexes(); } if (nestedJoin != null) { nestedJoin.setScanIndexes(); } }
/** * Set what plan item (index, cost, masks) to use. * * @param item the plan item */ public void setPlanItem(PlanItem item) { if (item == null) { // invalid plan, most likely because a column wasn't found // this will result in an exception later on return; } setIndex(item.getIndex()); masks = item.getMasks(); if (nestedJoin != null) { if (item.getNestedJoinPlan() != null) { nestedJoin.setPlanItem(item.getNestedJoinPlan()); } else { nestedJoin.setScanIndexes(); } } if (join != null) { if (item.getJoinPlan() != null) { join.setPlanItem(item.getJoinPlan()); } else { join.setScanIndexes(); } } }