You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by xu...@apache.org on 2011/05/07 01:57:25 UTC

svn commit: r1100416 [1/2] - in /pig/trunk: ./ src/ src/org/apache/pig/ src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/ src/org/apache/pig/impl/logicalLayer/ src/org/apache/pig/impl/logicalLayer/optimizer/ src/org/apache/pig/impl/logic...

Author: xuefu
Date: Fri May  6 23:57:21 2011
New Revision: 1100416

URL: http://svn.apache.org/viewvc?rev=1100416&view=rev
Log:
PIG-1775: Removal of old logical plan

Removed:
    pig/trunk/src/org/apache/pig/SortInfoSetter.java
    pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/LogToPhyTranslationVisitor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/BinaryExpressionOperator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/CastFinder.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ColumnPruner.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/DotLOPrinter.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ExpressionOperator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOAdd.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOAnd.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOBinCond.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCast.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCogroup.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOConst.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCross.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LODefine.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LODistinct.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LODivide.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOEqual.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOFilter.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOForEach.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOGenerate.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOGreaterThan.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOGreaterThanEqual.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOIsNull.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOJoin.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOLesserThan.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOLesserThanEqual.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOLimit.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOLoad.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOMapLookup.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOMod.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOMultiply.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LONative.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LONegative.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LONot.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LONotEqual.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOOr.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOPrinter.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOProject.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LORegexp.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOSort.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOSplit.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOSplitOutput.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOStore.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOStream.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOSubtract.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOUnion.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOUserFunc.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LOVisitor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalPlan.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalPlanCloneHelper.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/LogicalPlanCloner.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/PColFilterExtractor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/PlanSetter.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ProjectFixerUpper.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ProjectStarTranslator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ProjectionMapCalculator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ProjectionMapRemover.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/RelationalOperator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/RemoveRedundantOperators.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/ScalarFinder.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/TopLevelProjectFinder.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/UDFFinder.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/UnaryExpressionOperator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/UnionOnSchemaSetter.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/optimizer/
    pig/trunk/src/org/apache/pig/impl/logicalLayer/parser/
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/InputOutputFileValidator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/InputOutputFileVisitor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/LogicalPlanValidationExecutor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/SchemaAliasValidator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/SchemaAliasVisitor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/TypeCheckingValidator.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/TypeCheckingVisitor.java
    pig/trunk/src/org/apache/pig/impl/logicalLayer/validators/UnionOnSchemaSetException.java
    pig/trunk/src/org/apache/pig/impl/plan/DependencyOrderWalkerWOSeenChk.java
    pig/trunk/src/org/apache/pig/impl/plan/PlanPrinter.java
    pig/trunk/src/org/apache/pig/impl/plan/PlanValidationExecutor.java
    pig/trunk/src/org/apache/pig/impl/plan/PlanValidator.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/CommonNodeFinder.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/PlanOptimizer.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/Rule.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/RuleMatcher.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/RuleOperator.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/RulePlan.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/RulePlanPrinter.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/RulePlanVisitor.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/Transformer.java
    pig/trunk/src/org/apache/pig/newplan/logical/ForeachInnerPlanVisitor.java
    pig/trunk/src/org/apache/pig/newplan/logical/LogicalExpPlanMigrationVistor.java
    pig/trunk/src/org/apache/pig/newplan/logical/LogicalPlanMigrationVistor.java
    pig/trunk/test/org/apache/pig/test/OpLimitOptimizerPrinter.java
    pig/trunk/test/org/apache/pig/test/TestOperatorPlan.java
    pig/trunk/test/org/apache/pig/test/TypeGraphPrinter.java
    pig/trunk/test/org/apache/pig/test/utils/dotGraph/DotGraphVisitor.java
    pig/trunk/test/org/apache/pig/test/utils/planComparer/LogicalPlanComparer.java
Modified:
    pig/trunk/build.xml
    pig/trunk/src/org/apache/pig/impl/logicalLayer/package.html
    pig/trunk/src/org/apache/pig/impl/logicalLayer/schema/Schema.java
    pig/trunk/src/org/apache/pig/impl/plan/OperatorPlan.java
    pig/trunk/src/org/apache/pig/impl/plan/optimizer/OptimizerException.java
    pig/trunk/src/org/apache/pig/impl/util/LogUtils.java
    pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalPlan.java
    pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java
    pig/trunk/src/org/apache/pig/parser/StreamingCommandUtils.java
    pig/trunk/src/org/apache/pig/tools/grunt/Grunt.java
    pig/trunk/src/overview.html
    pig/trunk/test/commit-tests
    pig/trunk/test/org/apache/pig/test/TestAccumulator.java
    pig/trunk/test/org/apache/pig/test/TestConversions.java
    pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java
    pig/trunk/test/org/apache/pig/test/TestForEachStar.java
    pig/trunk/test/org/apache/pig/test/TestJoin.java
    pig/trunk/test/org/apache/pig/test/TestLoad.java
    pig/trunk/test/org/apache/pig/test/TestMultiQuery.java
    pig/trunk/test/org/apache/pig/test/TestPOCast.java
    pig/trunk/test/org/apache/pig/test/TestPigScriptParser.java
    pig/trunk/test/org/apache/pig/test/TestProjectRange.java
    pig/trunk/test/org/apache/pig/test/TestProjectStarExpander.java
    pig/trunk/test/org/apache/pig/test/TestRelationToExprProject.java
    pig/trunk/test/org/apache/pig/test/TestStore.java
    pig/trunk/test/org/apache/pig/test/TestStoreInstances.java
    pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java
    pig/trunk/test/org/apache/pig/test/TestTypedMap.java
    pig/trunk/test/org/apache/pig/test/TestUnionOnSchema.java
    pig/trunk/test/org/apache/pig/test/data/GoldenFiles/MRC18.gld
    pig/trunk/test/unit-tests

Modified: pig/trunk/build.xml
URL: http://svn.apache.org/viewvc/pig/trunk/build.xml?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/build.xml (original)
+++ pig/trunk/build.xml Fri May  6 23:57:21 2011
@@ -279,8 +279,6 @@
     <!-- Java Compiler Compiler, generate Parsers                           -->
     <!-- ================================================================== -->
     <target name="cc-compile" depends="init, ivy-compile" description="Create and Compile Parser">
-        <jjtree target="${src.dir}/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt" outputdirectory="${src.gen.query.parser.dir}" javacchome="${javacc.home}" />
-        <javacc target="${src.gen.query.parser.dir}/QueryParser.jj" outputdirectory="${src.gen.query.parser.dir}" javacchome="${javacc.home}" />
         <javacc target="${src.dir}/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj" outputdirectory="${src.gen.script.parser.dir}" javacchome="${javacc.home}" />
         <javacc target="${src.dir}/org/apache/pig/tools/parameters/PigFileParser.jj" outputdirectory="${src.gen.param.parser.dir}" javacchome="${javacc.home}" />
         <javacc target="${src.dir}/org/apache/pig/tools/parameters/ParamLoader.jj" outputdirectory="${src.gen.param.parser.dir}" javacchome="${javacc.home}" />

