@Override
    public void meet(Projection node) throws RuntimeException {
        super.meet(node);
        ProjectionElemList list = node.getProjectionElemList();
        String set = null;
        StringBuilder projList = new StringBuilder();
        boolean first = true;
        //TODO: we do not support projections from multiple pig statements yet
        for (String name : list.getTargetNames()) {
            set = varToSet.get(name);  //TODO: overwrite
            if (set == null) {
                throw new IllegalArgumentException("Have not found any pig logic for name[" + name + "]");
            }
            if (!first) {
                projList.append(",");
            }
            first = false;
            projList.append(name);
        }
        if (set == null)
            throw new IllegalArgumentException(""); //TODO: Fill this
        //SUBORG = FOREACH SUBORG_L GENERATE dept, univ;
        pigScriptBuilder.append("PROJ = FOREACH ").append(set).append(" GENERATE ").append(projList.toString()).append(";\n");
    }
@Override
    public void meet(Projection node) throws RuntimeException {
        super.meet(node);
        ProjectionElemList list = node.getProjectionElemList();
        String set = null;
        StringBuilder projList = new StringBuilder();
        boolean first = true;
       
        for (String name : list.getTargetNames()) {
            set = varToSet.get(name); 
            if (set == null) {
                throw new IllegalArgumentException("Have not found any pig logic for name[" + name + "]");
            }
            if (!first) {
                projList.append(",");
            }
            first = false;
            projList.append(name);
        }
        if (set == null)
            throw new IllegalArgumentException("");
       
        pigScriptBuilder.append("PROJ = FOREACH ").append(set).append(" GENERATE ").append(projList.toString()).append(";\n");
    }
@override public void meet(projection node) throws runtimeexception { super.meet(node); projectionelemlist list = node.getprojectionelemlist(); string set = null; stringbuilder projlist = new stringbuilder(); boolean first = true; for (string name : list.gettargetnames()) { set = vartoset.get(name); if (set == null) { throw new illegalargumentexception("have not found any pig logic for name[" + name + "]"); } if (!first) { projlist.append(","); } first = false; projlist.append(name); } if (set == null) throw new illegalargumentexception(""); pigscriptbuilder.append("proj = foreach ").append(set).append(" generate ").append(projlist.tostring()).append(";\n"); }