class TupleToRange implements Function<Tuple2<String,IndexInfo>,Iterator<QueryPlan>> {

    public static Iterator<QueryPlan> createShardRange(JexlNode queryNode, String shard, IndexInfo indexInfo) {
        JexlNode myNode = queryNode;
        if (indexInfo.getNode() != null) {
            myNode = indexInfo.getNode();
        }
        
        Range range = RangeFactory.createShardRange(shard);
        
        if (log.isTraceEnabled() && null != myNode) {
            log.trace("Building shard " + range + " From " + JexlStringBuildingVisitor.buildQuery(myNode));
        }
        
        return Collections.singleton(new QueryPlan(myNode, range)).iterator();
    }

    public  TupleToRange(JexlNode currentNode, ShardQueryConfiguration config);

}