Modified: pig/trunk/src/org/apache/pig/impl/logicalLayer/package.html
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/logicalLayer/package.html?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/logicalLayer/package.html (original)
+++ pig/trunk/src/org/apache/pig/impl/logicalLayer/package.html Fri May  6 23:57:21 2011
@@ -37,14 +37,5 @@ procedural language where certain statem
 other statement in the language rather than being like SQL where the statement
 execution tends to be more linear.
 
-<h2> Notes </h2>
-<p>
-Heads up to developers:  when adding a new logical operator to the plan,
-there are a number of classes that need to know about every type of operator.
-These include {@link org.apache.pig.impl.logicalLayer.PlanSetter},
-{@link org.apache.pig.impl.logicalLayer.optimizer.SchemaRemover},
-{@link org.apache.pig.impl.logicalLayer.optimizer.SchemaCalculator}, and 
-{@link org.apache.pig.impl.logicalLayer.optimizer.LogicalTransformer}.
-
 </body>
 </html>

Modified: pig/trunk/src/org/apache/pig/impl/logicalLayer/schema/Schema.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/logicalLayer/schema/Schema.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/logicalLayer/schema/Schema.java (original)
+++ pig/trunk/src/org/apache/pig/impl/logicalLayer/schema/Schema.java Fri May  6 23:57:21 2011
@@ -26,9 +26,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.Collection;
-import java.util.Map.Entry;
 
-import org.apache.pig.FuncSpec;
 import org.apache.pig.PigException;
 import org.apache.pig.ResourceSchema;
 import org.apache.pig.ResourceSchema.ResourceFieldSchema;
@@ -38,7 +36,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.pig.impl.util.MultiMap;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.LogicalOperator;
 import org.apache.pig.impl.logicalLayer.CanonicalNamer;
 
 /**
@@ -92,33 +89,6 @@ public class Schema implements Serializa
          */
         public String canonicalName = null;
 
-        /*
-         * Map of canonical names used for this field in other sections of the
-         * plan.  It can occur that a single field will have different
-         * canonical names in different branches of a plan.  For example, 
-         * C = cogroup A by x, B by y.  In subsequent statements, the grouping
-         * column will have canonical name, say, of 'r'.  But in branches
-         * above the cogroup it may have been known as 's' in the A branch and
-         * 't' in the B branch.  This map preserves that.  The key is a
-         * logical operator, and the value is the canonical name
-         * associated with the field for that operator.
-         */
-        // marking transient since this data structure is only used in front-end
-        // query planning to figure out lineage for casts on bytearrays and need
-        // not be serialized to the backend
-        transient private Map<String, LogicalOperator> canonicalMap = null;
-
-        /**
-         * A reverse lookup of canonical names to logical operators. The reverse
-         * lookup serves cases where the canonical name of the predecessor
-         * cannot be determined. In such cases the keys of the reverse lookup
-         * can be used to navigate the plan
-         */
-        // marking transient since this data structure is only used in front-end
-        // query planning to figure out lineage for casts on bytearrays and need
-        // not be serialized to the backend
-        transient private MultiMap<LogicalOperator, String> reverseCanonicalMap = null;
-        
         /**
          * Canonical namer object to generate new canonical names on
          * request. In order to ensure unique and consistent names, across
@@ -141,9 +111,7 @@ public class Schema implements Serializa
             alias = a;
             type = t;
             schema = null;            
-            canonicalName = canonicalNamer.getNewName();
-            canonicalMap = new HashMap<String, LogicalOperator>();
-            reverseCanonicalMap = new MultiMap<LogicalOperator, String>();
+            canonicalName = CanonicalNamer.getNewName();
         }
 
         /**
@@ -158,9 +126,7 @@ public class Schema implements Serializa
             alias = a;
             type = DataType.TUPLE;
             schema = s;
-            canonicalName = canonicalNamer.getNewName();
-            canonicalMap = new HashMap<String, LogicalOperator>();
-            reverseCanonicalMap = new MultiMap<LogicalOperator, String>();
+            canonicalName = CanonicalNamer.getNewName();
         }
 
         /**
@@ -187,9 +153,7 @@ public class Schema implements Serializa
             }
             
             type = t;
-            canonicalName = canonicalNamer.getNewName();
-            canonicalMap = new HashMap<String, LogicalOperator>();
-            reverseCanonicalMap = new MultiMap<LogicalOperator, String>();
+            canonicalName = CanonicalNamer.getNewName();
         }
 
         /**
@@ -213,53 +177,7 @@ public class Schema implements Serializa
                 schema = null;
                 type = DataType.UNKNOWN;
             }
-            canonicalName = canonicalNamer.getNewName();
-            canonicalMap = new HashMap<String, LogicalOperator>();
-            reverseCanonicalMap = new MultiMap<LogicalOperator, String>();
-        }
-
-        /**
-         * Make a copy of the FieldSchema instance and link the new one to the old one with canonical map.
-         * 
-         * @param fs FieldSchema instance to be copied.
-         * @param op The operator to which the old FieldSchema instance belongs.
-         * @return a new copy
-         * @throws FrontendException
-         */
-        public static FieldSchema copyAndLink(FieldSchema fs, LogicalOperator op) {
-        	String alias = null;
-        	Schema schema = null;
-        	byte type = DataType.UNKNOWN;
-            if( null != fs ) {
-                alias = fs.alias;
-                if( null != fs.schema ) {
-                    schema = Schema.copyAndLink( fs.schema, op );
-                } else {
-                    schema = null;
-                }
-                type = fs.type;
-            }
-            
-            FieldSchema fieldSchema = new FieldSchema( alias, schema );
-            fieldSchema.type = type;
-            fieldSchema.setParent( fs == null ? null : fs.canonicalName, op );
-            
-            return fieldSchema;
-        }
-        
-        public void setParent(String parentCanonicalName, LogicalOperator parent) {
-            if(null != parentCanonicalName) {
-                canonicalMap.put(parentCanonicalName, parent);
-            }
-            reverseCanonicalMap.put(parent, parentCanonicalName);
-        }
-
-        public Map<String, LogicalOperator> getCanonicalMap() {
-            return canonicalMap;
-        }
-
-        public MultiMap<LogicalOperator, String> getReverseCanonicalMap() {
-            return reverseCanonicalMap;
+            canonicalName = CanonicalNamer.getNewName();
         }
 
         /**
@@ -450,11 +368,7 @@ public class Schema implements Serializa
             try {
                 FieldSchema fs = new FieldSchema(alias,
                     (schema == null ? null : schema.clone()), type);
-                fs.canonicalName = canonicalNamer.getNewName();
-                if (canonicalMap != null) {
-                    fs.canonicalMap =
-                        new HashMap<String, LogicalOperator>(canonicalMap);
-                }
+                fs.canonicalName = CanonicalNamer.getNewName();
                 return fs;
             } catch (FrontendException fe) {
                 throw new RuntimeException(
@@ -722,42 +636,6 @@ public class Schema implements Serializa
     }
 
     /**
-     * Make a copy of the given schema object and link the original with the copy using 
-     * canonical name map.
-     * 
-     * @param s The original schema
-     * @param op The operator to which the original belongs
-     * @return a new copy
-     */
-    public static Schema copyAndLink(Schema s, LogicalOperator op) {
-    	Schema result = new Schema();
-        if(null != s) {
-            result.twoLevelAccessRequired = s.twoLevelAccessRequired;
-            try {
-                for( int i = 0; i < s.size(); ++i ) {
-                    FieldSchema fs = FieldSchema.copyAndLink( s.getField(i), op );
-                    result.mFields.add(fs);
-                    if(null != fs) {
-                        if (fs.alias != null) {
-                            result.mAliases.put(fs.alias, fs);
-                            result.mFieldSchemas.put(fs.canonicalName, fs.alias);
-                        }
-                    }
-                }
-            } catch (FrontendException pe) {
-            	result.mFields = new ArrayList<FieldSchema>();
-            	result.mAliases = new HashMap<String, FieldSchema>();
-            	result.mFieldSchemas = new MultiMap<String, String>();
-            }
-        } else {
-        	result.mFields = new ArrayList<FieldSchema>();
-        	result.mAliases = new HashMap<String, FieldSchema>();
-        	result.mFieldSchemas = new MultiMap<String, String>();
-        }
-	    return result;
-    }
-
-    /**
      * Given an alias name, find the associated FieldSchema.
      * @param alias Alias to look up.
      * @return FieldSchema, or null if no such alias is in this tuple.

Modified: pig/trunk/src/org/apache/pig/impl/plan/OperatorPlan.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/plan/OperatorPlan.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/plan/OperatorPlan.java (original)
+++ pig/trunk/src/org/apache/pig/impl/plan/OperatorPlan.java Fri May  6 23:57:21 2011
@@ -1043,13 +1043,6 @@ public abstract class OperatorPlan<E ext
         }
     }
     
-    public void explain(
-            OutputStream out,
-            PrintStream ps) throws VisitorException, IOException {
-        PlanPrinter pp = new PlanPrinter(ps, this);
-        pp.print(out);
-    }
-
     /**
      * Swap two operators in a plan.  Both of the operators must have single
      * inputs and single outputs.

Modified: pig/trunk/src/org/apache/pig/impl/plan/optimizer/OptimizerException.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/plan/optimizer/OptimizerException.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/plan/optimizer/OptimizerException.java (original)
+++ pig/trunk/src/org/apache/pig/impl/plan/optimizer/OptimizerException.java Fri May  6 23:57:21 2011
@@ -17,7 +17,6 @@
  */
 package org.apache.pig.impl.plan.optimizer;
 
-import org.apache.pig.impl.logicalLayer.FrontendException;
 import org.apache.pig.impl.plan.VisitorException;
 
 public class OptimizerException extends VisitorException {

Modified: pig/trunk/src/org/apache/pig/impl/util/LogUtils.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/util/LogUtils.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/util/LogUtils.java (original)
+++ pig/trunk/src/org/apache/pig/impl/util/LogUtils.java Fri May  6 23:57:21 2011
@@ -106,7 +106,6 @@ public class LogUtils {
         } else {
             if((t instanceof ParseException 
                     || t instanceof org.apache.pig.tools.pigscript.parser.TokenMgrError 
-                    || t instanceof org.apache.pig.impl.logicalLayer.parser.TokenMgrError
                     || t instanceof org.apache.pig.tools.parameters.TokenMgrError)) {
                 message = "ERROR 1000: Error during parsing. " + t.getMessage();
             } else if (t instanceof IOException) {

Modified: pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalPlan.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalPlan.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalPlan.java (original)
+++ pig/trunk/src/org/apache/pig/newplan/logical/relational/LogicalPlan.java Fri May  6 23:57:21 2011
@@ -20,12 +20,10 @@ package org.apache.pig.newplan.logical.r
 
 import java.io.PrintStream;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.LOPrinter;
 import org.apache.pig.newplan.BaseOperatorPlan;
 import org.apache.pig.newplan.Operator;
 import org.apache.pig.newplan.OperatorPlan;

Modified: pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java (original)
+++ pig/trunk/src/org/apache/pig/parser/LogicalPlanBuilder.java Fri May  6 23:57:21 2011
@@ -46,7 +46,6 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.io.FileSpec;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.plan.NodeIdGenerator;
 import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.plan.PlanValidationException;
@@ -628,7 +627,7 @@ public class LogicalPlanBuilder {
             StreamingCommandUtils validator = new StreamingCommandUtils( pigContext );
             validator.checkAutoShipSpecs( command, args );
             return command;
-        } catch (ParseException e) {
+        } catch (ParserException e) {
             throw new InvalidCommandException( intStream, loc, cmd );
         }
     }
@@ -659,7 +658,7 @@ public class LogicalPlanBuilder {
             LOLoad load = (LOLoad)operators.get( loadAlias );
             plan.connect( op, load );
             return load.getAlias();
-        } catch (ParseException e) {
+        } catch (ParserException e) {
             throw new InvalidCommandException( input, loc, cmd );
         } catch (MalformedURLException e) {
             throw new InvalidPathException( input, loc, e);

Modified: pig/trunk/src/org/apache/pig/parser/StreamingCommandUtils.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/parser/StreamingCommandUtils.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/parser/StreamingCommandUtils.java (original)
+++ pig/trunk/src/org/apache/pig/parser/StreamingCommandUtils.java Fri May  6 23:57:21 2011
@@ -25,7 +25,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.pig.impl.PigContext;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.streaming.StreamingCommand;
 
 // Check and set files to be automatically shipped for the given StreamingCommand
@@ -50,7 +49,7 @@ public class StreamingCommandUtils {
         this.pigContext = pigContext;
     }
     
-    static String[] splitArgs(String command) throws ParseException {
+    static String[] splitArgs(String command) throws ParserException {
         List<String> argv = new ArrayList<String>();
 
         int beginIndex = 0;
@@ -101,7 +100,7 @@ public class StreamingCommandUtils {
             endIndex = command.indexOf(delim, endIndex);
             if (endIndex == -1) {
                 // Didn't find the ending quote/double-quote
-                throw new ParseException("Illegal command: " + command);
+                throw new ParserException("Illegal command: " + command);
             }
             argv.add(arg + command.substring(beginIndex, endIndex+1));
 
@@ -111,7 +110,7 @@ public class StreamingCommandUtils {
     }
 
     void checkAutoShipSpecs(StreamingCommand command, String[] argv) 
-    throws ParseException {
+    throws ParserException {
         // Candidate for auto-ship
         String arg0 = argv[0];
         
@@ -131,7 +130,7 @@ public class StreamingCommandUtils {
     }
     
     private void checkAndShip(StreamingCommand command, String arg) 
-    throws ParseException {
+    throws ParserException {
         // Don't auto-ship if it is an absolute path...
         if (arg.startsWith("/")) {
             return;
@@ -143,7 +142,7 @@ public class StreamingCommandUtils {
             try {
                 command.addPathToShip(argPath);
             } catch(IOException e) {
-               ParseException pe = new ParseException(e.getMessage());
+               ParserException pe = new ParserException(e.getMessage());
                pe.initCause(e);
                throw pe;
            }

Modified: pig/trunk/src/org/apache/pig/tools/grunt/Grunt.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/grunt/Grunt.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/tools/grunt/Grunt.java (original)
+++ pig/trunk/src/org/apache/pig/tools/grunt/Grunt.java Fri May  6 23:57:21 2011
@@ -17,16 +17,10 @@
  */
 package org.apache.pig.tools.grunt;
 
-import java.io.File;
 import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.io.IOException;
-import java.io.FileOutputStream;
 import java.util.ArrayList;
 
 import jline.ConsoleReader;
-import jline.Completor;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -35,10 +29,7 @@ import org.apache.pig.impl.PigContext;
 import org.apache.pig.tools.grunt.GruntParser;
 import org.apache.pig.tools.grunt.PigCompletor;
 import org.apache.pig.tools.grunt.PigCompletorAliases;
-import org.apache.pig.PigException;
 import org.apache.pig.backend.executionengine.ExecException;
-import org.apache.pig.tools.pigscript.parser.*;
-import org.apache.pig.impl.logicalLayer.parser.TokenMgrError;
 import org.apache.pig.impl.util.LogUtils;
 
 public class Grunt 

Modified: pig/trunk/src/overview.html
URL: http://svn.apache.org/viewvc/pig/trunk/src/overview.html?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/src/overview.html (original)
+++ pig/trunk/src/overview.html Fri May  6 23:57:21 2011
@@ -28,8 +28,8 @@ execution framework.
 <p>
 <h3> High Level Architecture </h3>
 Pig is split between the front and back ends of the engine.  In the front end,
-the parser transforms a Pig Latin script into a
-{@link org.apache.pig.impl.logicalLayer.LogicalPlan}.  Semantic checks (such
+the parser transforms a Pig Latin script into a logical plan.
+Semantic checks (such
 as type checking) and some optimizations (such as determining which fields in the data need
 to be read to satisfy the script) are done on this Logical Plan.  The Logical
 Plan is than transformed into a

Modified: pig/trunk/test/commit-tests
URL: http://svn.apache.org/viewvc/pig/trunk/test/commit-tests?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/commit-tests (original)
+++ pig/trunk/test/commit-tests Fri May  6 23:57:21 2011
@@ -32,7 +32,6 @@
 **/TestMultiply.java
 **/TestNotEqualTo.java
 **/TestNull.java
-**/TestOperatorPlan.java
 **/TestPOBinCond.java
 **/TestPOCast.java
 **/TestPOCogroup.java

Modified: pig/trunk/test/org/apache/pig/test/TestAccumulator.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestAccumulator.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestAccumulator.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestAccumulator.java Fri May  6 23:57:21 2011
@@ -28,7 +28,7 @@ import org.apache.pig.ExecType;
 import org.apache.pig.PigServer;
 import org.apache.pig.backend.executionengine.ExecException;
 import org.apache.pig.data.Tuple;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -675,7 +675,7 @@ public class TestAccumulator extends Tes
      * @throws ParseException
      */
     @Test
-    public void testAccumAfterNestedOp() throws IOException, ParseException{
+    public void testAccumAfterNestedOp() throws IOException, ParserException{
         // test group by
         pigServer.registerQuery("A = load '" + INPUT_FILE + "' as (id:int, fruit);");
         pigServer.registerQuery("B = group A by id;");

Modified: pig/trunk/test/org/apache/pig/test/TestConversions.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestConversions.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestConversions.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestConversions.java Fri May  6 23:57:21 2011
@@ -26,6 +26,7 @@ import org.apache.pig.ResourceSchema;
 import org.apache.pig.ResourceSchema.ResourceFieldSchema;
 import org.apache.pig.builtin.PigStorage;
 import org.apache.pig.builtin.Utf8StorageConverter;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.test.utils.GenRandomData;
 import org.apache.pig.test.utils.TestHelper;
 import org.apache.pig.data.Tuple;
@@ -33,7 +34,6 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.data.DataBag;
 import org.apache.pig.data.DataByteArray;
 import org.apache.pig.data.DataType;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.util.Utils;
 
@@ -304,7 +304,7 @@ public class TestConversions extends Tes
     }
     
     @Test
-    public void testBytesToComplexTypeMisc() throws IOException, ParseException {
+    public void testBytesToComplexTypeMisc() throws IOException, ParserException {
         String s = "(a,b";
         Schema schema = Utils.getSchemaFromString("t:tuple(a:chararray, b:chararray)");
         ResourceFieldSchema rfs = new ResourceSchema(schema).getFields()[0];
@@ -386,7 +386,7 @@ public class TestConversions extends Tes
     }
     
     @Test
-    public void testOverflow() throws IOException, ParseException {
+    public void testOverflow() throws IOException, ParserException {
     	Schema schema;
     	ResourceFieldSchema rfs;
     	Tuple tuple, convertedTuple;

Modified: pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestForEachNestedPlan.java Fri May  6 23:57:21 2011
@@ -36,7 +36,7 @@ import org.apache.pig.PigServer;
 import org.apache.pig.data.BagFactory;
 import org.apache.pig.data.DataBag;
 import org.apache.pig.data.Tuple;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.test.utils.TestHelper;
 import org.junit.AfterClass;
 import org.junit.Test;
@@ -147,7 +147,7 @@ public class TestForEachNestedPlan {
    
     @Test
     public void testAlgebricFuncWithoutGroupBy() 
-    throws IOException, ParseException {
+    throws IOException, ParserException {
         String INPUT_FILE = "test-sum.txt";
 
         PrintWriter w = new PrintWriter(new FileWriter(INPUT_FILE));
@@ -195,7 +195,7 @@ public class TestForEachNestedPlan {
 
     @Test
     public void testInnerDistinct() 
-    throws IOException, ParseException {
+    throws IOException, ParserException {
         String INPUT_FILE = "test-distinct.txt";
 
         PrintWriter w = new PrintWriter(new FileWriter(INPUT_FILE));

Modified: pig/trunk/test/org/apache/pig/test/TestForEachStar.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestForEachStar.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestForEachStar.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestForEachStar.java Fri May  6 23:57:21 2011
@@ -30,26 +30,19 @@ import org.apache.pig.backend.executione
 import org.apache.pig.data.DataByteArray;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-
 /**
  * Test "foreach alias generate *"
  */
 public class TestForEachStar {
-    
-
-    
-    
     private static final String INPUT_FILE = "TestForEachStarInput";
 
-
-
     @BeforeClass
     public static void oneTimeSetup() throws Exception{
         String[] input = { "one\ttwo" };
@@ -72,7 +65,7 @@ public class TestForEachStar {
     }
 
     @Test
-    public void testForeachStarSchemaUnkown() throws IOException, ParseException{
+    public void testForeachStarSchemaUnkown() throws IOException, ParserException{
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INPUT_FILE + "' ;"

Modified: pig/trunk/test/org/apache/pig/test/TestJoin.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestJoin.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestJoin.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestJoin.java Fri May  6 23:57:21 2011
@@ -33,13 +33,13 @@ import org.apache.pig.data.DataByteArray
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.io.FileLocalizer;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.util.LogUtils;
 import org.apache.pig.newplan.Operator;
 import org.apache.pig.newplan.logical.relational.LOJoin;
 import org.apache.pig.newplan.logical.relational.LogicalPlan;
 import org.apache.pig.newplan.logical.relational.LOJoin.JOINTYPE;
+import org.apache.pig.parser.ParserException;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
@@ -154,7 +154,7 @@ public class TestJoin extends TestCase {
     }
 
     @Test
-    public void testDefaultJoin() throws IOException, ParseException {
+    public void testDefaultJoin() throws IOException, ParserException {
         for (ExecType execType : execTypes) {
             setUp(execType);
             String[] input1 = {

Modified: pig/trunk/test/org/apache/pig/test/TestLoad.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestLoad.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestLoad.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestLoad.java Fri May  6 23:57:21 2011
@@ -48,10 +48,10 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.io.FileLocalizer;
 import org.apache.pig.impl.io.FileSpec;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.newplan.Operator;
 import org.apache.pig.newplan.logical.relational.LOLoad;
 import org.apache.pig.newplan.logical.relational.LogicalPlan;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.parser.QueryParserDriver;
 import org.apache.pig.test.utils.GenPhyOp;
 import org.apache.pig.test.utils.TestHelper;
@@ -269,7 +269,7 @@ public class TestLoad extends junit.fram
     
     @SuppressWarnings("unchecked")
     private void testLoadingMultipleFiles(String[] inputFileNames, 
-            String loadLocationString) throws IOException, ParseException {
+            String loadLocationString) throws IOException, ParserException {
         
         String[][] inputStrings = new String[][] {
                 new String[] { "hello\tworld"},

Modified: pig/trunk/test/org/apache/pig/test/TestMultiQuery.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestMultiQuery.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestMultiQuery.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestMultiQuery.java Fri May  6 23:57:21 2011
@@ -425,7 +425,8 @@ public class TestMultiQuery {
             assertTrue(job.getStatus() == ExecJob.JOB_STATUS.COMPLETED);
         }
     }
-    
+
+/** Test case is disabled due to PIG-2038
     @Test
     public void testMultiQueryJiraPig1113() throws Exception {
 
@@ -711,7 +712,7 @@ public class TestMultiQuery {
             assertTrue(job.getStatus() == ExecJob.JOB_STATUS.COMPLETED);
         }
     }
-    
+*/
     @Test
     public void testMultiQueryJiraPig976_6() throws Exception {
 

Modified: pig/trunk/test/org/apache/pig/test/TestPOCast.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestPOCast.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestPOCast.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestPOCast.java Fri May  6 23:57:21 2011
@@ -46,7 +46,6 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.io.BufferedPositionedInputStream;
 import org.apache.pig.impl.plan.OperatorKey;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit;
 import org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus;
@@ -56,6 +55,7 @@ import org.apache.pig.backend.hadoop.exe
 import org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject;
 import org.apache.pig.impl.plan.PlanException;
 import org.apache.pig.impl.util.Utils;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.test.utils.GenRandomData;
 import org.apache.pig.builtin.PigStorage;
 import org.apache.pig.builtin.BinStorage;
@@ -1343,7 +1343,7 @@ public class TestPOCast extends TestCase
 	}
 	
 	@Test
-	public void testTupleToOther() throws IOException, ParseException {
+	public void testTupleToOther() throws IOException, ParserException {
 		POCast op = new POCast(new OperatorKey("", r.nextLong()), -1);
 		op.setFuncSpec(new FuncSpec(PigStorage.class.getName()));
 		POProject prj = new POProject(new OperatorKey("", r.nextLong()), -1, 0);
@@ -1486,7 +1486,7 @@ public class TestPOCast extends TestCase
 	}
 	
 	@Test
-	public void testBagToOther() throws IOException, ParseException {
+	public void testBagToOther() throws IOException, ParserException {
 		POCast op = new POCast(new OperatorKey("", r.nextLong()), -1);
 		op.setFuncSpec(new FuncSpec(PigStorage.class.getName()));
 		POProject prj = new POProject(new OperatorKey("", r.nextLong()), -1, 0);

Modified: pig/trunk/test/org/apache/pig/test/TestPigScriptParser.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestPigScriptParser.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestPigScriptParser.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestPigScriptParser.java Fri May  6 23:57:21 2011
@@ -17,15 +17,12 @@
  */
 package org.apache.pig.test;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
 import java.util.Properties;
 
 import org.junit.Test;
@@ -35,11 +32,8 @@ import org.apache.pig.PigServer;
 import org.apache.pig.ExecType;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.PigContext;
-import org.apache.pig.impl.plan.OperatorKey;
-import org.apache.pig.impl.logicalLayer.parser.* ;
 import org.apache.pig.newplan.Operator;
 import org.apache.pig.newplan.logical.expression.ConstantExpression;
-import org.apache.pig.newplan.logical.expression.LogicalExpression;
 import org.apache.pig.newplan.logical.expression.LogicalExpressionPlan;
 import org.apache.pig.newplan.logical.relational.LOFilter;
 import org.apache.pig.newplan.logical.relational.LogicalPlan;

Modified: pig/trunk/test/org/apache/pig/test/TestProjectRange.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestProjectRange.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestProjectRange.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestProjectRange.java Fri May  6 23:57:21 2011
@@ -37,7 +37,6 @@ import org.apache.pig.PigServer;
 import org.apache.pig.backend.executionengine.ExecException;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema;
 import org.apache.pig.impl.plan.CompilationMessageCollector;
@@ -52,6 +51,7 @@ import org.apache.pig.newplan.logical.vi
 import org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor;
 import org.apache.pig.newplan.logical.visitor.TypeCheckingRelVisitor;
 import org.apache.pig.newplan.logical.visitor.UnionOnSchemaSetter;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.parser.ParserTestingUtils;
 import org.apache.pig.test.utils.NewLogicalPlanUtil;
 import org.junit.After;
@@ -116,11 +116,11 @@ public class TestProjectRange  {
     /**
      * Test project-range in foreach with limits on both sides
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
 
     @Test
-    public void testFullRangeForeachWSchema() throws IOException, ParseException {
+    public void testFullRangeForeachWSchema() throws IOException, ParserException {
 
         String query;
         
@@ -187,7 +187,7 @@ public class TestProjectRange  {
 
 
     private void compileAndCompareSchema(String expectedSchStr, String query, String alias)
-    throws IOException, ParseException {
+    throws IOException, ParserException {
 
         Schema expectedSch = null;
         
@@ -209,10 +209,10 @@ public class TestProjectRange  {
     /**
      * Test project-range in foreach with starting limit
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testEndRangeForeachWSchema() throws IOException, ParseException {
+    public void testEndRangeForeachWSchema() throws IOException, ParserException {
 
         //specifying the new aliases 
         String query;
@@ -265,10 +265,10 @@ public class TestProjectRange  {
     /**
      * Test project-range in foreach with start limit
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testStartRangeForeachWSchema() throws IOException, ParseException {
+    public void testStartRangeForeachWSchema() throws IOException, ParserException {
 
         //specifying the new aliases 
         String query =
@@ -323,10 +323,10 @@ public class TestProjectRange  {
     /**
      * Test multiple different types of range-project with foreach
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
    @Test
-    public void testMixRangeForeachWSchema() throws IOException, ParseException {
+    public void testMixRangeForeachWSchema() throws IOException, ParserException {
 
         //specifying the new aliases 
         String query;
@@ -358,10 +358,10 @@ public class TestProjectRange  {
     /**
      * -ve test cases
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testNegativeForeachWSchema() throws IOException, ParseException {
+    public void testNegativeForeachWSchema() throws IOException, ParserException {
         String query;
         query =
             "  l1 = load '" + INP_FILE_5FIELDS + "' as (a : int, b : float, c : int, d : int, e : int);"
@@ -382,10 +382,10 @@ public class TestProjectRange  {
     /**
      * -ve test cases
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testNegativeForeachNOSchema() throws IOException, ParseException {
+    public void testNegativeForeachNOSchema() throws IOException, ParserException {
         String query;
         query =
             "  l1 = load '" + INP_FILE_5FIELDS + "';"
@@ -405,10 +405,10 @@ public class TestProjectRange  {
     /**
      * Test foreach without schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testStartRangeForeachNOSchema() throws IOException, ParseException {
+    public void testStartRangeForeachNOSchema() throws IOException, ParserException {
 
         String query;
         
@@ -441,10 +441,10 @@ public class TestProjectRange  {
     /**
      * Test foreach without schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testMixRangeForeachNOSchema() throws IOException, ParseException {
+    public void testMixRangeForeachNOSchema() throws IOException, ParserException {
 
         String query;
         
@@ -476,10 +476,10 @@ public class TestProjectRange  {
     /**
      * Test foreach without schema - with some operations after the foreach
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     //@Test
-    public void testRangeForeachWFilterNOSchema() throws IOException, ParseException {
+    public void testRangeForeachWFilterNOSchema() throws IOException, ParserException {
         //TODO: fix depends on PIG-1910
         //fails with - In alias fil, incompatible types in GreaterThan 
         //         Operator left hand side:Unknown right hand side:Unknown
@@ -506,7 +506,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeOrderByWSchema() throws IOException, ParseException{
+    public void testRangeOrderByWSchema() throws IOException, ParserException{
         String query;
         
         {
@@ -601,10 +601,10 @@ public class TestProjectRange  {
     /**
      * Test nested order-by with schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testRangeOrderByNestedWSchema() throws IOException, ParseException{
+    public void testRangeOrderByNestedWSchema() throws IOException, ParserException{
         String query;
         
         {
@@ -693,10 +693,10 @@ public class TestProjectRange  {
     /**
      * Test nested order-by without schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testRangeOrderByNestedNOSchema() throws IOException, ParseException{
+    public void testRangeOrderByNestedNOSchema() throws IOException, ParserException{
         String query;
         
         {
@@ -816,7 +816,7 @@ public class TestProjectRange  {
     }
 
     @Test
-    public void testRangeOrderByMixWSchema() throws IOException, ParseException{
+    public void testRangeOrderByMixWSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -847,7 +847,7 @@ public class TestProjectRange  {
 
 
     @Test
-    public void testRangeOrderByMixNOSchema() throws IOException, ParseException{
+    public void testRangeOrderByMixNOSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -877,7 +877,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeOrderByStartNOSchema() throws IOException, ParseException{
+    public void testRangeOrderByStartNOSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -907,7 +907,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeOrderByStartNegNOSchema() throws IOException, ParseException{
+    public void testRangeOrderByStartNegNOSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -919,7 +919,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeGroupWSchema() throws IOException, ParseException{
+    public void testRangeGroupWSchema() throws IOException, ParserException{
         String query;
 
         {
@@ -996,10 +996,10 @@ public class TestProjectRange  {
      * group as a column name in schema, and to add tuple within bag schema
      * @param expectedSchStr
      * @return
-     * @throws ParseException
+     * @throws ParserException
      * @throws FrontendException
      */
-    private Schema getCleanedGroupSchema(String expectedSchStr) throws ParseException, FrontendException {
+    private Schema getCleanedGroupSchema(String expectedSchStr) throws ParserException, FrontendException {
         Schema expectedSch = Utils.getSchemaFromString(expectedSchStr);
         expectedSch.getField(0).alias = "group";
         if(expectedSch.size() > 1)
@@ -1023,7 +1023,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeCoGroupMixWSchema() throws IOException, ParseException{
+    public void testRangeCoGroupMixWSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -1059,7 +1059,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeGroupMixWSchema() throws IOException, ParseException{
+    public void testRangeGroupMixWSchema() throws IOException, ParserException{
         String query;
 
         {
@@ -1111,7 +1111,7 @@ public class TestProjectRange  {
     
     
     @Test
-    public void testRangeGroupMixNOSchema() throws IOException, ParseException{
+    public void testRangeGroupMixNOSchema() throws IOException, ParserException{
         String query;
 
         {
@@ -1178,7 +1178,7 @@ public class TestProjectRange  {
     }
 
     @Test
-    public void testRangeJoinMixWSchema() throws IOException, ParseException{
+    public void testRangeJoinMixWSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -1211,7 +1211,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeJoinMixNOSchema() throws IOException, ParseException{
+    public void testRangeJoinMixNOSchema() throws IOException, ParserException{
         String query;
 
         query =
@@ -1239,7 +1239,7 @@ public class TestProjectRange  {
     }
     
     @Test
-    public void testRangeCoGroupNegNoSchema() throws IOException, ParseException{
+    public void testRangeCoGroupNegNoSchema() throws IOException, ParserException{
         String query;
         //cogroup
         query =

Modified: pig/trunk/test/org/apache/pig/test/TestProjectStarExpander.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestProjectStarExpander.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestProjectStarExpander.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestProjectStarExpander.java Fri May  6 23:57:21 2011
@@ -30,18 +30,15 @@ import org.apache.pig.ExecType;
 import org.apache.pig.PigServer;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.io.FileLocalizer;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.util.Utils;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-
-
-
 /**
  * Test project of multiple fields
  */
@@ -78,7 +75,7 @@ public class TestProjectStarExpander  {
 
 
     @Test
-    public void testProjectStarForeach() throws IOException, ParseException {
+    public void testProjectStarForeach() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         
         //specifying the new aliases only for initial set of fields
@@ -121,7 +118,7 @@ public class TestProjectStarExpander  {
      * @throws ParseException
      */
     @Test
-    public void testProjectStarMulti() throws IOException, ParseException {
+    public void testProjectStarMulti() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_5FIELDS + "' as (a : int, b : int, c : int);"

Modified: pig/trunk/test/org/apache/pig/test/TestRelationToExprProject.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestRelationToExprProject.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestRelationToExprProject.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestRelationToExprProject.java Fri May  6 23:57:21 2011
@@ -26,12 +26,10 @@ import java.util.Map;
 
 import org.apache.pig.PigServer;
 import org.apache.pig.data.BagFactory;
-import org.apache.pig.data.DataByteArray;
 import org.apache.pig.data.DefaultTuple;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.data.TupleFactory;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
-import org.apache.pig.impl.util.LogUtils;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -91,7 +89,7 @@ public class TestRelationToExprProject e
     // for a group, an empty bag is still provided to udfs whose
     // input is the filter
     @Test
-    public void testFilterCount1() throws IOException, ParseException {
+    public void testFilterCount1() throws IOException, ParserException {
         
         String[] inputData = new String[] {"1\t1\t3","1\t2\t3", "2\t1\t3", "2\t1\t3"};
         Util.createInputFile(cluster, "test.txt", inputData);
@@ -132,7 +130,7 @@ public class TestRelationToExprProject e
     // for a group, an empty bag is still provided to udfs whose
     // input is the filter
     @Test
-    public void testFilterCount2() throws IOException, ParseException {
+    public void testFilterCount2() throws IOException, ParserException {
         Util.createInputFile(cluster, "filterbug.data", new String[] {
                 "a\thello" ,
                 "a\tgoodbye" ,
@@ -176,7 +174,7 @@ public class TestRelationToExprProject e
     // for a group, an empty bag is still provided to udfs whose
     // input is the filter
     @Test
-    public void testFilterCount3() throws IOException, ParseException {
+    public void testFilterCount3() throws IOException, ParserException {
         Util.copyFromLocalToCluster(cluster, TEST_FILTER_COUNT3_INPUT, "testdata");
         String query = "TESTDATA =  load 'testdata' using PigStorage() as (timestamp:chararray, testid:chararray, userid: chararray, sessionid:chararray, value:long, flag:int);" +
         		"TESTDATA_FILTERED = filter TESTDATA by (timestamp gte '1230800400000' and timestamp lt '1230804000000' and value != 0);" +
@@ -205,7 +203,7 @@ public class TestRelationToExprProject e
     // single inner plan of foreach - this will test that it does
     // send an EOP eventually for each input of the foreach
     @Test
-    public void testFilter1() throws IOException, ParseException {
+    public void testFilter1() throws IOException, ParserException {
         
         String[] inputData = new String[] {"1\t1\t3","1\t2\t3", "2\t1\t3", "2\t1\t3", "3\t4\t4"};
         Util.createInputFile(cluster, "test.txt", inputData);
@@ -246,7 +244,7 @@ public class TestRelationToExprProject e
     // the state that empty bags need to be sent on EOP if no non-EOP
     // input has been seen on a fresh input from foreach.
     @Test
-    public void testFilter2() throws IOException, ParseException {
+    public void testFilter2() throws IOException, ParserException {
         
         String[] inputData = new String[] {"1\t1\t3","1\t2\t3", "2\t1\t3", "2\t1\t3", "3\t4\t4"};
         Util.createInputFile(cluster, "test.txt", inputData);

Modified: pig/trunk/test/org/apache/pig/test/TestStore.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestStore.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestStore.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestStore.java Fri May  6 23:57:21 2011
@@ -57,7 +57,6 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.io.FileLocalizer;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.plan.PlanValidationException;
 import org.apache.pig.impl.util.Utils;
@@ -65,6 +64,7 @@ import org.apache.pig.newplan.Operator;
 import org.apache.pig.newplan.logical.relational.LOStore;
 import org.apache.pig.newplan.logical.relational.LogicalPlan;
 import org.apache.pig.newplan.logical.rules.InputOutputFileValidator;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.parser.QueryParserDriver;
 import org.apache.pig.test.utils.GenRandomData;
 import org.apache.pig.test.utils.TestHelper;
@@ -305,7 +305,7 @@ public class TestStore extends junit.fra
         }
     }
     @Test
-    public void testBinStorageGetSchema() throws IOException, ParseException {
+    public void testBinStorageGetSchema() throws IOException, ParserException {
         String input[] = new String[] { "hello\t1\t10.1", "bye\t2\t20.2" };
         String inputFileName = "testGetSchema-input.txt";
         String outputFileName = "testGetSchema-output.txt";

Modified: pig/trunk/test/org/apache/pig/test/TestStoreInstances.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestStoreInstances.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestStoreInstances.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestStoreInstances.java Fri May  6 23:57:21 2011
@@ -41,7 +41,7 @@ import org.apache.pig.backend.executione
 import org.apache.pig.backend.executionengine.ExecJob.JOB_STATUS;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.io.FileLocalizer;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -98,7 +98,7 @@ public class TestStoreInstances  {
      * @throws ParseException
      */
     @Test
-    public void testBackendStoreCommunication() throws IOException, ParseException {
+    public void testBackendStoreCommunication() throws IOException, ParserException {
         ExecType[] execTypes = { ExecType.MAPREDUCE, ExecType.LOCAL};
         PigServer pig = null;
         for(ExecType execType : execTypes){

Modified: pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestTypeCheckingValidatorNewLP.java Fri May  6 23:57:21 2011
@@ -55,7 +55,6 @@ import org.apache.pig.data.TupleFactory;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.io.FileSpec;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema;
 import org.apache.pig.impl.logicalLayer.validators.TypeCheckerException;
@@ -114,6 +113,7 @@ import org.apache.pig.newplan.logical.vi
 import org.apache.pig.newplan.logical.visitor.TypeCheckingExpVisitor;
 import org.apache.pig.newplan.logical.visitor.TypeCheckingRelVisitor;
 import org.apache.pig.newplan.logical.visitor.UnionOnSchemaSetter;
+import org.apache.pig.parser.ParserException;
 import org.apache.pig.parser.ParserTestingUtils;
 import org.junit.Before;
 import org.junit.Test;
@@ -4069,7 +4069,7 @@ public class TestTypeCheckingValidatorNe
         
         // See PIG-2004
         @Test
-        public void testDereferenceTypeSet() throws IOException, ParseException {
+        public void testDereferenceTypeSet() throws IOException, ParserException {
             String query = "a = load 'a' as (i : int, j : int) ;"
             + " b = foreach a generate i, j/10.1 as jd;" 
             + " c = group b by i;" 
@@ -4105,7 +4105,7 @@ public class TestTypeCheckingValidatorNe
 
         //see PIG-1990
         @Test
-        public void testCastEmptyInnerSchema() throws IOException, ParseException{
+        public void testCastEmptyInnerSchema() throws IOException, ParserException{
             final String INP_FILE = "testCastEmptyInnerSchema.txt";
             PrintWriter w = new PrintWriter(new FileWriter(INP_FILE));
             w.println("(1,2)");

Modified: pig/trunk/test/org/apache/pig/test/TestTypedMap.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestTypedMap.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestTypedMap.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestTypedMap.java Fri May  6 23:57:21 2011
@@ -34,8 +34,8 @@ import org.apache.pig.data.DataBag;
 import org.apache.pig.data.DataByteArray;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.io.FileLocalizer;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -82,7 +82,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testSimpleLoad() throws IOException, ParseException {
+    public void testSimpleLoad() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#1,key2#2]",
@@ -119,7 +119,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testSimpleMapKeyLookup() throws IOException, ParseException {
+    public void testSimpleMapKeyLookup() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#1,key2#2]",
@@ -150,7 +150,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testSimpleMapCast() throws IOException, ParseException {
+    public void testSimpleMapCast() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#1,key2#2]",
@@ -188,7 +188,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testComplexLoad() throws IOException, ParseException {
+    public void testComplexLoad() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#{(1,2),(1,3)},134#]",
@@ -222,7 +222,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testComplexCast() throws IOException, ParseException {
+    public void testComplexCast() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#{(1,2),(1,3)},134#]",
@@ -257,7 +257,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testComplexCast2() throws IOException, ParseException {
+    public void testComplexCast2() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#1,key2#2]",
@@ -287,7 +287,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testUnTypedMap() throws IOException, ParseException {
+    public void testUnTypedMap() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#1,key2#2]",
@@ -316,7 +316,7 @@ public class TestTypedMap  {
     }
 
     @Test
-    public void testOrderBy() throws IOException, ParseException {
+    public void testOrderBy() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL, cluster.getProperties());
         String[] input = {
                 "[key#1,key1#2]",

Modified: pig/trunk/test/org/apache/pig/test/TestUnionOnSchema.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestUnionOnSchema.java?rev=1100416&r1=1100415&r2=1100416&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestUnionOnSchema.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestUnionOnSchema.java Fri May  6 23:57:21 2011
@@ -40,11 +40,11 @@ import org.apache.pig.data.DataType;
 import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.io.FileLocalizer;
 import org.apache.pig.impl.logicalLayer.FrontendException;
-import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.schema.Schema;
 import org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema;
 import org.apache.pig.impl.util.LogUtils;
 import org.apache.pig.impl.util.Utils;
+import org.apache.pig.parser.ParserException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -109,10 +109,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA on two inputs with same schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaSameSchema() throws IOException, ParseException {
+    public void testUnionOnSchemaSameSchema() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int);"
@@ -141,10 +141,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA with operations after the union
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaFilter() throws IOException, ParseException {
+    public void testUnionOnSchemaFilter() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, x : int);"
@@ -174,10 +174,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA with operations after the union
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaSuccOps() throws IOException, ParseException {
+    public void testUnionOnSchemaSuccOps() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int);"
@@ -207,10 +207,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA with cast from bytearray to another type
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaCastOnByteArray() throws IOException, ParseException {
+    public void testUnionOnSchemaCastOnByteArray() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i, j);"
@@ -236,10 +236,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA where a common column has additional 'namespace' part
      *  in the column name in one of the inputs
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaScopedColumnName() throws IOException, ParseException {
+    public void testUnionOnSchemaScopedColumnName() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query_prefix = 
         "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int); " 
@@ -279,10 +279,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA where a common column has additional 'namespace' part
      *  in the column name in both the inputs
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaScopedColumnNameBothInp1() throws IOException, ParseException {
+    public void testUnionOnSchemaScopedColumnNameBothInp1() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query = 
         "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int); " 
@@ -315,10 +315,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA where a common column has additional 'namespace' part
      *  in the column name in both the inputs
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaScopedColumnNameBothInp2() throws IOException, ParseException {
+    public void testUnionOnSchemaScopedColumnNameBothInp2() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "   l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int); " 
@@ -353,10 +353,10 @@ public class TestUnionOnSchema  {
      *  in the column name in one of the inputs.
      *  Negative test case
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaScopedColumnNameNeg() throws IOException, ParseException {
+    public void testUnionOnSchemaScopedColumnNameNeg() throws IOException, ParserException {
         
         String expectedErr = "Found more than one match: l1::i, l2::i";
         String query_prefix =
@@ -379,10 +379,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA on two inputs with same column names, but different
      * numeric types - test type promotion
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaDiffNumType() throws IOException, ParseException {
+    public void testUnionOnSchemaDiffNumType() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : double);"
@@ -409,10 +409,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA on two inputs with no common columns
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaNoCommonCols() throws IOException, ParseException {
+    public void testUnionOnSchemaNoCommonCols() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int);"
@@ -437,10 +437,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA on two inputs , one input with additional columns
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaAdditionalColumn() throws IOException, ParseException {
+    public void testUnionOnSchemaAdditionalColumn() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
         //PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
@@ -473,10 +473,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA on 3 inputs 
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchema3Inputs() throws IOException, ParseException {
+    public void testUnionOnSchema3Inputs() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int); "
@@ -508,10 +508,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA with bytearray type 
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaByteArrayConversions() throws IOException, ParseException {
+    public void testUnionOnSchemaByteArrayConversions() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             " l1 = load '" + INP_FILE_2NUM_1CHAR_1BAG + "' as " 
@@ -547,10 +547,10 @@ public class TestUnionOnSchema  {
     /**
      * negative test - test error on no schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaNoSchema() throws IOException, ParseException {
+    public void testUnionOnSchemaNoSchema() throws IOException, ParserException {
         String expectedErr = "UNION ONSCHEMA cannot be used with " +
         "relations that have null schema";
         String query =
@@ -572,10 +572,10 @@ public class TestUnionOnSchema  {
     /**
      * negative test - test error on null alias in one of the FieldSchema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaNullAliasInFieldSchema() throws IOException, ParseException {
+    public void testUnionOnSchemaNullAliasInFieldSchema() throws IOException, ParserException {
         String expectedErr = "Schema of relation f has a null fieldschema for " +
         		"column(s). Schema ::long,y:float";
         String query =
@@ -615,10 +615,10 @@ public class TestUnionOnSchema  {
     /**
      * negative test - test error on incompatible types in schema
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaIncompatibleTypes() throws IOException, ParseException {
+    public void testUnionOnSchemaIncompatibleTypes() throws IOException, ParserException {
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (x : long, y : chararray);"
             + "l2 = load '" + INP_FILE_2NUMS + "' as (x : long, y : float);"
@@ -674,7 +674,7 @@ public class TestUnionOnSchema  {
     }
 
 
-    private void checkSchemaEquals(String query, String schemaStr) throws IOException, ParseException {
+    private void checkSchemaEquals(String query, String schemaStr) throws IOException, ParserException {
         Schema expectedSch = Utils.getSchemaFromString(schemaStr);
         checkSchemaEquals(query, expectedSch);       
     }
@@ -683,10 +683,10 @@ public class TestUnionOnSchema  {
     /**
      * Test UNION ONSCHEMA with input relation having udfs
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaInputUdfs() throws IOException, ParseException {
+    public void testUnionOnSchemaInputUdfs() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : chararray);"
@@ -720,10 +720,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA with udf whose default type is different from
      * final type
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaUdfTypeEvolution() throws IOException, ParseException {
+    public void testUnionOnSchemaUdfTypeEvolution() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
         //PigServer pig = new PigServer(ExecType.LOCAL);
         String query_prefix =
@@ -773,10 +773,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA with udf whose default type is different from
      * final type - where udf is not in immediate input of union
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaUdfTypeEvolution2() throws IOException, ParseException {
+    public void testUnionOnSchemaUdfTypeEvolution2() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query_prefix =
             "  l1 = load '" + INP_FILE_2NUM_1CHAR_1BAG + "' as " 
@@ -844,10 +844,10 @@ public class TestUnionOnSchema  {
      * Test UNION ONSCHEMA with input relation having column names with multiple
      * level of namespace in their names
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testUnionOnSchemaScopeMulti() throws IOException, ParseException {
+    public void testUnionOnSchemaScopeMulti() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query_prefix =
             "  a = load '" + INP_FILE_2NUMS+ "' as (i:int, j:int); "
@@ -891,10 +891,10 @@ public class TestUnionOnSchema  {
     /**
      * Test query with a union-onschema having another as input 
      * @throws IOException
-     * @throws ParseException
+     * @throws ParserException
      */
     @Test
-    public void testTwoUnions() throws IOException, ParseException {
+    public void testTwoUnions() throws IOException, ParserException {
         PigServer pig = new PigServer(ExecType.LOCAL);
         String query =
             "  l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int);"