diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlExpressionToPlanTranslator.java
index 7d1ce7d..110c2b7 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlExpressionToPlanTranslator.java
@@ -22,7 +22,7 @@
 import java.util.List;
 
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -71,7 +71,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(ForClause fc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable v = context.newVar(fc.getVarExpr());
         Expression inExpr = fc.getInExpr();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(inExpr, tupSource);
@@ -91,7 +91,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FLWOGRExpression flwor, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> flworPlan = tupSource;
         boolean isTop = context.isTopFlwor();
         if (!isTop) {
@@ -139,13 +139,13 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(Query q, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         return q.getBody().accept(this, tupSource);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DistinctClause dc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         List<Mutable<ILogicalExpression>> exprList = new ArrayList<>();
         Mutable<ILogicalOperator> input = null;
         for (Expression expr : dc.getDistinctByExpr()) {
@@ -160,7 +160,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnionExpr unionExpr, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         List<ILangExpression> inputExprs = new ArrayList<>();
         inputExprs.addAll(unionExpr.getExprs());
         Pair<ILogicalOperator, LogicalVariable> result = translateUnionAllFromInputExprs(inputExprs, tupSource);
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlPlusExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlPlusExpressionToPlanTranslator.java
index d9136ac..09d8055 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlPlusExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/AqlPlusExpressionToPlanTranslator.java
@@ -26,7 +26,7 @@
 import java.util.logging.Logger;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.common.transactions.JobId;
@@ -180,11 +180,11 @@
     private class MetaScopeLogicalVariable {
         private HashMap<Identifier, LogicalVariable> map = new HashMap<Identifier, LogicalVariable>();
 
-        public VariableReferenceExpression getVariableReferenceExpression(Identifier id) throws AsterixException {
+        public VariableReferenceExpression getVariableReferenceExpression(Identifier id) throws CompilationException {
             LogicalVariable var = map.get(id);
             LOGGER.fine("get:" + id + ":" + var);
             if (var == null) {
-                throw new AsterixException("Identifier " + id + " not found in AQL+ meta-scope.");
+                throw new CompilationException("Identifier " + id + " not found in AQL+ meta-scope.");
             }
             return new VariableReferenceExpression(var);
         }
@@ -198,10 +198,10 @@
     private class MetaScopeILogicalOperator {
         private HashMap<Identifier, ILogicalOperator> map = new HashMap<Identifier, ILogicalOperator>();
 
-        public ILogicalOperator get(Identifier id) throws AsterixException {
+        public ILogicalOperator get(Identifier id) throws CompilationException {
             ILogicalOperator op = map.get(id);
             if (op == null) {
-                throw new AsterixException("Identifier " + id + " not found in AQL+ meta-scope.");
+                throw new CompilationException("Identifier " + id + " not found in AQL+ meta-scope.");
             }
             return op;
         }
@@ -234,12 +234,12 @@
         return context.getVarCounter();
     }
 
-    public ILogicalPlan translate(Query expr) throws AlgebricksException, AsterixException {
+    public ILogicalPlan translate(Query expr) throws AlgebricksException, CompilationException {
         return translate(expr, null);
     }
 
     public ILogicalPlan translate(Query expr, MetadataProvider metadata)
-            throws AlgebricksException, AsterixException {
+            throws AlgebricksException, CompilationException {
         IDataFormat format = metadata.getFormat();
         if (format == null) {
             throw new AlgebricksException("Data format has not been set.");
@@ -294,7 +294,7 @@
         return plan;
     }
 
-    public ILogicalPlan translate(List<Clause> clauses) throws AlgebricksException, AsterixException {
+    public ILogicalPlan translate(List<Clause> clauses) throws AlgebricksException, CompilationException {
 
         if (clauses == null) {
             return null;
@@ -318,7 +318,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(ForClause fc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable v = context.newVar(fc.getVarExpr());
 
         Expression inExpr = fc.getInExpr();
@@ -339,7 +339,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(LetClause lc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable v;
         ILogicalOperator returnedOp;
 
@@ -366,7 +366,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FLWOGRExpression flwor, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> flworPlan = tupSource;
         boolean isTop = context.isTopFlwor();
         if (isTop) {
@@ -407,7 +407,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FieldAccessor fa, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = aqlExprToAlgExpression(fa.getExpr(), tupSource);
         LogicalVariable v = context.newVar();
         AbstractFunctionCallExpression fldAccess = new ScalarFunctionCallExpression(
@@ -424,7 +424,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IndexAccessor ia, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = aqlExprToAlgExpression(ia.getExpr(), tupSource);
         LogicalVariable v = context.newVar();
         AbstractFunctionCallExpression f;
@@ -446,7 +446,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CallExpr fcall, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable v = context.newVar();
         FunctionSignature signature = fcall.getFunctionSignature();
         List<Mutable<ILogicalExpression>> args = new ArrayList<Mutable<ILogicalExpression>>();
@@ -517,7 +517,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(GroupbyClause gc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         GroupByOperator gOp = new GroupByOperator();
         Mutable<ILogicalOperator> topOp = tupSource;
         for (GbyVariableExpressionPair ve : gc.getGbyPairList()) {
@@ -570,7 +570,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IfExpr ifexpr, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         // In the most general case, IfThenElse is translated in the following
         // way.
         //
@@ -633,7 +633,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(OperatorExpr op, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         List<OperatorType> ops = op.getOpList();
         int nOps = ops.size();
 
@@ -711,7 +711,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(OrderbyClause oc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
 
         OrderOperator ord = new OrderOperator();
         Iterator<OrderModifier> modifIter = oc.getModifierList().iterator();
@@ -736,7 +736,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(QuantifiedExpression qe, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> topOp = tupSource;
 
         ILogicalOperator firstOp = null;
@@ -790,13 +790,13 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(Query q, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         return q.getBody().accept(this, tupSource);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(RecordConstructor rc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         AbstractFunctionCallExpression f = new ScalarFunctionCallExpression(
                 FunctionUtil.getFunctionInfo(BuiltinFunctions.OPEN_RECORD_CONSTRUCTOR));
         LogicalVariable v1 = context.newVar();
@@ -816,7 +816,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(ListConstructor lc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         FunctionIdentifier fid = (lc.getType() == Type.ORDERED_LIST_CONSTRUCTOR)
                 ? BuiltinFunctions.ORDERED_LIST_CONSTRUCTOR : BuiltinFunctions.UNORDERED_LIST_CONSTRUCTOR;
         AbstractFunctionCallExpression f = new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(fid));
@@ -834,7 +834,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnaryExpr u, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Expression expr = u.getExpr();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = aqlExprToAlgExpression(expr, tupSource);
         LogicalVariable v1 = context.newVar();
@@ -864,7 +864,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(WhereClause w, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = aqlExprToAlgExpression(w.getWhereExpr(), tupSource);
         SelectOperator s = new SelectOperator(new MutableObject<ILogicalExpression>(p.first), false, null);
         s.getInputs().add(p.second);
@@ -874,7 +874,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(LimitClause lc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p1 = aqlExprToAlgExpression(lc.getLimitExpr(), tupSource);
         LimitOperator opLim;
         Expression offset = lc.getOffset();
@@ -891,7 +891,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DistinctClause dc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         List<Mutable<ILogicalExpression>> exprList = new ArrayList<Mutable<ILogicalExpression>>();
         Mutable<ILogicalOperator> input = null;
         for (Expression expr : dc.getDistinctByExpr()) {
@@ -906,7 +906,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnionExpr unionExpr, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> ts = tupSource;
         ILogicalOperator lastOp = null;
         LogicalVariable lastVar = null;
@@ -989,7 +989,7 @@
     }
 
     private AbstractFunctionCallExpression createFunctionCallExpressionForBuiltinOperator(OperatorType t)
-            throws AsterixException {
+            throws CompilationException {
 
         FunctionIdentifier fid = null;
         switch (t) {
@@ -1050,7 +1050,7 @@
     }
 
     private Pair<ILogicalExpression, Mutable<ILogicalOperator>> aqlExprToAlgExpression(Expression expr,
-            Mutable<ILogicalOperator> topOp) throws AsterixException {
+            Mutable<ILogicalOperator> topOp) throws CompilationException {
         switch (expr.getKind()) {
             case VARIABLE_EXPRESSION: {
                 VariableReferenceExpression ve =
@@ -1134,7 +1134,7 @@
     }
 
     private Pair<ILogicalOperator, LogicalVariable> visitAndOrOperator(OperatorExpr op,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         List<OperatorType> ops = op.getOpList();
         int nOps = ops.size();
 
@@ -1182,76 +1182,76 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(TypeDecl td, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(RecordTypeDefinition tre, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(TypeReferenceExpression tre, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(NodegroupDecl ngd, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(LoadStatement stmtLoad, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DropDatasetStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CreateIndexStatement cis, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(OrderedListTypeDefinition olte, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnorderedListTypeDefinition ulte,
-            Mutable<ILogicalOperator> arg) throws AsterixException {
+            Mutable<ILogicalOperator> arg) throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visitMetaVariableClause(MetaVariableClause mc,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         return new Pair<ILogicalOperator, LogicalVariable>(metaScopeOp.get(mc.getVar()), null);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visitJoinClause(JoinClause jc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         // Pair<ILogicalOperator, LogicalVariable> leftSide =
         // jc.getLeftExpr().accept(this, tupSource);
         Mutable<ILogicalOperator> opRef = tupSource;
@@ -1294,7 +1294,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visitMetaVariableExpr(MetaVariableExpr me,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         LogicalVariable var = context.newVar();
         AssignOperator a = new AssignOperator(var,
                 new MutableObject<ILogicalExpression>(metaScopeExp.getVariableReferenceExpression(me.getVar())));
@@ -1335,161 +1335,161 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(InsertStatement insert, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DeleteStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UpdateStatement update, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UpdateClause del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DataverseDecl dv, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DatasetDecl dd, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SetStatement ss, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(WriteStatement ws, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CreateDataverseStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IndexDropStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(NodeGroupDropStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DataverseDropStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(TypeDropStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(DisconnectFeedStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CreateFunctionStatement cfs, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FunctionDropStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(ConnectFeedStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FeedDropStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CompactStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CreatePrimaryFeedStatement del, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CreateSecondaryFeedStatement del,
-            Mutable<ILogicalOperator> arg) throws AsterixException {
+            Mutable<ILogicalOperator> arg) throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CreateFeedPolicyStatement cfps, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FeedPolicyDropStatement dfs, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         // TODO Auto-generated method stub
         return null;
     }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
index cf722cc..dc1cb65 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
@@ -32,9 +32,9 @@
 
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator;
 import org.apache.asterix.algebra.operators.CommitOperator;
-import org.apache.asterix.common.config.MetadataProperties;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.config.MetadataProperties;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.external.util.ExternalDataUtils;
@@ -71,7 +71,6 @@
 import org.apache.asterix.lang.common.struct.QuantifiedPair;
 import org.apache.asterix.lang.common.util.FunctionUtil;
 import org.apache.asterix.lang.common.visitor.base.AbstractQueryExpressionVisitor;
-import org.apache.asterix.lang.sqlpp.clause.Projection;
 import org.apache.asterix.metadata.MetadataException;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.declared.DataSource;
@@ -732,7 +731,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(LetClause lc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable v;
         ILogicalOperator returnedOp;
         if (lc.getBindingExpr().getKind() == Kind.VARIABLE_EXPRESSION) {
@@ -752,7 +751,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FieldAccessor fa, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(fa.getExpr(), tupSource);
         LogicalVariable v = context.newVar();
         AbstractFunctionCallExpression fldAccess = new ScalarFunctionCallExpression(
@@ -768,7 +767,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IndexAccessor ia, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(ia.getExpr(), tupSource);
         LogicalVariable v = context.newVar();
         AbstractFunctionCallExpression f;
@@ -790,7 +789,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CallExpr fcall, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable v = context.newVar();
         FunctionSignature signature = fcall.getFunctionSignature();
         List<Mutable<ILogicalExpression>> args = new ArrayList<>();
@@ -824,7 +823,7 @@
         }
 
         if (f == null) {
-            throw new AsterixException(" Unknown function " + signature.getName() + "@" + signature.getArity());
+            throw new CompilationException(" Unknown function " + signature.getName() + "@" + signature.getArity());
         }
 
         // Put hints into function call expr.
@@ -902,7 +901,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(GroupbyClause gc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> topOp = tupSource;
         if (gc.hasGroupVar()) {
             List<Pair<Expression, Identifier>> groupFieldList = gc.getGroupFieldList();
@@ -966,7 +965,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IfExpr ifexpr, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         // In the most general case, IfThenElse is translated in the following
         // way.
         //
@@ -1031,7 +1030,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(OperatorExpr op, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         List<OperatorType> ops = op.getOpList();
         int nOps = ops.size();
 
@@ -1113,7 +1112,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(OrderbyClause oc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         OrderOperator ord = new OrderOperator();
         Iterator<OrderModifier> modifIter = oc.getModifierList().iterator();
         Mutable<ILogicalOperator> topOp = tupSource;
@@ -1142,7 +1141,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(QuantifiedExpression qe, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> topOp = tupSource;
 
         ILogicalOperator firstOp = null;
@@ -1195,13 +1194,13 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(Query q, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         return q.getBody().accept(this, tupSource);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(RecordConstructor rc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         AbstractFunctionCallExpression f = new ScalarFunctionCallExpression(
                 FunctionUtil.getFunctionInfo(BuiltinFunctions.OPEN_RECORD_CONSTRUCTOR));
         LogicalVariable v1 = context.newVar();
@@ -1221,7 +1220,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(ListConstructor lc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         FunctionIdentifier fid = (lc.getType() == ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR)
                 ? BuiltinFunctions.ORDERED_LIST_CONSTRUCTOR : BuiltinFunctions.UNORDERED_LIST_CONSTRUCTOR;
         AbstractFunctionCallExpression f = new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(fid));
@@ -1239,7 +1238,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnaryExpr u, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Expression expr = u.getExpr();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(expr, tupSource);
         LogicalVariable v1 = context.newVar();
@@ -1261,7 +1260,7 @@
                 a = processExists(eo.first, v1, true);
                 break;
             default:
-                throw new AsterixException("Unsupported operator: " + u);
+                throw new CompilationException("Unsupported operator: " + u);
         }
         a.getInputs().add(eo.second);
         return new Pair<>(a, v1);
@@ -1279,7 +1278,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(WhereClause w, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(w.getWhereExpr(), tupSource);
         SelectOperator s = new SelectOperator(new MutableObject<>(p.first), false, null);
         s.getInputs().add(p.second);
@@ -1288,7 +1287,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(LimitClause lc, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p1 = langExprToAlgExpression(lc.getLimitExpr(), tupSource);
         LimitOperator opLim;
         Expression offset = lc.getOffset();
@@ -1329,7 +1328,7 @@
     }
 
     protected AbstractFunctionCallExpression createFunctionCallExpressionForBuiltinOperator(OperatorType t)
-            throws AsterixException {
+            throws CompilationException {
         FunctionIdentifier fid;
         switch (t) {
             case PLUS:
@@ -1377,7 +1376,7 @@
     }
 
     protected Pair<ILogicalExpression, Mutable<ILogicalOperator>> langExprToAlgExpression(Expression expr,
-            Mutable<ILogicalOperator> topOpRef) throws AsterixException {
+            Mutable<ILogicalOperator> topOpRef) throws CompilationException {
         switch (expr.getKind()) {
             case VARIABLE_EXPRESSION:
                 VariableReferenceExpression ve = new VariableReferenceExpression(
@@ -1438,7 +1437,7 @@
     }
 
     protected Pair<ILogicalOperator, LogicalVariable> visitAndOrOperator(OperatorExpr op,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         List<OperatorType> ops = op.getOpList();
         int nOps = ops.size();
 
@@ -1527,9 +1526,9 @@
      *
      * @param plan,
      *            the query plan.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    private void eliminateSharedOperatorReferenceForPlan(ILogicalPlan plan) throws AsterixException {
+    private void eliminateSharedOperatorReferenceForPlan(ILogicalPlan plan) throws CompilationException {
         for (Mutable<ILogicalOperator> opRef : plan.getRoots()) {
             Set<Mutable<ILogicalOperator>> opRefSet = new HashSet<>();
             eliminateSharedOperatorReference(opRef, opRefSet);
@@ -1546,10 +1545,11 @@
      *            the set storing seen operator references so far.
      * @return a mapping that maps old variables to new variables, for the ancestors of
      *         <code>currentOpRef</code> to replace variables properly.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     private LinkedHashMap<LogicalVariable, LogicalVariable> eliminateSharedOperatorReference(
-            Mutable<ILogicalOperator> currentOpRef, Set<Mutable<ILogicalOperator>> opRefSet) throws AsterixException {
+            Mutable<ILogicalOperator> currentOpRef, Set<Mutable<ILogicalOperator>> opRefSet)
+            throws CompilationException {
         try {
             opRefSet.add(currentOpRef);
             AbstractLogicalOperator currentOperator = (AbstractLogicalOperator) currentOpRef.getValue();
@@ -1614,7 +1614,7 @@
             varMap.values().retainAll(liveVars);
             return varMap;
         } catch (AlgebricksException e) {
-            throw new AsterixException(e);
+            throw new CompilationException(e);
         }
     }
 
@@ -1628,10 +1628,10 @@
      * @param branchExpression,
      *            the expression to be evaluated in this branch.
      * @return a pair of the constructed subplan operator and the output variable for the branch.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     protected Pair<ILogicalOperator, LogicalVariable> constructSubplanOperatorForBranch(ILogicalOperator inputOp,
-            Mutable<ILogicalExpression> selectExpr, Expression branchExpression) throws AsterixException {
+            Mutable<ILogicalExpression> selectExpr, Expression branchExpression) throws CompilationException {
         context.enterSubplan();
         SubplanOperator subplanOp = new SubplanOperator();
         subplanOp.getInputs().add(new MutableObject<>(inputOp));
@@ -1699,7 +1699,7 @@
 
     // Generates the plan for "UNION ALL" or union expression from its input expressions.
     protected Pair<ILogicalOperator, LogicalVariable> translateUnionAllFromInputExprs(List<ILangExpression> inputExprs,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         List<Mutable<ILogicalOperator>> inputOpRefsToUnion = new ArrayList<>();
         List<LogicalVariable> vars = new ArrayList<>();
         for (ILangExpression expr : inputExprs) {
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
index 5778369..f46613b 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
@@ -25,7 +25,7 @@
 import java.util.List;
 
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause.ClauseType;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Expression.Kind;
@@ -120,7 +120,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(Query q, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Expression queryBody = q.getBody();
         if (queryBody.getKind() == Kind.SELECT_EXPRESSION) {
             SelectExpression selectExpr = (SelectExpression) queryBody;
@@ -141,7 +141,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SelectExpression selectExpression,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         if (selectExpression.isSubquery()) {
             context.enterSubplan();
         }
@@ -170,7 +170,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IndependentSubquery independentSubquery,
-            Mutable<ILogicalOperator> tupleSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupleSource) throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo =
                 langExprToAlgExpression(independentSubquery.getExpr(), tupleSource);
         LogicalVariable var = context.newVar();
@@ -181,7 +181,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SelectSetOperation selectSetOperation,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         SetOperationInput leftInput = selectSetOperation.getLeftInput();
         if (!selectSetOperation.hasRightInputs()) {
             return leftInput.accept(this, tupSource);
@@ -193,7 +193,7 @@
         for (SetOperationRight setOperationRight : selectSetOperation.getRightInputs()) {
             SetOpType setOpType = setOperationRight.getSetOpType();
             if (setOpType != SetOpType.UNION || setOperationRight.isSetSemantics()) {
-                throw new AsterixException("Operation " + setOpType
+                throw new CompilationException("Operation " + setOpType
                         + (setOperationRight.isSetSemantics() ? " with set semantics" : "ALL") + " is not supported.");
             }
             SetOperationInput rightInput = setOperationRight.getSetOperationRightInput();
@@ -206,7 +206,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SelectBlock selectBlock, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> currentOpRef = tupSource;
         if (selectBlock.hasFromClause()) {
             currentOpRef = new MutableObject<>(selectBlock.getFromClause().accept(this, currentOpRef).first);
@@ -235,7 +235,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FromClause fromClause, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> inputSrc = arg;
         Pair<ILogicalOperator, LogicalVariable> topUnnest = null;
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
@@ -247,7 +247,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FromTerm fromTerm, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable fromVar = context.newVar(fromTerm.getLeftVariable());
         Expression fromExpr = fromTerm.getLeftExpression();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(fromExpr, tupSource);
@@ -283,7 +283,7 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(JoinClause joinClause, Mutable<ILogicalOperator> inputRef)
-            throws AsterixException {
+            throws CompilationException {
         Mutable<ILogicalOperator> leftInputRef = uncorrelatedLeftBranchStack.pop();
         if (joinClause.getJoinType() == JoinType.INNER) {
             Pair<ILogicalOperator, LogicalVariable> rightBranch =
@@ -424,20 +424,20 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(NestClause nestClause, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         throw new NotImplementedException("Nest clause has not been implemented");
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnnestClause unnestClause,
-            Mutable<ILogicalOperator> inputOpRef) throws AsterixException {
+            Mutable<ILogicalOperator> inputOpRef) throws CompilationException {
         return generateUnnestForBinaryCorrelateRightBranch(unnestClause, inputOpRef,
                 unnestClause.getJoinType() == JoinType.INNER);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(HavingClause havingClause, Mutable<ILogicalOperator> tupSource)
-            throws AsterixException {
+            throws CompilationException {
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p =
                 langExprToAlgExpression(havingClause.getFilterExpression(), tupSource);
         SelectOperator s = new SelectOperator(new MutableObject<ILogicalExpression>(p.first), false, null);
@@ -447,7 +447,7 @@
 
     private Pair<ILogicalOperator, LogicalVariable> generateUnnestForBinaryCorrelateRightBranch(
             AbstractBinaryCorrelateClause binaryCorrelate, Mutable<ILogicalOperator> inputOpRef, boolean innerUnnest)
-            throws AsterixException {
+            throws CompilationException {
         LogicalVariable rightVar = context.newVar(binaryCorrelate.getRightVariable());
         Expression rightExpr = binaryCorrelate.getRightExpression();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(rightExpr, inputOpRef);
@@ -470,31 +470,31 @@
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SelectClause selectClause, Mutable<ILogicalOperator> tupSrc)
-            throws AsterixException {
+            throws CompilationException {
         throw new UnsupportedOperationException(ERR_MSG);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SelectElement selectElement, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         throw new UnsupportedOperationException(ERR_MSG);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(SelectRegular selectRegular, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         throw new UnsupportedOperationException(ERR_MSG);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(Projection projection, Mutable<ILogicalOperator> arg)
-            throws AsterixException {
+            throws CompilationException {
         throw new UnsupportedOperationException(ERR_MSG);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(CaseExpression caseExpression,
-            Mutable<ILogicalOperator> tupSource) throws AsterixException {
+            Mutable<ILogicalOperator> tupSource) throws CompilationException {
         //Creates a series of subplan operators, one for each branch.
         Mutable<ILogicalOperator> currentOpRef = tupSource;
         ILogicalOperator currentOperator = null;
@@ -597,7 +597,7 @@
 
     // Generates the return expression for a select clause.
     private Pair<ILogicalOperator, LogicalVariable> processSelectClause(SelectBlock selectBlock,
-            Mutable<ILogicalOperator> tupSrc) throws AsterixException {
+            Mutable<ILogicalOperator> tupSrc) throws CompilationException {
         SelectClause selectClause = selectBlock.getSelectClause();
         Expression returnExpr;
         if (selectClause.selectElement()) {
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TranslationException.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TranslationException.java
index 53b78bb..0660f23 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TranslationException.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/TranslationException.java
@@ -18,9 +18,9 @@
  */
 package org.apache.asterix.translator;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 
-public class TranslationException extends AsterixException {
+public class TranslationException extends CompilationException {
     private static final long serialVersionUID = 685960054131778068L;
 
     public TranslationException(String msg) {
diff --git a/asterixdb/asterix-algebra/src/main/javacc/AQLPlus.jj b/asterixdb/asterix-algebra/src/main/javacc/AQLPlus.jj
index 2c991cb..b44e1bc 100644
--- a/asterixdb/asterix-algebra/src/main/javacc/AQLPlus.jj
+++ b/asterixdb/asterix-algebra/src/main/javacc/AQLPlus.jj
@@ -41,7 +41,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
@@ -138,7 +138,7 @@
        return s.substring(1).trim();
     }
 
-    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, AsterixException {
+    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, CompilationException {
             File file = new File(args[0]);
             Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
             AQLPlusParser parser = new AQLPlusParser(fis);
@@ -703,7 +703,7 @@
         Token t = getToken(0);
         try{
           op.addOperator(t.toString());
-        } catch (AsterixException e){
+        } catch (CompilationException e){
           throw new ParseException(e.getMessage());
         }
     }
@@ -750,7 +750,7 @@
           uexpr = new UnaryExpr();
           try{
             uexpr.setExprType(token.image);
-          } catch (AsterixException e){
+          } catch (CompilationException e){
             throw new ParseException(e.getMessage());
           }
     }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
index 754b7f9..4140f9a 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
@@ -29,7 +29,6 @@
 import java.util.Random;
 import java.util.Set;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator;
 import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslatorFactory;
 import org.apache.asterix.api.common.Job.SubmissionMode;
@@ -38,7 +37,7 @@
 import org.apache.asterix.common.config.ExternalProperties;
 import org.apache.asterix.common.config.OptimizationConfUtil;
 import org.apache.asterix.common.exceptions.ACIDException;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.compiler.provider.ILangCompilationProvider;
 import org.apache.asterix.compiler.provider.IRuleSetFactory;
 import org.apache.asterix.dataflow.data.common.ConflictingTypeResolver;
@@ -50,9 +49,9 @@
 import org.apache.asterix.jobgen.QueryLogicalExpressionJobGen;
 import org.apache.asterix.lang.common.base.IAstPrintVisitorFactory;
 import org.apache.asterix.lang.common.base.IQueryRewriter;
+import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.base.IRewriterFactory;
 import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.statement.FunctionDecl;
 import org.apache.asterix.lang.common.statement.Query;
@@ -91,6 +90,8 @@
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.api.job.JobSpecification;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 /**
  * Provides helper methods for compilation of a query into a JobSpec and submission
  * to Hyracks through the Hyracks client interface.
@@ -145,7 +146,7 @@
     }
 
     public Pair<IReturningStatement, Integer> reWriteQuery(List<FunctionDecl> declaredFunctions,
-            MetadataProvider metadataProvider, IReturningStatement q, SessionConfig conf) throws AsterixException {
+            MetadataProvider metadataProvider, IReturningStatement q, SessionConfig conf) throws CompilationException {
         if (q == null) {
             return null;
         }
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index 593adb2..f039271 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -40,7 +40,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.asterix.active.ActiveJobNotificationHandler;
 import org.apache.asterix.active.ActivityState;
 import org.apache.asterix.active.EntityId;
@@ -55,22 +54,22 @@
 import org.apache.asterix.app.result.ResultReader;
 import org.apache.asterix.app.result.ResultUtil;
 import org.apache.asterix.common.config.ClusterProperties;
-import org.apache.asterix.common.config.ExternalProperties;
-import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.ExternalDatasetTransactionState;
 import org.apache.asterix.common.config.DatasetConfig.ExternalFilePendingOp;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
+import org.apache.asterix.common.config.ExternalProperties;
+import org.apache.asterix.common.config.GlobalConfig;
 import org.apache.asterix.common.exceptions.ACIDException;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.compiler.provider.ILangCompilationProvider;
 import org.apache.asterix.external.api.IAdapterFactory;
 import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
 import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
 import org.apache.asterix.external.feed.api.IFeed;
-import org.apache.asterix.external.feed.api.IFeedJoint;
 import org.apache.asterix.external.feed.api.IFeed.FeedType;
+import org.apache.asterix.external.feed.api.IFeedJoint;
 import org.apache.asterix.external.feed.api.IFeedJoint.FeedJointType;
 import org.apache.asterix.external.feed.management.ActiveLifecycleEventSubscriber;
 import org.apache.asterix.external.feed.management.FeedConnectionId;
@@ -88,10 +87,10 @@
 import org.apache.asterix.file.IndexOperations;
 import org.apache.asterix.formats.nontagged.TypeTraitProvider;
 import org.apache.asterix.lang.aql.statement.SubscribeFeedStatement;
+import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.base.IRewriterFactory;
 import org.apache.asterix.lang.common.base.IStatementRewriter;
 import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.expression.TypeExpression;
 import org.apache.asterix.lang.common.statement.CompactStatement;
 import org.apache.asterix.lang.common.statement.ConnectFeedStatement;
@@ -206,9 +205,6 @@
 import org.apache.hyracks.api.job.JobId;
 import org.apache.hyracks.api.job.JobSpecification;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import com.google.common.collect.Lists;
 
@@ -405,7 +401,7 @@
                                 resultSetIdCounter);
                         break;
                     default:
-                        throw new AsterixException("Unknown function");
+                        throw new CompilationException("Unknown function");
                 }
             }
         } finally {
@@ -485,38 +481,38 @@
     }
 
     protected void validateCompactionPolicy(String compactionPolicy, Map<String, String> compactionPolicyProperties,
-            MetadataTransactionContext mdTxnCtx, boolean isExternalDataset) throws AsterixException, Exception {
+            MetadataTransactionContext mdTxnCtx, boolean isExternalDataset) throws CompilationException, Exception {
         CompactionPolicy compactionPolicyEntity = MetadataManager.INSTANCE.getCompactionPolicy(mdTxnCtx,
                 MetadataConstants.METADATA_DATAVERSE_NAME, compactionPolicy);
         if (compactionPolicyEntity == null) {
-            throw new AsterixException("Unknown compaction policy: " + compactionPolicy);
+            throw new CompilationException("Unknown compaction policy: " + compactionPolicy);
         }
         String compactionPolicyFactoryClassName = compactionPolicyEntity.getClassName();
         ILSMMergePolicyFactory mergePolicyFactory = (ILSMMergePolicyFactory) Class
                 .forName(compactionPolicyFactoryClassName).newInstance();
         if (isExternalDataset && mergePolicyFactory.getName().compareTo("correlated-prefix") == 0) {
-            throw new AsterixException("The correlated-prefix merge policy cannot be used with external dataset.");
+            throw new CompilationException("The correlated-prefix merge policy cannot be used with external dataset.");
         }
         if (compactionPolicyProperties == null) {
             if (mergePolicyFactory.getName().compareTo("no-merge") != 0) {
-                throw new AsterixException("Compaction policy properties are missing.");
+                throw new CompilationException("Compaction policy properties are missing.");
             }
         } else {
             for (Map.Entry<String, String> entry : compactionPolicyProperties.entrySet()) {
                 if (!mergePolicyFactory.getPropertiesNames().contains(entry.getKey())) {
-                    throw new AsterixException("Invalid compaction policy property: " + entry.getKey());
+                    throw new CompilationException("Invalid compaction policy property: " + entry.getKey());
                 }
             }
             for (String p : mergePolicyFactory.getPropertiesNames()) {
                 if (!compactionPolicyProperties.containsKey(p)) {
-                    throw new AsterixException("Missing compaction policy property: " + p);
+                    throw new CompilationException("Missing compaction policy property: " + p);
                 }
             }
         }
     }
 
     public void handleCreateDatasetStatement(MetadataProvider metadataProvider, Statement stmt,
-            IHyracksClientConnection hcc) throws AsterixException, Exception {
+            IHyracksClientConnection hcc) throws CompilationException, Exception {
         MutableObject<ProgressState> progress = new MutableObject<>(ProgressState.NO_PROGRESS);
         DatasetDecl dd = (DatasetDecl) stmt;
         String dataverseName = getActiveDataverse(dd.getDataverse());
@@ -617,7 +613,7 @@
                             ExternalDatasetTransactionState.COMMIT);
                     break;
                 default:
-                    throw new AsterixException("Unknown datatype " + dd.getDatasetType());
+                    throw new CompilationException("Unknown datatype " + dd.getDatasetType());
             }
 
             // #. initialize DatasetIdFactory if it is not initialized.
@@ -709,7 +705,8 @@
         }
     }
 
-    protected void validateIfResourceIsActiveInFeed(String dataverseName, String datasetName) throws AsterixException {
+    protected void validateIfResourceIsActiveInFeed(String dataverseName, String datasetName)
+            throws CompilationException {
         StringBuilder builder = null;
         IActiveEntityEventsListener[] listeners = ActiveJobNotificationHandler.INSTANCE.getEventListeners();
         for (IActiveEntityEventsListener listener : listeners) {
@@ -721,7 +718,7 @@
             }
         }
         if (builder != null) {
-            throw new AsterixException("Dataset " + dataverseName + "." + datasetName + " is currently being "
+            throw new CompilationException("Dataset " + dataverseName + "." + datasetName + " is currently being "
                     + "fed into by the following active entities.\n" + builder.toString());
         }
     }
@@ -739,7 +736,7 @@
     }
 
     protected String configureNodegroupForDataset(DatasetDecl dd, String dataverse, MetadataTransactionContext mdTxnCtx)
-            throws AsterixException {
+            throws CompilationException {
         int nodegroupCardinality;
         String nodegroupName;
         String hintValue = dd.getHints().get(DatasetNodegroupCardinalityHint.NAME);
@@ -751,7 +748,7 @@
             boolean valid = DatasetHints.validate(DatasetNodegroupCardinalityHint.NAME,
                     dd.getHints().get(DatasetNodegroupCardinalityHint.NAME)).first;
             if (!valid) {
-                throw new AsterixException("Incorrect use of hint:" + DatasetNodegroupCardinalityHint.NAME);
+                throw new CompilationException("Incorrect use of hint:" + DatasetNodegroupCardinalityHint.NAME);
             } else {
                 nodegroupCardinality = Integer.parseInt(dd.getHints().get(DatasetNodegroupCardinalityHint.NAME));
             }
@@ -961,7 +958,7 @@
                     spec = ExternalIndexingOperations.buildFilesIndexReplicationJobSpec(ds, externalFilesSnapshot,
                             metadataProvider, true);
                     if (spec == null) {
-                        throw new AsterixException(
+                        throw new CompilationException(
                                 "Failed to create job spec for replicating Files Index For external dataset");
                     }
                     filesIndexReplicated = true;
@@ -976,7 +973,7 @@
                 for (Index index : indexes) {
                     if (index.getKeyFieldNames().equals(indexFields)
                             && !index.getKeyFieldTypes().equals(indexFieldTypes) && index.isEnforcingKeyFileds()) {
-                        throw new AsterixException("Cannot create index " + indexName + " , enforced index "
+                        throw new CompilationException("Cannot create index " + indexName + " , enforced index "
                                 + index.getIndexName() + " on field \"" + StringUtils.join(indexFields, ',')
                                 + "\" is already defined with type \"" + index.getKeyFieldTypes() + "\"");
                     }
@@ -1001,7 +998,7 @@
             spec = IndexOperations.buildSecondaryIndexCreationJobSpec(cis, aRecordType, metaRecordType,
                     keySourceIndicators, enforcedType, metadataProvider);
             if (spec == null) {
-                throw new AsterixException("Failed to create job spec for creating index '"
+                throw new CompilationException("Failed to create job spec for creating index '"
                         + stmtCreateIndex.getDatasetName() + "." + stmtCreateIndex.getIndexName() + "'");
             }
             MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
@@ -1431,7 +1428,7 @@
             IActiveEntityEventsListener[] activeListeners = ActiveJobNotificationHandler.INSTANCE.getEventListeners();
             for (IActiveEntityEventsListener listener : activeListeners) {
                 if (listener.isEntityUsingDataset(dataverseName, datasetName)) {
-                    throw new AsterixException(
+                    throw new CompilationException(
                             "Can't drop dataset since it is connected to active entity: " + listener.getEntityId());
                 }
             }
@@ -1560,7 +1557,7 @@
                 }
             }
             if (builder != null) {
-                throw new AsterixException("Dataset" + datasetName
+                throw new CompilationException("Dataset" + datasetName
                         + " is currently being fed into by the following active entities: " + builder.toString());
             }
 
@@ -2195,7 +2192,7 @@
                 subscriberRegistered = listener.isFeedConnectionActive(feedConnId, eventSubscriber);
             }
             if (subscriberRegistered) {
-                throw new AsterixException("Feed " + cfs.getFeedName() + " is already connected to dataset "
+                throw new CompilationException("Feed " + cfs.getFeedName() + " is already connected to dataset "
                         + cfs.getDatasetName().getValue());
             }
             FeedPolicyEntity feedPolicy = FeedMetadataUtil.validateIfPolicyExists(dataverseName, cbfs.getPolicyName(),
@@ -2264,11 +2261,11 @@
      * @param feedPolicy
      * @param mdTxnCtx
      * @return
-     * @throws AsterixException
+     * @throws CompilationException
      */
     protected Triple<FeedConnectionRequest, Boolean, List<IFeedJoint>> getFeedConnectionRequest(String dataverse,
             Feed feed, String dataset, FeedPolicyEntity feedPolicy, MetadataTransactionContext mdTxnCtx)
-            throws AsterixException {
+            throws CompilationException {
         IFeedJoint sourceFeedJoint;
         FeedConnectionRequest request;
         List<String> functionsToApply = new ArrayList<>();
@@ -2281,7 +2278,7 @@
         FeedEventsListener listener = (FeedEventsListener) ActiveJobNotificationHandler.INSTANCE
                 .getActiveEntityListener(entityId);
         if (listener == null) {
-            throw new AsterixException("Feed Listener is not registered");
+            throw new CompilationException("Feed Listener is not registered");
         }
 
         boolean isFeedJointAvailable = listener.isFeedJointAvailable(feedJointKey);
@@ -2370,7 +2367,8 @@
         FeedEventsListener listener = (FeedEventsListener) ActiveJobNotificationHandler.INSTANCE
                 .getActiveEntityListener(entityId);
         if (listener == null || !listener.isEntityUsingDataset(dataverseName, datasetName)) {
-            throw new AsterixException("Feed " + feed.getFeedId().getEntityName() + " is currently not connected to "
+            throw new CompilationException(
+                    "Feed " + feed.getFeedId().getEntityName() + " is currently not connected to "
                     + cfs.getDatasetName().getValue() + ". Invalid operation!");
         }
         listener.registerFeedEventSubscriber(eventSubscriber);
@@ -2380,7 +2378,7 @@
             Dataset dataset = MetadataManager.INSTANCE.getDataset(metadataProvider.getMetadataTxnContext(),
                     dataverseName, cfs.getDatasetName().getValue());
             if (dataset == null) {
-                throw new AsterixException(
+                throw new CompilationException(
                         "Unknown dataset :" + cfs.getDatasetName().getValue() + " in dataverse " + dataverseName);
             }
             Pair<JobSpecification, Boolean> specDisconnectType = FeedOperations
@@ -2879,7 +2877,7 @@
     }
 
     protected void handleRunStatement(MetadataProvider metadataProvider, Statement stmt,
-            IHyracksClientConnection hcc) throws AsterixException, Exception {
+            IHyracksClientConnection hcc) throws CompilationException, Exception {
         RunStatement runStmt = (RunStatement) stmt;
         switch (runStmt.getSystem()) {
             case "pregel":
@@ -2966,12 +2964,13 @@
         // Validates the source/sink dataverses and datasets.
         Dataset fromDataset = metadataProvider.findDataset(dataverseNameFrom, datasetNameFrom);
         if (fromDataset == null) {
-            throw new AsterixException("The source dataset " + datasetNameFrom + " in dataverse " + dataverseNameFrom
+            throw new CompilationException(
+                    "The source dataset " + datasetNameFrom + " in dataverse " + dataverseNameFrom
                     + " could not be found for the Run command");
         }
         Dataset toDataset = metadataProvider.findDataset(dataverseNameTo, datasetNameTo);
         if (toDataset == null) {
-            throw new AsterixException("The sink dataset " + datasetNameTo + " in dataverse " + dataverseNameTo
+            throw new CompilationException("The sink dataset " + datasetNameTo + " in dataverse " + dataverseNameTo
                     + " could not be found for the Run command");
         }
 
@@ -3137,7 +3136,7 @@
         }
     }
 
-    protected void rewriteStatement(Statement stmt) throws AsterixException {
+    protected void rewriteStatement(Statement stmt) throws CompilationException {
         IStatementRewriter rewriter = rewriterFactory.createStatementRewriter();
         rewriter.rewrite(stmt);
     }
diff --git a/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml b/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
index 298c458..a3864e4 100644
--- a/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/metadata/testsuite.xml
@@ -336,7 +336,7 @@
     <test-case FilePath="basic">
       <compilation-unit name="issue_1419_drop_type_with_collection_2">
         <output-dir compare="Text">none</output-dir>
-        <expected-error>Error: Cannot drop type test.subType being used by type test.superType_superlist</expected-error>
+        <expected-error>Cannot drop type test.subType being used by type test.superType_superlist</expected-error>
       </compilation-unit>
     </test-case>
   </test-group>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index 2ee3a2c..ab55c89 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -3438,13 +3438,13 @@
       <test-case FilePath="open-index-enforced/error-checking">
         <compilation-unit name="index-type-collision">
           <output-dir compare="Text">index-type-collision</output-dir>
-          <expected-error>org.apache.asterix.common.exceptions.AsterixException: Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[int32]"</expected-error>
+          <expected-error>Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[int32]"</expected-error>
         </compilation-unit>
       </test-case>
       <test-case FilePath="open-index-enforced/error-checking">
         <compilation-unit name="index-type-promotion-collision">
           <output-dir compare="Text">index-type-promotion-collision</output-dir>
-          <expected-error>org.apache.asterix.common.exceptions.AsterixException: Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[int64]"</expected-error>
+          <expected-error>Cannot create index testIdx2 , enforced index testIdx1 on field "[value]" is already defined with type "[int64]"</expected-error>
         </compilation-unit>
       </test-case>
       <test-case FilePath="open-index-enforced/error-checking">
@@ -6298,7 +6298,7 @@
     <test-case FilePath="cross-dataverse">
       <compilation-unit name="cross-dv13">
         <output-dir compare="Text">cross-dv13</output-dir>
-        <expected-error>Error: Recursive invocation testdv2.fun03@0</expected-error>
+        <expected-error>Recursive invocation testdv2.fun03@0</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="cross-dataverse">
@@ -6314,7 +6314,7 @@
     <test-case FilePath="cross-dataverse">
       <compilation-unit name="cross-dv16">
         <output-dir compare="Text">cross-dv16</output-dir>
-        <expected-error>Error: Recursive invocation testdv1.fun04@0</expected-error>
+        <expected-error>Recursive invocation testdv1.fun04@0</expected-error>
       </compilation-unit>
     </test-case>
     <!--NotImplementedException: No binary comparator factory implemented for type RECORD.
@@ -6353,19 +6353,19 @@
     <test-case FilePath="cross-dataverse">
       <compilation-unit name="drop-type-used-elsewhere">
         <output-dir compare="Text">drop-type-used-elsewhere</output-dir>
-        <expected-error>Error: Cannot drop type a.a being used by dataset b.b1</expected-error>
+        <expected-error>Cannot drop type a.a being used by dataset b.b1</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="cross-dataverse">
       <compilation-unit name="drop-type-used-here-dataset">
         <output-dir compare="Text">drop-type-used-here-dataset</output-dir>
-        <expected-error>Error: Cannot drop type c.a being used by dataset c.a1</expected-error>
+        <expected-error>Cannot drop type c.a being used by dataset c.a1</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="cross-dataverse">
       <compilation-unit name="drop-type-used-here-type">
         <output-dir compare="Text">drop-type-used-here-type</output-dir>
-        <expected-error>Error: Cannot drop type c.a being used by type c.b</expected-error>
+        <expected-error>Cannot drop type c.a being used by type c.b</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="cross-dataverse">
@@ -6403,7 +6403,7 @@
     <test-case FilePath="user-defined-functions">
       <compilation-unit name="query-issue455">
         <output-dir compare="Text">query-issue455</output-dir>
-        <expected-error>Error: function test.printName@0 is not defined</expected-error>
+        <expected-error>function test.printName@0 is not defined</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="user-defined-functions">
@@ -6547,7 +6547,7 @@
     <test-case FilePath="user-defined-functions">
       <compilation-unit name="udf26"><!-- Error not propagated properly -->
         <output-dir compare="Text">udf26</output-dir>
-        <expected-error>Error: function test.needs_f1@1 depends upon function test.f1@0 which is undefined</expected-error>
+        <expected-error>function test.needs_f1@1 depends upon function test.f1@0 which is undefined</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="user-defined-functions"><!-- Exception is never thrown!! -->
@@ -6568,7 +6568,7 @@
     <test-case FilePath="user-defined-functions">
       <compilation-unit name="udf30">
         <output-dir compare="Text">udf30</output-dir>
-        <expected-error>Error: can't find variable $y</expected-error>
+        <expected-error>can't find variable $y</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="user-defined-functions">
@@ -6579,7 +6579,7 @@
     <test-case FilePath="user-defined-functions">
       <compilation-unit name="f01">
         <output-dir compare="Text">f01</output-dir>
-        <expected-error>Error: function test.int8@0 is not defined</expected-error>
+        <expected-error>function test.int8@0 is not defined</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="user-defined-functions">
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/CompilationException.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/CompilationException.java
index cb931dc..b53eec4 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/CompilationException.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/CompilationException.java
@@ -24,6 +24,7 @@
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 
 public class CompilationException extends AlgebricksException {
+    private static final long serialVersionUID = 1L;
 
     public CompilationException(int errorCode, Serializable... params) {
         super(ErrorCode.ASTERIX, errorCode, ErrorCode.getErrorMessage(errorCode), params);
@@ -33,4 +34,35 @@
         super(ErrorCode.ASTERIX, errorCode, ErrorCode.getErrorMessage(errorCode), params);
         addSuppressed(cause);
     }
+
+    /**
+     * @deprecated (Don't use this and provide an error code. This exists for the current exceptions and
+     *             those exceptions need to adopt error code as well.)
+     * @param message
+     */
+    @Deprecated
+    public CompilationException(String message) {
+        super(message);
+    }
+
+    /**
+     * @deprecated (Don't use this and provide an error code. This exists for the current exceptions and
+     *             those exceptions need to adopt error code as well.)
+     * @param message
+     */
+    @Deprecated
+    public CompilationException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * @deprecated (Don't use this and provide an error code. This exists for the current exceptions and
+     *             those exceptions need to adopt error code as well.)
+     * @param message
+     */
+    @Deprecated
+    public CompilationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
 }
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/DistinctClause.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/DistinctClause.java
index 9ee86e2..bb4d346 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/DistinctClause.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/DistinctClause.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLVisitor;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
@@ -48,7 +48,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/ForClause.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/ForClause.java
index 39e7bbb..6cdc2f3 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/ForClause.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/ForClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.aql.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLVisitor;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
@@ -69,7 +69,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/JoinClause.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/JoinClause.java
index 558bd52..4767f4f 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/JoinClause.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/JoinClause.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLPlusVisitor;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLPlusVisitor<R, T>) visitor).visitJoinClause(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/MetaVariableClause.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/MetaVariableClause.java
index a33699e..871c2ce 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/MetaVariableClause.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/clause/MetaVariableClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.aql.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLPlusVisitor;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.struct.VarIdentifier;
@@ -28,7 +28,7 @@
     private VarIdentifier var;
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLPlusVisitor<R, T>) visitor).visitMetaVariableClause(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/FLWOGRExpression.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/FLWOGRExpression.java
index 0761396..10143f2 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/FLWOGRExpression.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/FLWOGRExpression.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLVisitor;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Clause.ClauseType;
@@ -72,7 +72,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLVisitor<R, T>) visitor).visit(this, arg);
     }
 }
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/MetaVariableExpr.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/MetaVariableExpr.java
index 99c7902..2964eff 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/MetaVariableExpr.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/MetaVariableExpr.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.aql.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLPlusVisitor;
 import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -26,7 +26,7 @@
 public class MetaVariableExpr extends VariableExpr {
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLPlusVisitor<R, T>) visitor).visitMetaVariableExpr(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/UnionExpr.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/UnionExpr.java
index 2c8756b..133cb46 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/UnionExpr.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/expression/UnionExpr.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.base.IAQLVisitor;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -56,7 +56,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((IAQLVisitor<R, T>) visitor).visit(this, arg);
     }
 }
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
index 1f58d08..47a9580 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.IParser;
 import org.apache.asterix.lang.common.base.IParserFactory;
 import org.apache.asterix.lang.common.base.Statement;
@@ -39,7 +39,7 @@
         this.parserFactory = parserFactory;
     }
 
-    public FunctionDecl getFunctionDecl(Function function) throws AsterixException {
+    public FunctionDecl getFunctionDecl(Function function) throws CompilationException {
         String functionBody = function.getFunctionBody();
         List<String> params = function.getParams();
         List<VarIdentifier> varIdentifiers = new ArrayList<VarIdentifier>();
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlQueryRewriter.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlQueryRewriter.java
index d70f399..977f6bb 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlQueryRewriter.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlQueryRewriter.java
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
@@ -31,14 +31,13 @@
 import org.apache.asterix.lang.aql.parser.AQLParserFactory;
 import org.apache.asterix.lang.aql.parser.FunctionParser;
 import org.apache.asterix.lang.aql.rewrites.visitor.AqlBuiltinFunctionRewriteVisitor;
-import org.apache.asterix.lang.common.base.IReturningStatement;
-import org.apache.asterix.lang.common.util.CommonFunctionMapUtil;
 import org.apache.asterix.lang.aql.visitor.AQLInlineUdfsVisitor;
 import org.apache.asterix.lang.aql.visitor.base.IAQLVisitor;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.IQueryRewriter;
 import org.apache.asterix.lang.common.base.Expression.Kind;
+import org.apache.asterix.lang.common.base.IQueryRewriter;
+import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
@@ -46,6 +45,7 @@
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.statement.FunctionDecl;
 import org.apache.asterix.lang.common.struct.VarIdentifier;
+import org.apache.asterix.lang.common.util.CommonFunctionMapUtil;
 import org.apache.asterix.lang.common.util.FunctionUtil;
 import org.apache.asterix.lang.common.visitor.GatherFunctionCallsVisitor;
 import org.apache.asterix.metadata.declared.MetadataProvider;
@@ -68,7 +68,7 @@
 
     @Override
     public void rewrite(List<FunctionDecl> declaredFunctions, IReturningStatement topStatement,
-            MetadataProvider metadataProvider, LangRewritingContext context) throws AsterixException {
+            MetadataProvider metadataProvider, LangRewritingContext context) throws CompilationException {
         setup(declaredFunctions, topStatement, metadataProvider, context);
         if (topStatement.isTopLevel()) {
             wrapInLets();
@@ -96,7 +96,7 @@
         }
     }
 
-    private void rewriteFunctionName() throws AsterixException {
+    private void rewriteFunctionName() throws CompilationException {
         if (topStatement == null) {
             return;
         }
@@ -104,7 +104,7 @@
         topStatement.accept(visitor, null);
     }
 
-    private void inlineDeclaredUdfs() throws AsterixException {
+    private void inlineDeclaredUdfs() throws CompilationException {
         if (topStatement == null) {
             return;
         }
@@ -130,7 +130,7 @@
         declaredFunctions.removeAll(storedFunctionDecls);
     }
 
-    private Set<FunctionSignature> getFunctionCalls(Expression expression) throws AsterixException {
+    private Set<FunctionSignature> getFunctionCalls(Expression expression) throws CompilationException {
         GatherFunctionCalls gfc = new GatherFunctionCalls();
         expression.accept(gfc, null);
         return gfc.getCalls();
@@ -142,7 +142,7 @@
         }
 
         @Override
-        public Void visit(DistinctClause dc, Void arg) throws AsterixException {
+        public Void visit(DistinctClause dc, Void arg) throws CompilationException {
             for (Expression e : dc.getDistinctByExpr()) {
                 e.accept(this, arg);
             }
@@ -150,7 +150,7 @@
         }
 
         @Override
-        public Void visit(FLWOGRExpression flwor, Void arg) throws AsterixException {
+        public Void visit(FLWOGRExpression flwor, Void arg) throws CompilationException {
             for (Clause c : flwor.getClauseList()) {
                 c.accept(this, arg);
             }
@@ -159,7 +159,7 @@
         }
 
         @Override
-        public Void visit(ForClause fc, Void arg) throws AsterixException {
+        public Void visit(ForClause fc, Void arg) throws CompilationException {
             fc.getInExpr().accept(this, arg);
             if (fc.getPosVarExpr() != null) {
                 fc.getPosVarExpr().accept(this, arg);
@@ -168,7 +168,7 @@
         }
 
         @Override
-        public Void visit(GroupbyClause gc, Void arg) throws AsterixException {
+        public Void visit(GroupbyClause gc, Void arg) throws CompilationException {
             for (GbyVariableExpressionPair p : gc.getGbyPairList()) {
                 p.getExpr().accept(this, arg);
             }
@@ -179,13 +179,13 @@
         }
 
         @Override
-        public Void visit(LetClause lc, Void arg) throws AsterixException {
+        public Void visit(LetClause lc, Void arg) throws CompilationException {
             lc.getBindingExpr().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(UnionExpr u, Void arg) throws AsterixException {
+        public Void visit(UnionExpr u, Void arg) throws CompilationException {
             for (Expression e : u.getExprs()) {
                 e.accept(this, arg);
             }
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlStatementRewriter.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlStatementRewriter.java
index b9566f4..a89e8bd 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlStatementRewriter.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/AqlStatementRewriter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.aql.rewrites;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.AqlDeleteRewriteVisitor;
 import org.apache.asterix.lang.common.base.IStatementRewriter;
 import org.apache.asterix.lang.common.base.Statement;
@@ -26,11 +26,11 @@
 class AqlStatementRewriter implements IStatementRewriter {
 
     @Override
-    public void rewrite(Statement stmt) throws AsterixException {
+    public void rewrite(Statement stmt) throws CompilationException {
         rewriteDeleteStatement(stmt);
     }
 
-    private void rewriteDeleteStatement(Statement stmt) throws AsterixException {
+    private void rewriteDeleteStatement(Statement stmt) throws CompilationException {
         if (stmt != null) {
             AqlDeleteRewriteVisitor visitor = new AqlDeleteRewriteVisitor();
             stmt.accept(visitor, null);
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/visitor/AqlBuiltinFunctionRewriteVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/visitor/AqlBuiltinFunctionRewriteVisitor.java
index 4c9a615..4f422d4 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/visitor/AqlBuiltinFunctionRewriteVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/rewrites/visitor/AqlBuiltinFunctionRewriteVisitor.java
@@ -22,18 +22,18 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.lang.common.util.CommonFunctionMapUtil;
 import org.apache.asterix.lang.aql.visitor.base.AbstractAqlSimpleExpressionVisitor;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.util.CommonFunctionMapUtil;
 
 public class AqlBuiltinFunctionRewriteVisitor extends AbstractAqlSimpleExpressionVisitor {
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         FunctionSignature functionSignature = callExpr.getFunctionSignature();
         callExpr.setFunctionSignature(CommonFunctionMapUtil.normalizeBuiltinFunctionSignature(functionSignature));
         List<Expression> newExprList = new ArrayList<>();
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/statement/SubscribeFeedStatement.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/statement/SubscribeFeedStatement.java
index f2f04d8..1d0d962 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/statement/SubscribeFeedStatement.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/statement/SubscribeFeedStatement.java
@@ -26,7 +26,7 @@
 
 import org.apache.asterix.active.EntityId;
 import org.apache.asterix.common.exceptions.ACIDException;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.external.feed.management.FeedConnectionRequest;
 import org.apache.asterix.external.feed.policy.FeedPolicyAccessor;
@@ -142,7 +142,7 @@
         try {
             statements = parser.parse();
             query = ((InsertStatement) statements.get(3)).getQuery();
-        } catch (AsterixException pe) {
+        } catch (CompilationException pe) {
             throw new MetadataException(pe);
         }
 
@@ -170,7 +170,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLFormatPrintUtil.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLFormatPrintUtil.java
index fe6c5ac..7848bf3 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLFormatPrintUtil.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLFormatPrintUtil.java
@@ -23,7 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.AQLFormatPrintVisitor;
 import org.apache.asterix.lang.aql.visitor.AQLToSQLPPPrintVisitor;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -31,12 +31,12 @@
 
 public class AQLFormatPrintUtil {
 
-    public static void print(ILangExpression expr, PrintWriter output) throws AsterixException {
+    public static void print(ILangExpression expr, PrintWriter output) throws CompilationException {
         AQLFormatPrintVisitor visitor = new AQLFormatPrintVisitor(output);
         expr.accept(visitor, 0);
     }
 
-    public static void print(List<Statement> exprs, PrintWriter output) throws AsterixException {
+    public static void print(List<Statement> exprs, PrintWriter output) throws CompilationException {
         AQLFormatPrintVisitor visitor = new AQLFormatPrintVisitor(output);
         for (Statement expr : exprs) {
             expr.accept(visitor, 0);
@@ -47,15 +47,15 @@
      * @param expr
      *            a language expression.
      * @return a formatted string of a language expression.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static String toString(ILangExpression expr) throws AsterixException {
+    public static String toString(ILangExpression expr) throws CompilationException {
         List<ILangExpression> exprs = new ArrayList<>();
         exprs.add(expr);
         return toString(exprs);
     }
 
-    public static String toString(List<ILangExpression> exprs) throws AsterixException {
+    public static String toString(List<ILangExpression> exprs) throws CompilationException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         PrintWriter output = new PrintWriter(bos);
         AQLFormatPrintVisitor visitor = new AQLFormatPrintVisitor(output);
@@ -66,7 +66,7 @@
         return bos.toString();
     }
 
-    public static String toSQLPPString(List<Statement> exprs) throws AsterixException {
+    public static String toSQLPPString(List<Statement> exprs) throws CompilationException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         PrintWriter output = new PrintWriter(bos);
         AQLToSQLPPPrintVisitor visitor = new AQLToSQLPPPrintVisitor(output);
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLVariableSubstitutionUtil.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLVariableSubstitutionUtil.java
index 717eb5c..096b12f 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLVariableSubstitutionUtil.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/AQLVariableSubstitutionUtil.java
@@ -20,7 +20,7 @@
 
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.visitor.AQLCloneAndSubstituteVariablesVisitor;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -31,7 +31,7 @@
 public class AQLVariableSubstitutionUtil {
 
     public static ILangExpression substituteVariable(ILangExpression expression,
-            Map<VariableExpr, Expression> varExprMap) throws AsterixException {
+            Map<VariableExpr, Expression> varExprMap) throws CompilationException {
         AQLCloneAndSubstituteVariablesVisitor visitor = new AQLCloneAndSubstituteVariablesVisitor(
                 new LangRewritingContext(0));
         VariableSubstitutionEnvironment env = new VariableSubstitutionEnvironment(varExprMap);
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
index 2e03b8a..9cf8b8d 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/util/RangeMapBuilder.java
@@ -21,7 +21,7 @@
 import java.io.DataOutput;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.formats.nontagged.BinaryComparatorFactoryProvider;
 import org.apache.asterix.formats.nontagged.SerializerDeserializerProvider;
 import org.apache.asterix.lang.aql.parser.AQLParserFactory;
@@ -58,7 +58,7 @@
 public abstract class RangeMapBuilder {
     private static final IParserFactory parserFactory = new AQLParserFactory();
 
-    public static IRangeMap parseHint(Object hint) throws AsterixException {
+    public static IRangeMap parseHint(Object hint) throws CompilationException {
         ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         DataOutput out = abvs.getDataOutput();;
         abvs.reset();
@@ -66,17 +66,17 @@
         IParser parser = parserFactory.createParser((String) hint);
         List<Statement> hintStatements = parser.parse();
         if (hintStatements.size() != 1) {
-            throw new AsterixException("Only one range statement is allowed for the range hint.");
+            throw new CompilationException("Only one range statement is allowed for the range hint.");
         }
 
         // Translate the query into a Range Map
         if (hintStatements.get(0).getKind() != Statement.Kind.QUERY) {
-            throw new AsterixException("Not a proper query for the range hint.");
+            throw new CompilationException("Not a proper query for the range hint.");
         }
         Query q = (Query) hintStatements.get(0);
 
         if (q.getBody().getKind() != Kind.LIST_CONSTRUCTOR_EXPRESSION) {
-            throw new AsterixException("The range hint must be a list.");
+            throw new CompilationException("The range hint must be a list.");
         }
         List<Expression> el = ((ListConstructor) q.getBody()).getExprList();
         int offsets[] = new int[el.size()];
@@ -95,7 +95,7 @@
     }
 
     @SuppressWarnings("unchecked")
-    private static void parseLiteralToBytes(Expression item, DataOutput out) throws AsterixException {
+    private static void parseLiteralToBytes(Expression item, DataOutput out) throws CompilationException {
         AMutableDouble aDouble = new AMutableDouble(0);
         AMutableFloat aFloat = new AMutableFloat(0);
         AMutableInt64 aInt64 = new AMutableInt64(0);
@@ -142,11 +142,11 @@
                             + item.getKind() + " type of expressions.");
             }
         } catch (HyracksDataException e) {
-            throw new AsterixException(e.getMessage());
+            throw new CompilationException(e.getMessage());
         }
     }
 
-    public static void verifyRangeOrder(IRangeMap rangeMap, boolean ascending) throws AsterixException {
+    public static void verifyRangeOrder(IRangeMap rangeMap, boolean ascending) throws CompilationException {
         // TODO Add support for composite fields.
         int fieldIndex = 0;
         int fieldType = rangeMap.getTag(0, 0);
@@ -157,7 +157,7 @@
         int c = 0;
         for (int split = 1; split < rangeMap.getSplitCount(); ++split) {
             if (fieldType != rangeMap.getTag(fieldIndex, split)) {
-                throw new AsterixException("Range field contains more than a single type of items (" + fieldType
+                throw new CompilationException("Range field contains more than a single type of items (" + fieldType
                         + " and " + rangeMap.getTag(fieldIndex, split) + ").");
             }
             int previousSplit = split - 1;
@@ -167,10 +167,10 @@
                         rangeMap.getLength(fieldIndex, previousSplit), rangeMap.getByteArray(fieldIndex, split),
                         rangeMap.getStartOffset(fieldIndex, split), rangeMap.getLength(fieldIndex, split));
             } catch (HyracksDataException e) {
-                throw new AsterixException(e);
+                throw new CompilationException(e);
             }
             if (c >= 0) {
-                throw new AsterixException("Range fields are not in sorted order.");
+                throw new CompilationException("Range fields are not in sorted order.");
             }
         }
     }
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLAstPrintVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLAstPrintVisitor.java
index 0636114..1f76f75 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLAstPrintVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLAstPrintVisitor.java
@@ -20,7 +20,7 @@
 
 import java.io.PrintWriter;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -45,7 +45,7 @@
     }
 
     @Override
-    public Void visit(FLWOGRExpression flwor, Integer step) throws AsterixException {
+    public Void visit(FLWOGRExpression flwor, Integer step) throws CompilationException {
         out.println(skip(step) + "FLWOGR [");
         for (Clause cl : flwor.getClauseList()) {
             cl.accept(this, step + 1);
@@ -57,7 +57,7 @@
     }
 
     @Override
-    public Void visit(ForClause fc, Integer step) throws AsterixException {
+    public Void visit(ForClause fc, Integer step) throws CompilationException {
         out.print(skip(step) + "For ");
         fc.getVarExpr().accept(this, 0);
         out.println(skip(step + 1) + "In ");
@@ -66,7 +66,7 @@
     }
 
     @Override
-    public Void visit(UnionExpr u, Integer step) throws AsterixException {
+    public Void visit(UnionExpr u, Integer step) throws CompilationException {
         out.println(skip(step) + "Union [");
         for (Expression expr : u.getExprs()) {
             expr.accept(this, step + 1);
@@ -76,7 +76,7 @@
     }
 
     @Override
-    public Void visit(DistinctClause dc, Integer step) throws AsterixException {
+    public Void visit(DistinctClause dc, Integer step) throws CompilationException {
         out.print(skip(step) + "Distinct ");
         for (Expression expr : dc.getDistinctByExpr()) {
             expr.accept(this, step + 1);
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLCloneAndSubstituteVariablesVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLCloneAndSubstituteVariablesVisitor.java
index 3352125..0e7b4ad 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLCloneAndSubstituteVariablesVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLCloneAndSubstituteVariablesVisitor.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -49,7 +49,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(ForClause fc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = fc.getInExpr().accept(this, env);
         VariableExpr varExpr = fc.getVarExpr();
         VariableExpr newVe = generateNewVariable(context, varExpr);
@@ -68,7 +68,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(FLWOGRExpression flwor,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Clause> newClauses = new ArrayList<Clause>(flwor.getClauseList().size());
         VariableSubstitutionEnvironment currentEnv = env;
         for (Clause c : flwor.getClauseList()) {
@@ -84,7 +84,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(UnionExpr u,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> exprList = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(u.getExprs(), env, this);
         UnionExpr newU = new UnionExpr(exprList);
         return new Pair<ILangExpression, VariableSubstitutionEnvironment>(newU, env);
@@ -92,7 +92,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(DistinctClause dc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> exprList = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(dc.getDistinctByExpr(), env,
                 this);
         DistinctClause dc2 = new DistinctClause(exprList);
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLFormatPrintVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLFormatPrintVisitor.java
index ae186ab..a12f089 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLFormatPrintVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLFormatPrintVisitor.java
@@ -20,7 +20,7 @@
 
 import java.io.PrintWriter;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -44,7 +44,7 @@
     }
 
     @Override
-    public Void visit(FLWOGRExpression flwor, Integer step) throws AsterixException {
+    public Void visit(FLWOGRExpression flwor, Integer step) throws CompilationException {
         for (Clause cl : flwor.getClauseList()) {
             cl.accept(this, step);
         }
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public Void visit(ForClause fc, Integer step) throws AsterixException {
+    public Void visit(ForClause fc, Integer step) throws CompilationException {
         out.print("for ");
         fc.getVarExpr().accept(this, step + 2);
         if (fc.hasPosVar()) {
@@ -68,13 +68,13 @@
     }
 
     @Override
-    public Void visit(UnionExpr u, Integer step) throws AsterixException {
+    public Void visit(UnionExpr u, Integer step) throws CompilationException {
         printDelimitedExpressions(u.getExprs(), "\n" + skip(step) + "union\n", step);
         return null;
     }
 
     @Override
-    public Void visit(DistinctClause dc, Integer step) throws AsterixException {
+    public Void visit(DistinctClause dc, Integer step) throws CompilationException {
         out.print(skip(step) + "distinct by ");
         printDelimitedExpressions(dc.getDistinctByExpr(), COMMA, step + 2);
         out.println();
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLInlineUdfsVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLInlineUdfsVisitor.java
index 71ce034..fb452d2 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLInlineUdfsVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLInlineUdfsVisitor.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public Boolean visit(FLWOGRExpression flwor, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(FLWOGRExpression flwor, List<FunctionDecl> arg) throws CompilationException {
         boolean changed = false;
         for (Clause c : flwor.getClauseList()) {
             if (c.accept(this, arg)) {
@@ -60,21 +60,21 @@
     }
 
     @Override
-    public Boolean visit(ForClause fc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(ForClause fc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(fc.getInExpr(), arg);
         fc.setInExpr(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(UnionExpr u, List<FunctionDecl> fds) throws AsterixException {
+    public Boolean visit(UnionExpr u, List<FunctionDecl> fds) throws CompilationException {
         Pair<Boolean, List<Expression>> p = inlineUdfsInExprList(u.getExprs(), fds);
         u.setExprs(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(DistinctClause dc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(DistinctClause dc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, List<Expression>> p = inlineUdfsInExprList(dc.getDistinctByExpr(), arg);
         dc.setDistinctByExpr(p.second);
         return p.first;
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLToSQLPPPrintVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLToSQLPPPrintVisitor.java
index 0525f80..481dea7 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLToSQLPPPrintVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/AQLToSQLPPPrintVisitor.java
@@ -29,7 +29,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
@@ -83,7 +83,7 @@
     }
 
     @Override
-    public Void visit(FLWOGRExpression flwor, Integer step) throws AsterixException {
+    public Void visit(FLWOGRExpression flwor, Integer step) throws CompilationException {
         if (step != 0) {
             out.println("(");
         }
@@ -202,14 +202,14 @@
     }
 
     @Override
-    public Void visit(ForClause fc, Integer step) throws AsterixException {
+    public Void visit(ForClause fc, Integer step) throws CompilationException {
         // The processing of a "for" clause depends on its neighbor clauses,
         // hence the logic goes to visit(FLWOGRExpression).
         return null;
     }
 
     private void visitForClause(ForClause fc, Integer step, boolean startFor, boolean hasConsequentFor)
-            throws AsterixException {
+            throws CompilationException {
         if (startFor) {
             out.print(skip(step) + "from  ");
         } else {
@@ -229,7 +229,7 @@
     }
 
     private void visitLetClause(LetClause lc, Integer step, boolean startLet, boolean hasConsequentLet)
-            throws AsterixException {
+            throws CompilationException {
         if (startLet) {
             out.print(skip(step) + "with  ");
         } else {
@@ -245,7 +245,7 @@
     }
 
     @Override
-    public Void visit(Query q, Integer step) throws AsterixException {
+    public Void visit(Query q, Integer step) throws CompilationException {
         Expression expr = q.getBody();
         if (expr != null) {
             if (expr.getKind() != Kind.FLWOGR_EXPRESSION) {
@@ -262,19 +262,19 @@
     }
 
     @Override
-    public Void visit(DataverseDecl dv, Integer step) throws AsterixException {
+    public Void visit(DataverseDecl dv, Integer step) throws CompilationException {
         out.println(skip(step) + "use " + normalize(dv.getDataverseName().getValue()) + ";\n\n");
         return null;
     }
 
     @Override
-    public Void visit(UnionExpr u, Integer step) throws AsterixException {
+    public Void visit(UnionExpr u, Integer step) throws CompilationException {
         printDelimitedExpressions(u.getExprs(), "\n" + skip(step) + "union\n" + skip(step), step);
         return null;
     }
 
     @Override
-    public Void visit(DistinctClause dc, Integer step) throws AsterixException {
+    public Void visit(DistinctClause dc, Integer step) throws CompilationException {
         return null;
     }
 
@@ -289,7 +289,7 @@
     }
 
     @Override
-    public Void visit(LetClause lc, Integer step) throws AsterixException {
+    public Void visit(LetClause lc, Integer step) throws CompilationException {
         out.print(skip(step) + "with ");
         lc.getVarExpr().accept(this, step + 2);
         out.print(" as ");
@@ -300,7 +300,7 @@
     }
 
     @Override
-    public Void visit(CallExpr callExpr, Integer step) throws AsterixException {
+    public Void visit(CallExpr callExpr, Integer step) throws CompilationException {
         FunctionSignature signature = callExpr.getFunctionSignature();
         if (signature.getNamespace() != null && signature.getNamespace().equals("Metadata")
                 && signature.getName().equals("dataset") && signature.getArity() == 1) {
@@ -317,7 +317,7 @@
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Integer step) throws AsterixException {
+    public Void visit(GroupbyClause gc, Integer step) throws CompilationException {
         if (gc.hasHashGroupByHint()) {
             out.println(skip(step) + "/* +hash */");
         }
@@ -328,7 +328,7 @@
     }
 
     @Override
-    public Void visit(InsertStatement insert, Integer step) throws AsterixException {
+    public Void visit(InsertStatement insert, Integer step) throws CompilationException {
         out.print(skip(step) + "insert into " + generateFullName(insert.getDataverseName(), insert.getDatasetName())
                 + "\n");
         insert.getQuery().accept(this, step);
@@ -337,7 +337,7 @@
     }
 
     @Override
-    public Void visit(DeleteStatement del, Integer step) throws AsterixException {
+    public Void visit(DeleteStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "delete ");
         del.getVariableExpr().accept(this, step + 2);
         out.println(skip(step) + " from " + generateFullName(del.getDataverseName(), del.getDatasetName()));
@@ -366,7 +366,7 @@
 
     @Override
     protected void printDelimitedGbyExpressions(List<GbyVariableExpressionPair> gbyList, int step)
-            throws AsterixException {
+            throws CompilationException {
         int gbySize = gbyList.size();
         int gbyIndex = 0;
         for (GbyVariableExpressionPair pair : gbyList) {
@@ -445,7 +445,7 @@
     }
 
     // Processes leading "let"s in a FLWOGR.
-    private void processLeadingLetClauses(Integer step, List<Clause> clauseList) throws AsterixException {
+    private void processLeadingLetClauses(Integer step, List<Clause> clauseList) throws CompilationException {
         List<Clause> processedLetList = new ArrayList<Clause>();
         boolean firstLet = true;
         int size = clauseList.size();
@@ -473,10 +473,10 @@
      * @param clauseList
      *            , a list of clauses
      * @return the cutting group-by clause and the list of extracted clauses.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     private Pair<GroupbyClause, List<Clause>> extractUnnestAfterGroupby(List<Clause> clauseList)
-            throws AsterixException {
+            throws CompilationException {
         List<Clause> nestedClauses = new ArrayList<Clause>();
         GroupbyClause cuttingGbyClause = null;
         boolean meetGroupBy = false;
@@ -519,7 +519,7 @@
 
     // Extracts the variables to be substituted.
     private Map<VariableExpr, Expression> extractLetBindingVariables(List<Clause> clauses,
-            GroupbyClause cuttingGbyClause) throws AsterixException {
+            GroupbyClause cuttingGbyClause) throws CompilationException {
         Map<VariableExpr, Expression> varExprMap = new HashMap<VariableExpr, Expression>();
         int gbyIndex = clauses.indexOf(cuttingGbyClause);
         for (int i = gbyIndex + 1; i < clauses.size(); i++) {
@@ -560,7 +560,7 @@
     }
 
     // Merge consecutive "where" clauses.
-    private void mergeConsecutiveWhereClauses(List<Clause> clauses) throws AsterixException {
+    private void mergeConsecutiveWhereClauses(List<Clause> clauses) throws CompilationException {
         List<Clause> results = new ArrayList<Clause>();
         int size = clauses.size();
         for (int index = 0; index < size;) {
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlAstVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlAstVisitor.java
index 05c1b81..a2b9ac6 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlAstVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlAstVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.aql.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -28,22 +28,22 @@
 public abstract class AbstractAqlAstVisitor<R, T> extends AbstractAstVisitor<R, T> implements IAQLVisitor<R, T> {
 
     @Override
-    public R visit(FLWOGRExpression flwogreExpr, T arg) throws AsterixException {
+    public R visit(FLWOGRExpression flwogreExpr, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(UnionExpr u, T arg) throws AsterixException {
+    public R visit(UnionExpr u, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(ForClause forClause, T arg) throws AsterixException {
+    public R visit(ForClause forClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DistinctClause distinctClause, T arg) throws AsterixException {
+    public R visit(DistinctClause distinctClause, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlSimpleExpressionVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlSimpleExpressionVisitor.java
index 2b71202..4f52c37 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlSimpleExpressionVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/AbstractAqlSimpleExpressionVisitor.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -55,7 +55,7 @@
 public class AbstractAqlSimpleExpressionVisitor extends AbstractAqlQueryExpressionVisitor<Expression, ILangExpression> {
 
     @Override
-    public Expression visit(FLWOGRExpression flwogreExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(FLWOGRExpression flwogreExpr, ILangExpression arg) throws CompilationException {
         for (Clause clause : flwogreExpr.getClauseList()) {
             clause.accept(this, arg);
         }
@@ -64,49 +64,49 @@
     }
 
     @Override
-    public Expression visit(UnionExpr u, ILangExpression arg) throws AsterixException {
+    public Expression visit(UnionExpr u, ILangExpression arg) throws CompilationException {
         u.setExprs(visit(u.getExprs(), arg));
         return u;
     }
 
     @Override
-    public Expression visit(ForClause forClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(ForClause forClause, ILangExpression arg) throws CompilationException {
         forClause.setInExpr(forClause.getInExpr().accept(this, arg));
         return null;
     }
 
     @Override
-    public Expression visit(DistinctClause distinctClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(DistinctClause distinctClause, ILangExpression arg) throws CompilationException {
         distinctClause.setDistinctByExpr(visit(distinctClause.getDistinctByExpr(), arg));
         return null;
     }
 
     @Override
-    public Expression visit(Query q, ILangExpression arg) throws AsterixException {
+    public Expression visit(Query q, ILangExpression arg) throws CompilationException {
         q.setBody(visit(q.getBody(), q));
         return null;
     }
 
     @Override
-    public Expression visit(FunctionDecl fd, ILangExpression arg) throws AsterixException {
+    public Expression visit(FunctionDecl fd, ILangExpression arg) throws CompilationException {
         fd.setFuncBody(visit(fd.getFuncBody(), fd));
         return null;
     }
 
     @Override
-    public Expression visit(WhereClause whereClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(WhereClause whereClause, ILangExpression arg) throws CompilationException {
         whereClause.setWhereExpr(visit(whereClause.getWhereExpr(), whereClause));
         return null;
     }
 
     @Override
-    public Expression visit(OrderbyClause oc, ILangExpression arg) throws AsterixException {
+    public Expression visit(OrderbyClause oc, ILangExpression arg) throws CompilationException {
         oc.setOrderbyList(visit(oc.getOrderbyList(), arg));
         return null;
     }
 
     @Override
-    public Expression visit(GroupbyClause gc, ILangExpression arg) throws AsterixException {
+    public Expression visit(GroupbyClause gc, ILangExpression arg) throws CompilationException {
         for (GbyVariableExpressionPair gbyVarExpr : gc.getGbyPairList()) {
             gbyVarExpr.setExpr(visit(gbyVarExpr.getExpr(), gc));
         }
@@ -114,7 +114,7 @@
     }
 
     @Override
-    public Expression visit(LimitClause limitClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(LimitClause limitClause, ILangExpression arg) throws CompilationException {
         limitClause.setLimitExpr(visit(limitClause.getLimitExpr(), limitClause));
         if (limitClause.hasOffset()) {
             limitClause.setOffset(visit(limitClause.getOffset(), limitClause));
@@ -123,24 +123,24 @@
     }
 
     @Override
-    public Expression visit(LetClause letClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(LetClause letClause, ILangExpression arg) throws CompilationException {
         letClause.setBindingExpr(visit(letClause.getBindingExpr(), letClause));
         return null;
     }
 
     @Override
-    public Expression visit(LiteralExpr l, ILangExpression arg) throws AsterixException {
+    public Expression visit(LiteralExpr l, ILangExpression arg) throws CompilationException {
         return l;
     }
 
     @Override
-    public Expression visit(ListConstructor lc, ILangExpression arg) throws AsterixException {
+    public Expression visit(ListConstructor lc, ILangExpression arg) throws CompilationException {
         lc.setExprList(visit(lc.getExprList(), arg));
         return lc;
     }
 
     @Override
-    public Expression visit(RecordConstructor rc, ILangExpression arg) throws AsterixException {
+    public Expression visit(RecordConstructor rc, ILangExpression arg) throws CompilationException {
         for (FieldBinding binding : rc.getFbList()) {
             binding.setLeftExpr(visit(binding.getLeftExpr(), rc));
             binding.setRightExpr(visit(binding.getRightExpr(), rc));
@@ -149,13 +149,13 @@
     }
 
     @Override
-    public Expression visit(OperatorExpr operatorExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(OperatorExpr operatorExpr, ILangExpression arg) throws CompilationException {
         operatorExpr.setExprList(visit(operatorExpr.getExprList(), arg));
         return operatorExpr;
     }
 
     @Override
-    public Expression visit(IfExpr ifExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(IfExpr ifExpr, ILangExpression arg) throws CompilationException {
         ifExpr.setCondExpr(visit(ifExpr.getCondExpr(), ifExpr));
         ifExpr.setThenExpr(visit(ifExpr.getThenExpr(), ifExpr));
         ifExpr.setElseExpr(visit(ifExpr.getElseExpr(), ifExpr));
@@ -163,7 +163,7 @@
     }
 
     @Override
-    public Expression visit(QuantifiedExpression qe, ILangExpression arg) throws AsterixException {
+    public Expression visit(QuantifiedExpression qe, ILangExpression arg) throws CompilationException {
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
             pair.setExpr(visit(pair.getExpr(), qe));
         }
@@ -172,30 +172,30 @@
     }
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         callExpr.setExprList(visit(callExpr.getExprList(), arg));
         return callExpr;
     }
 
     @Override
-    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws CompilationException {
         return varExpr;
     }
 
     @Override
-    public Expression visit(UnaryExpr u, ILangExpression arg) throws AsterixException {
+    public Expression visit(UnaryExpr u, ILangExpression arg) throws CompilationException {
         u.setExpr(visit(u.getExpr(), u));
         return u;
     }
 
     @Override
-    public Expression visit(FieldAccessor fa, ILangExpression arg) throws AsterixException {
+    public Expression visit(FieldAccessor fa, ILangExpression arg) throws CompilationException {
         fa.setExpr(visit(fa.getExpr(), fa));
         return fa;
     }
 
     @Override
-    public Expression visit(IndexAccessor ia, ILangExpression arg) throws AsterixException {
+    public Expression visit(IndexAccessor ia, ILangExpression arg) throws CompilationException {
         ia.setExpr(visit(ia.getExpr(), ia));
         if (ia.getIndexExpr() != null) {
             ia.setIndexExpr(visit(ia.getIndexExpr(), arg));
@@ -203,19 +203,19 @@
         return ia;
     }
 
-    protected Expression visit(Expression expr, ILangExpression arg) throws AsterixException {
+    protected Expression visit(Expression expr, ILangExpression arg) throws CompilationException {
         return postVisit(preVisit(expr).accept(this, arg));
     }
 
-    protected Expression preVisit(Expression expr) throws AsterixException {
+    protected Expression preVisit(Expression expr) throws CompilationException {
         return expr;
     }
 
-    protected Expression postVisit(Expression expr) throws AsterixException {
+    protected Expression postVisit(Expression expr) throws CompilationException {
         return expr;
     }
 
-    private List<Expression> visit(List<Expression> exprs, ILangExpression arg) throws AsterixException {
+    private List<Expression> visit(List<Expression> exprs, ILangExpression arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : exprs) {
             newExprList.add(visit(expr, arg));
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLPlusVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLPlusVisitor.java
index f2037e7..b0c5464 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLPlusVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLPlusVisitor.java
@@ -18,16 +18,16 @@
  */
 package org.apache.asterix.lang.aql.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.JoinClause;
 import org.apache.asterix.lang.aql.clause.MetaVariableClause;
 import org.apache.asterix.lang.aql.expression.MetaVariableExpr;
 
 public interface IAQLPlusVisitor<R, T> extends IAQLVisitor<R, T> {
 
-    R visitJoinClause(JoinClause c, T arg) throws AsterixException;
+    R visitJoinClause(JoinClause c, T arg) throws CompilationException;
 
-    R visitMetaVariableClause(MetaVariableClause c, T arg) throws AsterixException;
+    R visitMetaVariableClause(MetaVariableClause c, T arg) throws CompilationException;
 
-    R visitMetaVariableExpr(MetaVariableExpr v, T arg) throws AsterixException;
+    R visitMetaVariableExpr(MetaVariableExpr v, T arg) throws CompilationException;
 }
diff --git a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLVisitor.java b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLVisitor.java
index d990005..303f47b 100644
--- a/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLVisitor.java
+++ b/asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/visitor/base/IAQLVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.aql.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
 import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
@@ -27,12 +27,12 @@
 
 public interface IAQLVisitor<R, T> extends ILangVisitor<R, T> {
 
-    R visit(FLWOGRExpression flwogreExpr, T arg) throws AsterixException;
+    R visit(FLWOGRExpression flwogreExpr, T arg) throws CompilationException;
 
-    R visit(UnionExpr u, T arg) throws AsterixException;
+    R visit(UnionExpr u, T arg) throws CompilationException;
 
-    R visit(ForClause forClause, T arg) throws AsterixException;
+    R visit(ForClause forClause, T arg) throws CompilationException;
 
-    R visit(DistinctClause distinctClause, T arg) throws AsterixException;
+    R visit(DistinctClause distinctClause, T arg) throws CompilationException;
 
 }
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
index 9be5f8a..4b2091c 100644
--- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
+++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -43,7 +43,7 @@
 import org.apache.asterix.common.annotations.UndeclaredFieldsDataGen;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.aql.clause.DistinctClause;
 import org.apache.asterix.lang.aql.clause.ForClause;
@@ -198,7 +198,7 @@
          try {
            throw new ParseException("Need a binding variable for the enclosed expression: " +
                                        AQLFormatPrintUtil.toString(bodyExpression));
-         } catch (AsterixException e){
+         } catch (CompilationException e){
            throw new ParseException(e.getLocalizedMessage());
          }
        }
@@ -252,7 +252,7 @@
         super.setInput(s);
     }
 
-    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, AsterixException {
+    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, CompilationException {
         File file = new File(args[0]);
         Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
         AQLParser parser = new AQLParser(fis);
@@ -260,15 +260,15 @@
         //st.accept(new AQLPrintVisitor(), 0);
     }
 
-    public List<Statement> parse() throws AsterixException {
+    public List<Statement> parse() throws CompilationException {
         try {
             return Statement();
         } catch (Error e) {
             // this is here as the JavaCharStream that's below the lexer somtimes throws Errors that are not handled
             // by the ANTLR-generated lexer or parser (e.g it does this for invalid backslash u + 4 hex digits escapes)
-            throw new AsterixException(new ParseException(e.getMessage()));
+            throw new CompilationException(new ParseException(e.getMessage()));
         } catch (ParseException e){
-            throw new AsterixException(e.getMessage());
+            throw new CompilationException(e.getMessage());
         }
     }
 }
@@ -1652,7 +1652,7 @@
         }
         try{
           op.addOperator(token.image);
-        } catch (AsterixException e){
+        } catch (CompilationException e){
           throw new ParseException(e.getMessage());
         }
     }
@@ -1687,7 +1687,7 @@
         }
         try{
           op.addOperator(token.image);
-        } catch (AsterixException e){
+        } catch (CompilationException e){
           throw new ParseException(e.getMessage());
         }
     }
@@ -1743,7 +1743,7 @@
           }
          try{
            op.addOperator(token.image);
-         } catch (AsterixException e){
+         } catch (CompilationException e){
            throw new ParseException(e.getMessage());
          }
       }
@@ -1786,7 +1786,7 @@
         }
         try{
           ((OperatorExpr)op).addOperator(token.image);
-        } catch (AsterixException e){
+        } catch (CompilationException e){
           throw new ParseException(e.getMessage());
         }
     }
@@ -1819,7 +1819,7 @@
         }
         try{
           op.addOperator(token.image);
-        } catch (AsterixException e){
+        } catch (CompilationException e){
           throw new ParseException(e.getMessage());
         }
     }
@@ -1851,7 +1851,7 @@
         }
         try{
           op.addOperator(token.image);
-        } catch (AsterixException e){
+        } catch (CompilationException e){
           throw new ParseException(e.getMessage());
         }
     }
@@ -1898,7 +1898,7 @@
           uexpr = new UnaryExpr();
           try{
             uexpr.setExprType(token.image);
-          } catch (AsterixException e){
+          } catch (CompilationException e){
             throw new ParseException(e.getMessage());
           }
     }
@@ -2417,7 +2417,7 @@
           if (hint.startsWith(RANGE_HINT)) {
             try{
               oc.setRangeMap(RangeMapBuilder.parseHint(hint.substring(RANGE_HINT.length())));
-            } catch (AsterixException e) {
+            } catch (CompilationException e) {
               throw new ParseException(e.getMessage());
             }
           }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
index 5837021..f6b9399 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
@@ -18,9 +18,9 @@
  */
 package org.apache.asterix.lang.common.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 
 public interface ILangExpression {
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException;
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException;
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java
index ad57fa9..b1287224 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParser.java
@@ -20,10 +20,10 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 
 public interface IParser {
 
-    public List<Statement> parse() throws AsterixException;
+    public List<Statement> parse() throws CompilationException;
 
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IQueryRewriter.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IQueryRewriter.java
index d77592a..0c6c04c 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IQueryRewriter.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IQueryRewriter.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.statement.FunctionDecl;
 import org.apache.asterix.metadata.declared.MetadataProvider;
@@ -40,5 +40,5 @@
      *            manages ids of variables and guarantees uniqueness of variables.
      */
     public void rewrite(List<FunctionDecl> declaredFunctions, IReturningStatement topExpr,
-            MetadataProvider metadataProvider, LangRewritingContext context) throws AsterixException;
+            MetadataProvider metadataProvider, LangRewritingContext context) throws CompilationException;
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IStatementRewriter.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IStatementRewriter.java
index ec4f24c..7de67f7 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IStatementRewriter.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IStatementRewriter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 
 public interface IStatementRewriter {
 
@@ -26,6 +26,6 @@
      * @param statement,
      *            a non-query statement.
      */
-    public void rewrite(Statement statement) throws AsterixException;
+    public void rewrite(Statement statement) throws CompilationException;
 
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/GroupbyClause.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/GroupbyClause.java
index 7dacd39..ac7cbbf 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/GroupbyClause.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/GroupbyClause.java
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
@@ -104,7 +104,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LetClause.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LetClause.java
index 7043a34..7c813d3 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LetClause.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LetClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.VariableExpr;
@@ -61,7 +61,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LimitClause.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LimitClause.java
index f9123ef..68220fc 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LimitClause.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/LimitClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/OrderbyClause.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/OrderbyClause.java
index 8574c76..0dcbd8e 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/OrderbyClause.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/OrderbyClause.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -70,7 +70,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/UpdateClause.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/UpdateClause.java
index 50bf7a5..75f6fbd 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/UpdateClause.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/UpdateClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.statement.DeleteStatement;
@@ -88,7 +88,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/WhereClause.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/WhereClause.java
index eaa17e2..c540588 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/WhereClause.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/clause/WhereClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -49,7 +49,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/CallExpr.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/CallExpr.java
index 1b7b918..30b7297 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/CallExpr.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/CallExpr.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.AbstractExpression;
 import org.apache.asterix.lang.common.base.Expression;
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/FieldAccessor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/FieldAccessor.java
index 0a76730..7009d90 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/FieldAccessor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/FieldAccessor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IfExpr.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IfExpr.java
index 2709f80..26b9c83 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IfExpr.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IfExpr.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang3.ObjectUtils;
@@ -68,7 +68,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IndexAccessor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IndexAccessor.java
index 07a8254..36111a6 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IndexAccessor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/IndexAccessor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang3.ObjectUtils;
@@ -57,7 +57,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/ListConstructor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/ListConstructor.java
index 7fdca69..9a6d3f6 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/ListConstructor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/ListConstructor.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang3.ObjectUtils;
@@ -65,7 +65,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
index 46c3c32..600a82c 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Literal;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -49,7 +49,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OperatorExpr.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OperatorExpr.java
index 1418be7..954f715 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OperatorExpr.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OperatorExpr.java
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.Optional;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.AbstractExpression;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.struct.OperatorType;
@@ -91,12 +91,12 @@
         return cmp;
     }
 
-    public void addOperator(String strOp) throws AsterixException {
+    public void addOperator(String strOp) throws CompilationException {
         Optional<OperatorType> op = OperatorType.fromSymbol(strOp);
         if (op.isPresent()) {
             opList.add(op.get());
         } else {
-            throw new AsterixException("Unsupported operator: " + strOp);
+            throw new CompilationException("Unsupported operator: " + strOp);
         }
     }
 
@@ -106,7 +106,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OrderedListTypeDefinition.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OrderedListTypeDefinition.java
index 08b9c53..7b04c7f 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OrderedListTypeDefinition.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/OrderedListTypeDefinition.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang.ObjectUtils;
 
@@ -36,7 +36,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/QuantifiedExpression.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/QuantifiedExpression.java
index e1372cd..40322d7 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/QuantifiedExpression.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/QuantifiedExpression.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.struct.QuantifiedPair;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -72,7 +72,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordConstructor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordConstructor.java
index 144b27c..6b17461 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordConstructor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordConstructor.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang3.ObjectUtils;
@@ -51,7 +51,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordTypeDefinition.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordTypeDefinition.java
index 800af9f..39fbbc4 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordTypeDefinition.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/RecordTypeDefinition.java
@@ -23,7 +23,7 @@
 
 import org.apache.asterix.common.annotations.IRecordFieldDataGen;
 import org.apache.asterix.common.annotations.UndeclaredFieldsDataGen;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang3.ObjectUtils;
 
@@ -88,7 +88,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/TypeReferenceExpression.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/TypeReferenceExpression.java
index b360797..e87b2cc 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/TypeReferenceExpression.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/TypeReferenceExpression.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang.ObjectUtils;
@@ -42,7 +42,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnaryExpr.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnaryExpr.java
index 929587c..99197c6 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnaryExpr.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnaryExpr.java
@@ -20,7 +20,7 @@
 
 import java.util.Optional;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.struct.UnaryExprType;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -43,12 +43,12 @@
         return unaryExprType;
     }
 
-    public void setExprType(String strType) throws AsterixException {
+    public void setExprType(String strType) throws CompilationException {
         Optional<UnaryExprType> exprType = UnaryExprType.fromSymbol(strType);
         if (exprType.isPresent()) {
             this.unaryExprType = exprType.get();
         } else {
-            throw new AsterixException("Unsupported operator: " + strType);
+            throw new CompilationException("Unsupported operator: " + strType);
         }
     }
 
@@ -66,7 +66,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnorderedListTypeDefinition.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnorderedListTypeDefinition.java
index a0726e2..ad6426e 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnorderedListTypeDefinition.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/UnorderedListTypeDefinition.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.commons.lang3.ObjectUtils;
 
@@ -36,7 +36,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/VariableExpr.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/VariableExpr.java
index dbaea37..8fcd2ad 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/VariableExpr.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/VariableExpr.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.struct.VarIdentifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -61,7 +61,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CompactStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CompactStatement.java
index 94aa1ac..08f12c3 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CompactStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CompactStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/ConnectFeedStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/ConnectFeedStatement.java
index fd1ca5e..ceab6e9 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/ConnectFeedStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/ConnectFeedStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -86,7 +86,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateDataverseStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateDataverseStatement.java
index a475051..b03955a 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateDataverseStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateDataverseStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedPolicyStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedPolicyStatement.java
index 75fc556..466920d 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedPolicyStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedPolicyStatement.java
@@ -20,7 +20,7 @@
 
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
index 54b6a94..56e7d33 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFeedStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public abstract <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException;
+    public abstract <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException;
 
     @Override
     public byte getCategory() {
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFunctionStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFunctionStatement.java
index 5a75f43..6d74957 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFunctionStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateFunctionStatement.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.VarIdentifier;
@@ -71,7 +71,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateIndexStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateIndexStatement.java
index 7f36c45..7297bf5 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateIndexStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateIndexStatement.java
@@ -22,7 +22,7 @@
 import java.util.List;
 
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.expression.TypeExpression;
 import org.apache.asterix.lang.common.struct.Identifier;
@@ -135,7 +135,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreatePrimaryFeedStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreatePrimaryFeedStatement.java
index 6c4d84e..c584ed0 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreatePrimaryFeedStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreatePrimaryFeedStatement.java
@@ -20,7 +20,7 @@
 
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateSecondaryFeedStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateSecondaryFeedStatement.java
index 6787426..241bcd8 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateSecondaryFeedStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/CreateSecondaryFeedStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DatasetDecl.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DatasetDecl.java
index bf27988..2eba48a 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DatasetDecl.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DatasetDecl.java
@@ -21,7 +21,7 @@
 import java.util.Map;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -136,7 +136,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDecl.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDecl.java
index 5067f9f..4da9c57 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDecl.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDecl.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -41,7 +41,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDropStatement.java
index 64ba087..8346912 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DataverseDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DeleteStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DeleteStatement.java
index d779b4f..3bd309a 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DeleteStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DeleteStatement.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.expression.VariableExpr;
@@ -84,7 +84,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DisconnectFeedStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DisconnectFeedStatement.java
index af4d1fb..4352b18 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DisconnectFeedStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DisconnectFeedStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -66,7 +66,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DropDatasetStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DropDatasetStatement.java
index 7dc1ad8..27eda01 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DropDatasetStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/DropDatasetStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedDropStatement.java
index 0391a4b..a06ed80 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedPolicyDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedPolicyDropStatement.java
index d08dc31..b511b06 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedPolicyDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FeedPolicyDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDecl.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDecl.java
index 08c90c5..78567b5 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDecl.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDecl.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Statement;
@@ -78,7 +78,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDropStatement.java
index 00ae48c6..41cec29 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/FunctionDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/IndexDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/IndexDropStatement.java
index 1b8d0d5..d20e2eb 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/IndexDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/IndexDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -60,7 +60,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/InsertStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/InsertStatement.java
index 6ddf071..cc72e1c 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/InsertStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/InsertStatement.java
@@ -21,10 +21,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.base.IReturningStatement;
+import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -114,7 +114,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/LoadStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/LoadStatement.java
index 145514f..82527b1 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/LoadStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/LoadStatement.java
@@ -20,7 +20,7 @@
 
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -80,7 +80,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodeGroupDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodeGroupDropStatement.java
index e27b447..7fa5056 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodeGroupDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodeGroupDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodegroupDecl.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodegroupDecl.java
index 092e804..c5e1d9c 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodegroupDecl.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/NodegroupDecl.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -59,7 +59,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/Query.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/Query.java
index f878998..2aee087 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/Query.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/Query.java
@@ -22,7 +22,7 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.base.Statement;
@@ -95,7 +95,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RefreshExternalDatasetStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RefreshExternalDatasetStatement.java
index ab35b27..a6eb257 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RefreshExternalDatasetStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RefreshExternalDatasetStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -45,7 +45,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RunStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RunStatement.java
index 006799d..cee6e77 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RunStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/RunStatement.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -69,7 +69,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/SetStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/SetStatement.java
index dfa8406..52b839c 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/SetStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/SetStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDecl.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDecl.java
index a9eb795..3aecfb3 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDecl.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDecl.java
@@ -19,7 +19,7 @@
 package org.apache.asterix.lang.common.statement;
 
 import org.apache.asterix.common.annotations.TypeDataGen;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.expression.TypeExpression;
 import org.apache.asterix.lang.common.struct.Identifier;
@@ -68,7 +68,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDropStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDropStatement.java
index 99b9bb1..9a5557d 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDropStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/TypeDropStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/UpdateStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/UpdateStatement.java
index 09ed242..2f3be71 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/UpdateStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/UpdateStatement.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.clause.UpdateClause;
@@ -64,7 +64,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/WriteStatement.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/WriteStatement.java
index 311e650..ae67ad0 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/WriteStatement.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/WriteStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.statement;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.struct.Identifier;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return visitor.visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java
index 0a85bed..33e0c52 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java
@@ -22,7 +22,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.om.functions.BuiltinFunctions;
 
@@ -87,7 +87,8 @@
      * @return the corresponding system internal function signature if it exists, otherwise
      *         the input function synature.
      */
-    public static FunctionSignature normalizeBuiltinFunctionSignature(FunctionSignature fs) throws AsterixException {
+    public static FunctionSignature normalizeBuiltinFunctionSignature(FunctionSignature fs)
+            throws CompilationException {
         String name = fs.getName();
         String lowerCaseName = name.toLowerCase();
         String mappedName = FUNCTION_NAME_MAP.get(lowerCaseName);
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
index fe43e21..351ac70 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
@@ -23,7 +23,7 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
@@ -50,17 +50,17 @@
 
     @FunctionalInterface
     public interface IFunctionCollector {
-        Set<FunctionSignature> getFunctionCalls(Expression expression) throws AsterixException;
+        Set<FunctionSignature> getFunctionCalls(Expression expression) throws CompilationException;
     }
 
     @FunctionalInterface
     public interface IFunctionParser {
-        FunctionDecl getFunctionDecl(Function function) throws AsterixException;
+        FunctionDecl getFunctionDecl(Function function) throws CompilationException;
     }
 
     @FunctionalInterface
     public interface IFunctionNormalizer {
-        FunctionSignature normalizeBuiltinFunctionSignature(FunctionSignature fs) throws AsterixException;
+        FunctionSignature normalizeBuiltinFunctionSignature(FunctionSignature fs) throws CompilationException;
     }
 
     /**
@@ -78,12 +78,12 @@
      *            for parsing stored functions in the string represetnation.
      * @param functionNormalizer,
      *            for normalizing function names.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     public static List<FunctionDecl> retrieveUsedStoredFunctions(MetadataProvider metadataProvider,
             Expression expression, List<FunctionSignature> declaredFunctions, List<FunctionDecl> inputFunctionDecls,
             IFunctionCollector functionCollector, IFunctionParser functionParser,
-            IFunctionNormalizer functionNormalizer) throws AsterixException {
+            IFunctionNormalizer functionNormalizer) throws CompilationException {
         List<FunctionDecl> functionDecls = inputFunctionDecls == null ? new ArrayList<>()
                 : new ArrayList<>(inputFunctionDecls);
         if (expression == null) {
@@ -103,7 +103,7 @@
             // Checks the existence of the referred dataverse.
             if (metadataProvider.findDataverse(namespace) == null
                     && !namespace.equals(FunctionConstants.ASTERIX_NS)) {
-                throw new AsterixException("In function call \"" + namespace + "." + signature.getName()
+                throw new CompilationException("In function call \"" + namespace + "." + signature.getName()
                         + "(...)\", the dataverse \"" + namespace + "\" cannot be found!");
             }
             Function function = lookupUserDefinedFunctionDecl(metadataProvider.getMetadataTxnContext(), signature);
@@ -120,14 +120,14 @@
                 } else {
                     messageBuilder.append("function " + signature + " is not defined");
                 }
-                throw new AsterixException(messageBuilder.toString());
+                throw new CompilationException(messageBuilder.toString());
             }
 
             if (function.getLanguage().equalsIgnoreCase(Function.LANGUAGE_AQL)) {
                 FunctionDecl functionDecl = functionParser.getFunctionDecl(function);
                 if (functionDecl != null) {
                     if (functionDecls.contains(functionDecl)) {
-                        throw new AsterixException(
+                        throw new CompilationException(
                                 "Recursive invocation " + functionDecls.get(functionDecls.size() - 1).getSignature()
                                         + " <==> " + functionDecl.getSignature());
                     }
@@ -141,7 +141,7 @@
     }
 
     private static Function lookupUserDefinedFunctionDecl(MetadataTransactionContext mdTxnCtx,
-            FunctionSignature signature) throws AsterixException {
+            FunctionSignature signature) throws CompilationException {
         if (signature.getNamespace() == null) {
             return null;
         }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VariableCloneAndSubstitutionUtil.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VariableCloneAndSubstitutionUtil.java
index 1948b84..e5cf386 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VariableCloneAndSubstitutionUtil.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VariableCloneAndSubstitutionUtil.java
@@ -22,7 +22,7 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
@@ -39,7 +39,7 @@
 
     public static List<GbyVariableExpressionPair> substInVarExprPair(LangRewritingContext context,
             List<GbyVariableExpressionPair> gbyVeList, VariableSubstitutionEnvironment newSubs,
-            CloneAndSubstituteVariablesVisitor visitor) throws AsterixException {
+            CloneAndSubstituteVariablesVisitor visitor) throws CompilationException {
         VariableSubstitutionEnvironment subs = newSubs;
         List<GbyVariableExpressionPair> veList = new LinkedList<>();
         for (GbyVariableExpressionPair vep : gbyVeList) {
@@ -64,7 +64,8 @@
     }
 
     public static List<Expression> visitAndCloneExprList(List<Expression> oldExprList,
-            VariableSubstitutionEnvironment arg, CloneAndSubstituteVariablesVisitor visitor) throws AsterixException {
+            VariableSubstitutionEnvironment arg, CloneAndSubstituteVariablesVisitor visitor)
+            throws CompilationException {
         List<Expression> exprs = new ArrayList<>(oldExprList.size());
         for (Expression e : oldExprList) {
             Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = e.accept(visitor, arg);
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
index 725d7f4..858a8c2 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
@@ -22,7 +22,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Expression.Kind;
@@ -84,17 +84,17 @@
      * @return a query expression which is upto a specific langauge, e.g., FLWOGR in AQL and expression query in SQL++.
      */
     protected abstract Expression generateQueryExpression(List<LetClause> letClauses, Expression returnExpr)
-            throws AsterixException;
+            throws CompilationException;
 
     @Override
-    public Boolean visit(Query q, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(Query q, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(q.getBody(), arg);
         q.setBody(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(FunctionDecl fd, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(FunctionDecl fd, List<FunctionDecl> arg) throws CompilationException {
         // Careful, we should only do this after analyzing the graph of function
         // calls.
         Pair<Boolean, Expression> p = inlineUdfsInExpr(fd.getFuncBody(), arg);
@@ -103,14 +103,14 @@
     }
 
     @Override
-    public Boolean visit(ListConstructor lc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(ListConstructor lc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, List<Expression>> p = inlineUdfsInExprList(lc.getExprList(), arg);
         lc.setExprList(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(RecordConstructor rc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(RecordConstructor rc, List<FunctionDecl> arg) throws CompilationException {
         boolean changed = false;
         for (FieldBinding b : rc.getFbList()) {
             Pair<Boolean, Expression> leftExprInlined = inlineUdfsInExpr(b.getLeftExpr(), arg);
@@ -124,35 +124,35 @@
     }
 
     @Override
-    public Boolean visit(CallExpr pf, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(CallExpr pf, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, List<Expression>> p = inlineUdfsInExprList(pf.getExprList(), arg);
         pf.setExprList(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(OperatorExpr ifbo, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(OperatorExpr ifbo, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, List<Expression>> p = inlineUdfsInExprList(ifbo.getExprList(), arg);
         ifbo.setExprList(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(FieldAccessor fa, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(FieldAccessor fa, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(fa.getExpr(), arg);
         fa.setExpr(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(IndexAccessor fa, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(IndexAccessor fa, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(fa.getExpr(), arg);
         fa.setExpr(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(IfExpr ifexpr, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(IfExpr ifexpr, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p1 = inlineUdfsInExpr(ifexpr.getCondExpr(), arg);
         ifexpr.setCondExpr(p1.second);
         Pair<Boolean, Expression> p2 = inlineUdfsInExpr(ifexpr.getThenExpr(), arg);
@@ -163,7 +163,7 @@
     }
 
     @Override
-    public Boolean visit(QuantifiedExpression qe, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(QuantifiedExpression qe, List<FunctionDecl> arg) throws CompilationException {
         boolean changed = false;
         for (QuantifiedPair t : qe.getQuantifiedList()) {
             Pair<Boolean, Expression> p = inlineUdfsInExpr(t.getExpr(), arg);
@@ -178,28 +178,28 @@
     }
 
     @Override
-    public Boolean visit(LetClause lc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(LetClause lc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(lc.getBindingExpr(), arg);
         lc.setBindingExpr(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(WhereClause wc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(WhereClause wc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(wc.getWhereExpr(), arg);
         wc.setWhereExpr(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(OrderbyClause oc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(OrderbyClause oc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, List<Expression>> p = inlineUdfsInExprList(oc.getOrderbyList(), arg);
         oc.setOrderbyList(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(GroupbyClause gc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(GroupbyClause gc, List<FunctionDecl> arg) throws CompilationException {
         boolean changed = false;
         for (GbyVariableExpressionPair p : gc.getGbyPairList()) {
             Pair<Boolean, Expression> be = inlineUdfsInExpr(p.getExpr(), arg);
@@ -219,7 +219,7 @@
     }
 
     @Override
-    public Boolean visit(LimitClause lc, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(LimitClause lc, List<FunctionDecl> arg) throws CompilationException {
         Pair<Boolean, Expression> p1 = inlineUdfsInExpr(lc.getLimitExpr(), arg);
         lc.setLimitExpr(p1.second);
         boolean changed = p1.first;
@@ -232,22 +232,22 @@
     }
 
     @Override
-    public Boolean visit(UnaryExpr u, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(UnaryExpr u, List<FunctionDecl> arg) throws CompilationException {
         return u.getExpr().accept(this, arg);
     }
 
     @Override
-    public Boolean visit(VariableExpr v, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(VariableExpr v, List<FunctionDecl> arg) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(LiteralExpr l, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(LiteralExpr l, List<FunctionDecl> arg) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(InsertStatement insert, List<FunctionDecl> arg) throws AsterixException {
+    public Boolean visit(InsertStatement insert, List<FunctionDecl> arg) throws CompilationException {
         boolean changed = false;
         Expression returnExpression = insert.getReturnExpression();
         if (returnExpression != null) {
@@ -261,7 +261,7 @@
     }
 
     protected Pair<Boolean, Expression> inlineUdfsInExpr(Expression expr, List<FunctionDecl> arg)
-            throws AsterixException {
+            throws CompilationException {
         if (expr.getKind() != Kind.CALL_EXPRESSION) {
             boolean r = expr.accept(this, arg);
             return new Pair<>(r, expr);
@@ -308,7 +308,7 @@
     }
 
     protected Pair<Boolean, List<Expression>> inlineUdfsInExprList(List<Expression> exprList, List<FunctionDecl> fds)
-            throws AsterixException {
+            throws CompilationException {
         ArrayList<Expression> newList = new ArrayList<>();
         boolean changed = false;
         for (Expression e : exprList) {
@@ -321,7 +321,7 @@
         return new Pair<>(changed, newList);
     }
 
-    protected Expression rewriteFunctionBody(Expression expr) throws AsterixException {
+    protected Expression rewriteFunctionBody(Expression expr) throws CompilationException {
         Query wrappedQuery = new Query(false);
         wrappedQuery.setBody(expr);
         wrappedQuery.setTopLevel(false);
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
index 3fdb141..9b419f1 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
@@ -24,7 +24,7 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Expression.Kind;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -68,7 +68,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(LetClause lc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = lc.getBindingExpr().accept(this, env);
         VariableExpr varExpr = lc.getVarExpr();
         VariableExpr newVe = generateNewVariable(context, varExpr);
@@ -78,7 +78,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(GroupbyClause gc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         VariableSubstitutionEnvironment newSubs = env;
         List<GbyVariableExpressionPair> newGbyList =
                 VariableCloneAndSubstitutionUtil.substInVarExprPair(context, gc.getGbyPairList(), newSubs, this);
@@ -112,7 +112,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(QuantifiedExpression qe,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<QuantifiedPair> oldPairs = qe.getQuantifiedList();
         List<QuantifiedPair> newPairs = new ArrayList<>(oldPairs.size());
         VariableSubstitutionEnvironment newSubs = env;
@@ -131,7 +131,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(WhereClause wc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = wc.getWhereExpr().accept(this, env);
         WhereClause newW = new WhereClause((Expression) p1.first);
         return new Pair<>(newW, p1.second);
@@ -139,7 +139,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(CallExpr pf,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> exprList = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(pf.getExprList(), env, this);
         CallExpr f = new CallExpr(pf.getFunctionSignature(), exprList);
         return new Pair<>(f, env);
@@ -147,16 +147,17 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(FunctionDecl fd,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<VarIdentifier> newList = new ArrayList<>(fd.getParamList().size());
         for (VarIdentifier vi : fd.getParamList()) {
             VariableExpr varExpr = new VariableExpr(vi);
             if (!env.constainsOldVar(varExpr)) {
-                throw new AsterixException("Parameter " + vi + " does not appear in the substitution list.");
+                throw new CompilationException("Parameter " + vi + " does not appear in the substitution list.");
             }
             Expression newExpr = env.findSubstitution(varExpr);
             if (newExpr.getKind() != Kind.VARIABLE_EXPRESSION) {
-                throw new AsterixException("Parameter " + vi + " cannot be substituted by a non-variable expression.");
+                throw new CompilationException(
+                        "Parameter " + vi + " cannot be substituted by a non-variable expression.");
             }
             newList.add(((VariableExpr) newExpr).getVar());
         }
@@ -168,7 +169,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(IfExpr ifexpr,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = ifexpr.getCondExpr().accept(this, env);
         Pair<ILangExpression, VariableSubstitutionEnvironment> p2 = ifexpr.getThenExpr().accept(this, env);
         Pair<ILangExpression, VariableSubstitutionEnvironment> p3 = ifexpr.getElseExpr().accept(this, env);
@@ -178,7 +179,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(LimitClause lc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = lc.getLimitExpr().accept(this, env);
         Pair<ILangExpression, VariableSubstitutionEnvironment> p2;
         Expression lcOffsetExpr = lc.getOffset();
@@ -193,7 +194,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(ListConstructor lc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> oldExprList = lc.getExprList();
         List<Expression> exprs = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(oldExprList, env, this);
         ListConstructor c = new ListConstructor(lc.getType(), exprs);
@@ -202,13 +203,13 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(LiteralExpr l,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         return new Pair<>(l, env);
     }
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(OperatorExpr op,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> oldExprList = op.getExprList();
         List<Expression> exprs = new ArrayList<>(oldExprList.size());
         for (Expression e : oldExprList) {
@@ -221,7 +222,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(OrderbyClause oc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> exprList =
                 VariableCloneAndSubstitutionUtil.visitAndCloneExprList(oc.getOrderbyList(), env, this);
         OrderbyClause oc2 = new OrderbyClause(exprList, oc.getModifierList());
@@ -233,7 +234,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(Query q, VariableSubstitutionEnvironment env)
-            throws AsterixException {
+            throws CompilationException {
         Query newQ = new Query(q.isExplain());
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = q.getBody().accept(this, env);
         newQ.setBody((Expression) p1.first);
@@ -242,7 +243,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(RecordConstructor rc,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<FieldBinding> oldFbs = rc.getFbList();
         ArrayList<FieldBinding> newFbs = new ArrayList<>(oldFbs.size());
         for (FieldBinding fb : oldFbs) {
@@ -257,7 +258,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(UnaryExpr u,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = u.getExpr().accept(this, env);
         UnaryExpr newU = new UnaryExpr(u.getExprType(), (Expression) p1.first);
         return new Pair<>(newU, env);
@@ -265,7 +266,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(IndexAccessor ia,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = ia.getExpr().accept(this, env);
         Expression indexExpr = null;
         if (!ia.isAny()) {
@@ -279,7 +280,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(FieldAccessor fa,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p = fa.getExpr().accept(this, env);
         FieldAccessor newF = new FieldAccessor((Expression) p.first, fa.getIdent());
         return new Pair<>(newF, p.second);
@@ -287,13 +288,13 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(VariableExpr v,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         return new Pair<>(rewriteVariableExpr(v, env), env);
     }
 
     // Replace a variable expression if the variable is to-be substituted.
     protected Expression rewriteVariableExpr(VariableExpr expr, VariableSubstitutionEnvironment env)
-            throws AsterixException {
+            throws CompilationException {
         if (env.constainsOldVar(expr)) {
             return env.findSubstitution(expr);
         } else {
@@ -329,10 +330,10 @@
      * @param env,
      *            the variable substitution environment.
      * @return a pair of an ILangExpression and a variable substitution environment.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     protected Pair<ILangExpression, VariableSubstitutionEnvironment> visitUnnesBindingExpression(Expression expr,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         return expr.accept(this, env);
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
index 7a96fac..eefed9d 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/FormatPrintVisitor.java
@@ -30,7 +30,7 @@
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Literal;
@@ -145,7 +145,7 @@
     }
 
     @Override
-    public Void visit(Query q, Integer step) throws AsterixException {
+    public Void visit(Query q, Integer step) throws CompilationException {
         if (q.getBody() != null) {
             q.getBody().accept(this, step);
         }
@@ -185,7 +185,7 @@
     }
 
     @Override
-    public Void visit(ListConstructor lc, Integer step) throws AsterixException {
+    public Void visit(ListConstructor lc, Integer step) throws CompilationException {
         boolean ordered = false;
         if (lc.getType().equals(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR)) {
             ordered = true;
@@ -197,7 +197,7 @@
     }
 
     @Override
-    public Void visit(RecordConstructor rc, Integer step) throws AsterixException {
+    public Void visit(RecordConstructor rc, Integer step) throws CompilationException {
         out.print("{");
         // print all field bindings
         int size = rc.getFbList().size();
@@ -215,7 +215,7 @@
     }
 
     @Override
-    public Void visit(CallExpr callExpr, Integer step) throws AsterixException {
+    public Void visit(CallExpr callExpr, Integer step) throws CompilationException {
         printHints(callExpr.getHints(), step);
         out.print(generateFullName(callExpr.getFunctionSignature().getNamespace(),
                 callExpr.getFunctionSignature().getName()) + "(");
@@ -225,7 +225,7 @@
     }
 
     @Override
-    public Void visit(OperatorExpr operatorExpr, Integer step) throws AsterixException {
+    public Void visit(OperatorExpr operatorExpr, Integer step) throws CompilationException {
         List<Expression> exprList = operatorExpr.getExprList();
         List<OperatorType> opList = operatorExpr.getOpList();
         if (operatorExpr.isCurrentop()) {
@@ -247,7 +247,7 @@
     }
 
     @Override
-    public Void visit(IfExpr ifexpr, Integer step) throws AsterixException {
+    public Void visit(IfExpr ifexpr, Integer step) throws CompilationException {
         out.print("if (");
         ifexpr.getCondExpr().accept(this, step + 2);
         out.println(")");
@@ -260,7 +260,7 @@
     }
 
     @Override
-    public Void visit(QuantifiedExpression qe, Integer step) throws AsterixException {
+    public Void visit(QuantifiedExpression qe, Integer step) throws CompilationException {
         out.print(qe.getQuantifier().toString().toLowerCase() + " ");
         // quantifiedList accept visitor
         int index = 0;
@@ -279,7 +279,7 @@
     }
 
     @Override
-    public Void visit(LetClause lc, Integer step) throws AsterixException {
+    public Void visit(LetClause lc, Integer step) throws CompilationException {
         out.print(skip(step) + "let ");
         lc.getVarExpr().accept(this, 0);
         out.print(assignSymbol);
@@ -289,7 +289,7 @@
     }
 
     @Override
-    public Void visit(WhereClause wc, Integer step) throws AsterixException {
+    public Void visit(WhereClause wc, Integer step) throws CompilationException {
         out.print(skip(step) + "where ");
         wc.getWhereExpr().accept(this, step + 1);
         out.println();
@@ -297,7 +297,7 @@
     }
 
     @Override
-    public Void visit(OrderbyClause oc, Integer step) throws AsterixException {
+    public Void visit(OrderbyClause oc, Integer step) throws CompilationException {
         out.print(skip(step) + "order by ");
         List<OrderModifier> mlist = oc.getModifierList();
         List<Expression> list = oc.getOrderbyList();
@@ -318,7 +318,7 @@
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Integer step) throws AsterixException {
+    public Void visit(GroupbyClause gc, Integer step) throws CompilationException {
         if (gc.hasHashGroupByHint()) {
             out.println(skip(step) + "/* +hash */");
         }
@@ -351,7 +351,7 @@
     }
 
     @Override
-    public Void visit(LimitClause lc, Integer step) throws AsterixException {
+    public Void visit(LimitClause lc, Integer step) throws CompilationException {
         out.print(skip(step) + "limit ");
         lc.getLimitExpr().accept(this, step + 1);
         if (lc.getOffset() != null) {
@@ -363,7 +363,7 @@
     }
 
     @Override
-    public Void visit(FunctionDecl fd, Integer step) throws AsterixException {
+    public Void visit(FunctionDecl fd, Integer step) throws CompilationException {
         out.print(skip(step) + "declare function " + generateFullName(null, fd.getSignature().getName()) + "(");
         List<Identifier> parameters = new ArrayList<Identifier>();
         parameters.addAll(fd.getParamList());
@@ -377,21 +377,21 @@
     }
 
     @Override
-    public Void visit(UnaryExpr u, Integer step) throws AsterixException {
+    public Void visit(UnaryExpr u, Integer step) throws CompilationException {
         out.print(u.getExprType() == UnaryExprType.NEGATIVE ? "-" : "");
         u.getExpr().accept(this, 0);
         return null;
     }
 
     @Override
-    public Void visit(FieldAccessor fa, Integer step) throws AsterixException {
+    public Void visit(FieldAccessor fa, Integer step) throws CompilationException {
         fa.getExpr().accept(this, step + 1);
         out.print("." + normalize(fa.getIdent().getValue()));
         return null;
     }
 
     @Override
-    public Void visit(IndexAccessor fa, Integer step) throws AsterixException {
+    public Void visit(IndexAccessor fa, Integer step) throws CompilationException {
         fa.getExpr().accept(this, step + 1);
         out.print("[");
         if (fa.isAny()) {
@@ -404,7 +404,7 @@
     }
 
     @Override
-    public Void visit(TypeDecl t, Integer step) throws AsterixException {
+    public Void visit(TypeDecl t, Integer step) throws CompilationException {
         out.println(skip(step) + "create type " + generateFullName(t.getDataverseName(), t.getIdent())
                 + generateIfNotExists(t.getIfNotExists()) + " as");
         t.getTypeDef().accept(this, step + 1);
@@ -413,7 +413,7 @@
     }
 
     @Override
-    public Void visit(TypeReferenceExpression t, Integer arg) throws AsterixException {
+    public Void visit(TypeReferenceExpression t, Integer arg) throws CompilationException {
         if (t.getIdent().first != null && t.getIdent().first.getValue() != null) {
             out.print(normalize(t.getIdent().first.getValue()));
             out.print('.');
@@ -423,7 +423,7 @@
     }
 
     @Override
-    public Void visit(RecordTypeDefinition r, Integer step) throws AsterixException {
+    public Void visit(RecordTypeDefinition r, Integer step) throws CompilationException {
         if (r.getRecordKind() == RecordKind.CLOSED) {
             out.print(" closed ");
         }
@@ -454,7 +454,7 @@
     }
 
     @Override
-    public Void visit(OrderedListTypeDefinition x, Integer step) throws AsterixException {
+    public Void visit(OrderedListTypeDefinition x, Integer step) throws CompilationException {
         out.print("[");
         x.getItemTypeExpression().accept(this, step + 2);
         out.print("]");
@@ -462,7 +462,7 @@
     }
 
     @Override
-    public Void visit(UnorderedListTypeDefinition x, Integer step) throws AsterixException {
+    public Void visit(UnorderedListTypeDefinition x, Integer step) throws CompilationException {
         out.print("{{");
         x.getItemTypeExpression().accept(this, step + 2);
         out.print("}}");
@@ -470,7 +470,7 @@
     }
 
     @Override
-    public Void visit(DatasetDecl dd, Integer step) throws AsterixException {
+    public Void visit(DatasetDecl dd, Integer step) throws CompilationException {
         if (dd.getDatasetType() == DatasetType.INTERNAL) {
             String temp = dd.getDatasetDetailsDecl().isTemp() ? "temporary" : "";
             out.print(skip(step) + "create " + temp + datasetSymbol + generateFullName(dd.getDataverse(), dd.getName())
@@ -518,13 +518,13 @@
     }
 
     @Override
-    public Void visit(DataverseDecl dv, Integer step) throws AsterixException {
+    public Void visit(DataverseDecl dv, Integer step) throws CompilationException {
         out.println(skip(step) + "use " + dataverseSymbol + normalize(dv.getDataverseName().getValue()) + ";\n\n");
         return null;
     }
 
     @Override
-    public Void visit(WriteStatement ws, Integer step) throws AsterixException {
+    public Void visit(WriteStatement ws, Integer step) throws CompilationException {
         out.print(skip(step) + "write output to " + ws.getNcName() + ":" + revertStringToQuoted(ws.getFileName()));
         if (ws.getWriterClassName() != null) {
             out.print(" using " + ws.getWriterClassName());
@@ -534,21 +534,21 @@
     }
 
     @Override
-    public Void visit(SetStatement ss, Integer step) throws AsterixException {
+    public Void visit(SetStatement ss, Integer step) throws CompilationException {
         out.println(skip(step) + "set " + revertStringToQuoted(ss.getPropName()) + " "
                 + revertStringToQuoted(ss.getPropValue()) + ";\n");
         return null;
     }
 
     @Override
-    public Void visit(DisconnectFeedStatement ss, Integer step) throws AsterixException {
+    public Void visit(DisconnectFeedStatement ss, Integer step) throws CompilationException {
         out.println(skip(step) + "disconnect " + FEED + generateFullName(ss.getDataverseName(), ss.getFeedName())
                 + " from " + datasetSymbol + generateFullName(ss.getDataverseName(), ss.getDatasetName()) + ";");
         return null;
     }
 
     @Override
-    public Void visit(NodegroupDecl ngd, Integer step) throws AsterixException {
+    public Void visit(NodegroupDecl ngd, Integer step) throws CompilationException {
         out.println(
                 CREATE + " nodegroup " + ngd.getNodegroupName() + generateIfNotExists(ngd.getIfNotExists()) + " on ");
         out.print(skip(step + 2));
@@ -559,7 +559,7 @@
     }
 
     @Override
-    public Void visit(LoadStatement stmtLoad, Integer step) throws AsterixException {
+    public Void visit(LoadStatement stmtLoad, Integer step) throws CompilationException {
         out.print(skip(step) + "load " + datasetSymbol
                 + generateFullName(stmtLoad.getDataverseName(), stmtLoad.getDatasetName()) + " using "
                 + revertStringToQuoted(stmtLoad.getAdapter()) + " ");
@@ -570,7 +570,7 @@
     }
 
     @Override
-    public Void visit(DropDatasetStatement del, Integer step) throws AsterixException {
+    public Void visit(DropDatasetStatement del, Integer step) throws CompilationException {
         out.println(
                 skip(step) + "drop " + datasetSymbol + generateFullName(del.getDataverseName(), del.getDatasetName())
                         + generateIfExists(del.getIfExists()) + SEMICOLON);
@@ -578,7 +578,7 @@
     }
 
     @Override
-    public Void visit(InsertStatement insert, Integer step) throws AsterixException {
+    public Void visit(InsertStatement insert, Integer step) throws CompilationException {
         out.print(skip(step) + "insert into " + datasetSymbol
                 + generateFullName(insert.getDataverseName(), insert.getDatasetName()));
         out.print("(");
@@ -589,7 +589,7 @@
     }
 
     @Override
-    public Void visit(DeleteStatement del, Integer step) throws AsterixException {
+    public Void visit(DeleteStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "delete ");
         del.getVariableExpr().accept(this, step + 2);
         out.println(
@@ -603,7 +603,7 @@
     }
 
     @Override
-    public Void visit(UpdateStatement update, Integer step) throws AsterixException {
+    public Void visit(UpdateStatement update, Integer step) throws CompilationException {
         out.println(skip(step) + "update ");
         update.getVariableExpr().accept(this, step + 2);
         out.print(" in ");
@@ -623,7 +623,7 @@
     }
 
     @Override
-    public Void visit(UpdateClause del, Integer step) throws AsterixException {
+    public Void visit(UpdateClause del, Integer step) throws CompilationException {
         if (del.hasSet()) {
             out.println(skip(step) + "set ");
             del.getTarget().accept(this, step + 2);
@@ -654,7 +654,7 @@
     }
 
     @Override
-    public Void visit(CreateIndexStatement cis, Integer step) throws AsterixException {
+    public Void visit(CreateIndexStatement cis, Integer step) throws CompilationException {
         out.print(skip(step) + CREATE + " index ");
         out.print(normalize(cis.getIndexName().getValue()) + " ");
         out.print(generateIfNotExists(cis.getIfNotExists()));
@@ -691,7 +691,7 @@
     }
 
     @Override
-    public Void visit(CreateDataverseStatement del, Integer step) throws AsterixException {
+    public Void visit(CreateDataverseStatement del, Integer step) throws CompilationException {
         out.print(CREATE + dataverseSymbol);
         out.print(normalize(del.getDataverseName().getValue()));
         out.print(generateIfNotExists(del.getIfNotExists()));
@@ -706,7 +706,7 @@
     }
 
     @Override
-    public Void visit(IndexDropStatement del, Integer step) throws AsterixException {
+    public Void visit(IndexDropStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "drop index ");
         out.print(generateFullName(del.getDataverseName(), del.getDatasetName()));
         out.print("." + del.getIndexName());
@@ -715,7 +715,7 @@
     }
 
     @Override
-    public Void visit(NodeGroupDropStatement del, Integer step) throws AsterixException {
+    public Void visit(NodeGroupDropStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "drop nodegroup ");
         out.print(del.getNodeGroupName());
         out.println(generateIfExists(del.getIfExists()) + SEMICOLON);
@@ -723,7 +723,7 @@
     }
 
     @Override
-    public Void visit(DataverseDropStatement del, Integer step) throws AsterixException {
+    public Void visit(DataverseDropStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "drop " + dataverseSymbol);
         out.print(normalize(del.getDataverseName().getValue()));
         out.println(generateIfExists(del.getIfExists()) + SEMICOLON);
@@ -731,7 +731,7 @@
     }
 
     @Override
-    public Void visit(TypeDropStatement del, Integer step) throws AsterixException {
+    public Void visit(TypeDropStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "drop type ");
         out.print(generateFullName(del.getDataverseName(), del.getTypeName()));
         out.println(generateIfExists(del.getIfExists()) + SEMICOLON);
@@ -739,7 +739,7 @@
     }
 
     @Override
-    public Void visit(ConnectFeedStatement connectFeedStmt, Integer step) throws AsterixException {
+    public Void visit(ConnectFeedStatement connectFeedStmt, Integer step) throws CompilationException {
         out.print(skip(step) + "connect " + FEED);
         out.print(generateFullName(connectFeedStmt.getDataverseName(), new Identifier(connectFeedStmt.getFeedName())));
         out.print(" to " + datasetSymbol
@@ -752,7 +752,7 @@
     }
 
     @Override
-    public Void visit(CreatePrimaryFeedStatement cpfs, Integer step) throws AsterixException {
+    public Void visit(CreatePrimaryFeedStatement cpfs, Integer step) throws CompilationException {
         out.print(skip(step) + CREATE + " primary feed ");
         out.print(generateFullName(cpfs.getDataverseName(), cpfs.getFeedName()));
         out.print(generateIfNotExists(cpfs.getIfNotExists()));
@@ -767,7 +767,7 @@
     }
 
     @Override
-    public Void visit(CreateSecondaryFeedStatement csfs, Integer step) throws AsterixException {
+    public Void visit(CreateSecondaryFeedStatement csfs, Integer step) throws CompilationException {
         out.print(skip(step) + CREATE + " secondary feed ");
         out.print(generateFullName(csfs.getDataverseName(), csfs.getFeedName()));
         out.print(generateIfNotExists(csfs.getIfNotExists()));
@@ -781,7 +781,7 @@
     }
 
     @Override
-    public Void visit(FeedDropStatement del, Integer step) throws AsterixException {
+    public Void visit(FeedDropStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "drop " + FEED);
         out.print(generateFullName(del.getDataverseName(), del.getFeedName()));
         out.println(generateIfExists(del.getIfExists()) + SEMICOLON);
@@ -789,12 +789,12 @@
     }
 
     @Override
-    public Void visit(FeedPolicyDropStatement dfs, Integer step) throws AsterixException {
+    public Void visit(FeedPolicyDropStatement dfs, Integer step) throws CompilationException {
         return null;
     }
 
     @Override
-    public Void visit(CreateFeedPolicyStatement cfps, Integer step) throws AsterixException {
+    public Void visit(CreateFeedPolicyStatement cfps, Integer step) throws CompilationException {
         out.print(skip(step) + CREATE + "ingestion policy ");
         out.print(cfps.getPolicyName());
         out.print(generateIfNotExists(cfps.getIfNotExists()));
@@ -820,7 +820,7 @@
     }
 
     @Override
-    public Void visit(CreateFunctionStatement cfs, Integer step) throws AsterixException {
+    public Void visit(CreateFunctionStatement cfs, Integer step) throws CompilationException {
         out.print(skip(step) + CREATE + " function ");
         out.print(generateIfNotExists(cfs.getIfNotExists()));
         out.print(this.generateFullName(cfs.getSignature().getNamespace(), cfs.getSignature().getName()));
@@ -834,7 +834,7 @@
     }
 
     @Override
-    public Void visit(FunctionDropStatement del, Integer step) throws AsterixException {
+    public Void visit(FunctionDropStatement del, Integer step) throws CompilationException {
         out.print(skip(step) + "drop function ");
         FunctionSignature funcSignature = del.getFunctionSignature();
         out.print(funcSignature.toString());
@@ -843,7 +843,7 @@
     }
 
     @Override
-    public Void visit(CompactStatement del, Integer step) throws AsterixException {
+    public Void visit(CompactStatement del, Integer step) throws CompilationException {
         return null;
     }
 
@@ -883,7 +883,7 @@
     }
 
     protected void printDelimitedGbyExpressions(List<GbyVariableExpressionPair> gbyList, int step)
-            throws AsterixException {
+            throws CompilationException {
         int gbySize = gbyList.size();
         int gbyIndex = 0;
         for (GbyVariableExpressionPair pair : gbyList) {
@@ -899,7 +899,7 @@
     }
 
     protected void printDelimitedExpressions(List<? extends Expression> exprs, String delimiter, int step)
-            throws AsterixException {
+            throws CompilationException {
         int index = 0;
         int size = exprs.size();
         for (Expression expr : exprs) {
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/GatherFunctionCallsVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/GatherFunctionCallsVisitor.java
index 12c95bb..8842d86 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/GatherFunctionCallsVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/GatherFunctionCallsVisitor.java
@@ -22,7 +22,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -56,7 +56,7 @@
     protected final Set<FunctionSignature> calls = new HashSet<FunctionSignature>();
 
     @Override
-    public Void visit(CallExpr pf, Void arg) throws AsterixException {
+    public Void visit(CallExpr pf, Void arg) throws CompilationException {
         calls.add(pf.getFunctionSignature());
         for (Expression e : pf.getExprList()) {
             e.accept(this, arg);
@@ -65,13 +65,13 @@
     }
 
     @Override
-    public Void visit(FieldAccessor fa, Void arg) throws AsterixException {
+    public Void visit(FieldAccessor fa, Void arg) throws CompilationException {
         fa.getExpr().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Void arg) throws AsterixException {
+    public Void visit(GroupbyClause gc, Void arg) throws CompilationException {
         for (GbyVariableExpressionPair p : gc.getGbyPairList()) {
             p.getExpr().accept(this, arg);
         }
@@ -82,7 +82,7 @@
     }
 
     @Override
-    public Void visit(IfExpr ifexpr, Void arg) throws AsterixException {
+    public Void visit(IfExpr ifexpr, Void arg) throws CompilationException {
         ifexpr.getCondExpr().accept(this, arg);
         ifexpr.getThenExpr().accept(this, arg);
         ifexpr.getElseExpr().accept(this, arg);
@@ -90,19 +90,19 @@
     }
 
     @Override
-    public Void visit(IndexAccessor ia, Void arg) throws AsterixException {
+    public Void visit(IndexAccessor ia, Void arg) throws CompilationException {
         ia.getExpr().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(LetClause lc, Void arg) throws AsterixException {
+    public Void visit(LetClause lc, Void arg) throws CompilationException {
         lc.getBindingExpr().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(LimitClause lc, Void arg) throws AsterixException {
+    public Void visit(LimitClause lc, Void arg) throws CompilationException {
         lc.getLimitExpr().accept(this, arg);
         if (lc.getOffset() != null) {
             lc.getOffset().accept(this, arg);
@@ -111,7 +111,7 @@
     }
 
     @Override
-    public Void visit(ListConstructor lc, Void arg) throws AsterixException {
+    public Void visit(ListConstructor lc, Void arg) throws CompilationException {
         for (Expression e : lc.getExprList()) {
             e.accept(this, arg);
         }
@@ -119,13 +119,13 @@
     }
 
     @Override
-    public Void visit(LiteralExpr l, Void arg) throws AsterixException {
+    public Void visit(LiteralExpr l, Void arg) throws CompilationException {
         // do nothing
         return null;
     }
 
     @Override
-    public Void visit(OperatorExpr op, Void arg) throws AsterixException {
+    public Void visit(OperatorExpr op, Void arg) throws CompilationException {
         for (Expression e : op.getExprList()) {
             e.accept(this, arg);
         }
@@ -133,7 +133,7 @@
     }
 
     @Override
-    public Void visit(OrderbyClause oc, Void arg) throws AsterixException {
+    public Void visit(OrderbyClause oc, Void arg) throws CompilationException {
         for (Expression e : oc.getOrderbyList()) {
             e.accept(this, arg);
         }
@@ -141,12 +141,12 @@
     }
 
     @Override
-    public Void visit(OrderedListTypeDefinition olte, Void arg) throws AsterixException {
+    public Void visit(OrderedListTypeDefinition olte, Void arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public Void visit(QuantifiedExpression qe, Void arg) throws AsterixException {
+    public Void visit(QuantifiedExpression qe, Void arg) throws CompilationException {
         for (QuantifiedPair qp : qe.getQuantifiedList()) {
             qp.getExpr().accept(this, arg);
         }
@@ -155,13 +155,13 @@
     }
 
     @Override
-    public Void visit(Query q, Void arg) throws AsterixException {
+    public Void visit(Query q, Void arg) throws CompilationException {
         q.getBody().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(RecordConstructor rc, Void arg) throws AsterixException {
+    public Void visit(RecordConstructor rc, Void arg) throws CompilationException {
         for (FieldBinding fb : rc.getFbList()) {
             fb.getLeftExpr().accept(this, arg);
             fb.getRightExpr().accept(this, arg);
@@ -170,30 +170,30 @@
     }
 
     @Override
-    public Void visit(TypeReferenceExpression tre, Void arg) throws AsterixException {
+    public Void visit(TypeReferenceExpression tre, Void arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public Void visit(UnaryExpr u, Void arg) throws AsterixException {
+    public Void visit(UnaryExpr u, Void arg) throws CompilationException {
         u.getExpr().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(VariableExpr v, Void arg) throws AsterixException {
+    public Void visit(VariableExpr v, Void arg) throws CompilationException {
         // do nothing
         return null;
     }
 
     @Override
-    public Void visit(WhereClause wc, Void arg) throws AsterixException {
+    public Void visit(WhereClause wc, Void arg) throws CompilationException {
         wc.getWhereExpr().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(InsertStatement wc, Void arg) throws AsterixException {
+    public Void visit(InsertStatement wc, Void arg) throws CompilationException {
         wc.getQuery().accept(this, arg);
         Expression returnExpression = wc.getReturnExpression();
         if (returnExpression != null) {
@@ -207,7 +207,7 @@
     }
 
     @Override
-    public Void visit(FunctionDecl fd, Void arg) throws AsterixException {
+    public Void visit(FunctionDecl fd, Void arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java
index e7cf43b..5e01321 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/QueryPrintVisitor.java
@@ -24,7 +24,7 @@
 import java.util.Map.Entry;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Literal;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -85,7 +85,7 @@
     }
 
     @Override
-    public Void visit(Query q, Integer step) throws AsterixException {
+    public Void visit(Query q, Integer step) throws CompilationException {
         if (q.getBody() != null) {
             out.println("Query:");
             q.getBody().accept(this, step);
@@ -115,7 +115,7 @@
     }
 
     @Override
-    public Void visit(ListConstructor lc, Integer step) throws AsterixException {
+    public Void visit(ListConstructor lc, Integer step) throws CompilationException {
         boolean ordered = false;
         if (lc.getType().equals(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR)) {
             ordered = true;
@@ -130,7 +130,7 @@
     }
 
     @Override
-    public Void visit(RecordConstructor rc, Integer step) throws AsterixException {
+    public Void visit(RecordConstructor rc, Integer step) throws CompilationException {
         out.println(skip(step) + "RecordConstructor [");
         // fbList accept visitor
         for (FieldBinding fb : rc.getFbList()) {
@@ -145,7 +145,7 @@
     }
 
     @Override
-    public Void visit(CallExpr pf, Integer step) throws AsterixException {
+    public Void visit(CallExpr pf, Integer step) throws CompilationException {
         out.println(skip(step) + "FunctionCall " + pf.getFunctionSignature().toString() + "[");
         for (Expression expr : pf.getExprList()) {
             expr.accept(this, step + 1);
@@ -155,7 +155,7 @@
     }
 
     @Override
-    public Void visit(OperatorExpr ifbo, Integer step) throws AsterixException {
+    public Void visit(OperatorExpr ifbo, Integer step) throws CompilationException {
         List<Expression> exprList = ifbo.getExprList();
         List<OperatorType> opList = ifbo.getOpList();
         if (ifbo.isCurrentop()) {
@@ -173,7 +173,7 @@
     }
 
     @Override
-    public Void visit(IfExpr ifexpr, Integer step) throws AsterixException {
+    public Void visit(IfExpr ifexpr, Integer step) throws CompilationException {
         out.println(skip(step) + "IfExpr [");
         out.println(skip(step + 1) + "Condition:");
         ifexpr.getCondExpr().accept(this, step + 2);
@@ -186,7 +186,7 @@
     }
 
     @Override
-    public Void visit(QuantifiedExpression qe, Integer step) throws AsterixException {
+    public Void visit(QuantifiedExpression qe, Integer step) throws CompilationException {
         out.println(skip(step) + "QuantifiedExpression " + qe.getQuantifier() + " [");
         // quantifiedList accept visitor
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
@@ -204,7 +204,7 @@
     }
 
     @Override
-    public Void visit(LetClause lc, Integer step) throws AsterixException {
+    public Void visit(LetClause lc, Integer step) throws CompilationException {
         out.print(skip(step) + "Let ");
         lc.getVarExpr().accept(this, 0);
         out.println(skip(step + 1) + ":=");
@@ -213,14 +213,14 @@
     }
 
     @Override
-    public Void visit(WhereClause wc, Integer step) throws AsterixException {
+    public Void visit(WhereClause wc, Integer step) throws CompilationException {
         out.println(skip(step) + "Where");
         wc.getWhereExpr().accept(this, step + 1);
         return null;
     }
 
     @Override
-    public Void visit(OrderbyClause oc, Integer step) throws AsterixException {
+    public Void visit(OrderbyClause oc, Integer step) throws CompilationException {
         out.println(skip(step) + "Orderby");
         List<OrderModifier> mlist = oc.getModifierList();
         List<Expression> list = oc.getOrderbyList();
@@ -233,7 +233,7 @@
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Integer step) throws AsterixException {
+    public Void visit(GroupbyClause gc, Integer step) throws CompilationException {
         out.println(skip(step) + "Groupby");
         for (GbyVariableExpressionPair pair : gc.getGbyPairList()) {
             if (pair.getVar() != null) {
@@ -269,7 +269,7 @@
     }
 
     @Override
-    public Void visit(LimitClause lc, Integer step) throws AsterixException {
+    public Void visit(LimitClause lc, Integer step) throws CompilationException {
         out.println(skip(step) + "Limit");
         lc.getLimitExpr().accept(this, step + 1);
         if (lc.getOffset() != null) {
@@ -280,7 +280,7 @@
     }
 
     @Override
-    public Void visit(FunctionDecl fd, Integer step) throws AsterixException {
+    public Void visit(FunctionDecl fd, Integer step) throws CompilationException {
         out.println(skip(step) + "FunctionDecl " + fd.getSignature().getName() + "(" + fd.getParamList().toString()
                 + ") {");
         fd.getFuncBody().accept(this, step + 1);
@@ -290,7 +290,7 @@
     }
 
     @Override
-    public Void visit(UnaryExpr u, Integer step) throws AsterixException {
+    public Void visit(UnaryExpr u, Integer step) throws CompilationException {
         if (u.getExprType() != null) {
             out.print(skip(step) + u.getExprType() + " ");
             u.getExpr().accept(this, 0);
@@ -301,7 +301,7 @@
     }
 
     @Override
-    public Void visit(FieldAccessor fa, Integer step) throws AsterixException {
+    public Void visit(FieldAccessor fa, Integer step) throws CompilationException {
         out.println(skip(step) + "FieldAccessor [");
         fa.getExpr().accept(this, step + 1);
         out.println(skip(step + 1) + "Field=" + fa.getIdent().getValue());
@@ -310,7 +310,7 @@
     }
 
     @Override
-    public Void visit(IndexAccessor fa, Integer step) throws AsterixException {
+    public Void visit(IndexAccessor fa, Integer step) throws CompilationException {
         out.println(skip(step) + "IndexAccessor [");
         fa.getExpr().accept(this, step + 1);
         out.print(skip(step + 1) + "Index: ");
@@ -324,7 +324,7 @@
     }
 
     @Override
-    public Void visit(TypeDecl t, Integer step) throws AsterixException {
+    public Void visit(TypeDecl t, Integer step) throws CompilationException {
         out.println(skip(step) + "TypeDecl " + t.getIdent() + " [");
         t.getTypeDef().accept(this, step + 1);
         out.println(skip(step) + "]");
@@ -332,7 +332,7 @@
     }
 
     @Override
-    public Void visit(TypeReferenceExpression t, Integer arg) throws AsterixException {
+    public Void visit(TypeReferenceExpression t, Integer arg) throws CompilationException {
         if (t.getIdent().first != null && t.getIdent().first.getValue() != null) {
             out.print(t.getIdent().first.getValue());
             out.print('.');
@@ -342,7 +342,7 @@
     }
 
     @Override
-    public Void visit(RecordTypeDefinition r, Integer step) throws AsterixException {
+    public Void visit(RecordTypeDefinition r, Integer step) throws CompilationException {
         if (r.getRecordKind() == RecordKind.CLOSED) {
             out.print(skip(step) + "closed ");
         } else {
@@ -374,7 +374,7 @@
     }
 
     @Override
-    public Void visit(OrderedListTypeDefinition x, Integer step) throws AsterixException {
+    public Void visit(OrderedListTypeDefinition x, Integer step) throws CompilationException {
         out.print("OrderedList [");
         x.getItemTypeExpression().accept(this, step + 2);
         out.println("]");
@@ -382,7 +382,7 @@
     }
 
     @Override
-    public Void visit(UnorderedListTypeDefinition x, Integer step) throws AsterixException {
+    public Void visit(UnorderedListTypeDefinition x, Integer step) throws CompilationException {
         out.print("UnorderedList <");
         x.getItemTypeExpression().accept(this, step + 2);
         out.println(">");
@@ -390,7 +390,7 @@
     }
 
     @Override
-    public Void visit(DatasetDecl dd, Integer step) throws AsterixException {
+    public Void visit(DatasetDecl dd, Integer step) throws CompilationException {
         if (dd.getDatasetType() == DatasetType.INTERNAL) {
             String line = skip(step) + "DatasetDecl " + dd.getName() + "(" + dd.getItemTypeName() + ")"
                     + " partitioned by " + ((InternalDetailsDecl) dd.getDatasetDetailsDecl()).getPartitioningExprs();
@@ -406,13 +406,13 @@
     }
 
     @Override
-    public Void visit(DataverseDecl dv, Integer step) throws AsterixException {
+    public Void visit(DataverseDecl dv, Integer step) throws CompilationException {
         out.println(skip(step) + "DataverseUse " + dv.getDataverseName());
         return null;
     }
 
     @Override
-    public Void visit(WriteStatement ws, Integer step) throws AsterixException {
+    public Void visit(WriteStatement ws, Integer step) throws CompilationException {
         out.print(skip(step) + "WriteOutputTo " + ws.getNcName() + ":" + ws.getFileName());
         if (ws.getWriterClassName() != null) {
             out.print(" using " + ws.getWriterClassName());
@@ -422,13 +422,13 @@
     }
 
     @Override
-    public Void visit(SetStatement ss, Integer step) throws AsterixException {
+    public Void visit(SetStatement ss, Integer step) throws CompilationException {
         out.println(skip(step) + "Set " + ss.getPropName() + "=" + ss.getPropValue());
         return null;
     }
 
     @Override
-    public Void visit(DisconnectFeedStatement ss, Integer step) throws AsterixException {
+    public Void visit(DisconnectFeedStatement ss, Integer step) throws CompilationException {
         out.println(skip(step) + skip(step) + ss.getFeedName() + skip(step) + ss.getDatasetName());
         return null;
     }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractAstVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractAstVisitor.java
index 3f586e9..a422ef1 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractAstVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractAstVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.clause.LimitClause;
@@ -41,92 +41,92 @@
 public abstract class AbstractAstVisitor<R, T> extends AbstractQueryExpressionVisitor<R, T> {
 
     @Override
-    public R visit(Query q, T arg) throws AsterixException {
+    public R visit(Query q, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(FunctionDecl fd, T arg) throws AsterixException {
+    public R visit(FunctionDecl fd, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(LiteralExpr l, T arg) throws AsterixException {
+    public R visit(LiteralExpr l, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(VariableExpr v, T arg) throws AsterixException {
+    public R visit(VariableExpr v, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(ListConstructor lc, T arg) throws AsterixException {
+    public R visit(ListConstructor lc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(RecordConstructor rc, T arg) throws AsterixException {
+    public R visit(RecordConstructor rc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(OperatorExpr ifbo, T arg) throws AsterixException {
+    public R visit(OperatorExpr ifbo, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(FieldAccessor fa, T arg) throws AsterixException {
+    public R visit(FieldAccessor fa, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(IndexAccessor ia, T arg) throws AsterixException {
+    public R visit(IndexAccessor ia, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(IfExpr ifexpr, T arg) throws AsterixException {
+    public R visit(IfExpr ifexpr, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(QuantifiedExpression qe, T arg) throws AsterixException {
+    public R visit(QuantifiedExpression qe, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(LetClause lc, T arg) throws AsterixException {
+    public R visit(LetClause lc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(WhereClause wc, T arg) throws AsterixException {
+    public R visit(WhereClause wc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(OrderbyClause oc, T arg) throws AsterixException {
+    public R visit(OrderbyClause oc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(GroupbyClause gc, T arg) throws AsterixException {
+    public R visit(GroupbyClause gc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(LimitClause lc, T arg) throws AsterixException {
+    public R visit(LimitClause lc, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(UnaryExpr u, T arg) throws AsterixException {
+    public R visit(UnaryExpr u, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CallExpr pf, T arg) throws AsterixException {
+    public R visit(CallExpr pf, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractQueryExpressionVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractQueryExpressionVisitor.java
index e32615f..a4868d0 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractQueryExpressionVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/AbstractQueryExpressionVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.clause.UpdateClause;
 import org.apache.asterix.lang.common.expression.OrderedListTypeDefinition;
 import org.apache.asterix.lang.common.expression.RecordTypeDefinition;
@@ -55,162 +55,162 @@
 public abstract class AbstractQueryExpressionVisitor<R, T> implements ILangVisitor<R, T> {
 
     @Override
-    public R visit(CreateIndexStatement cis, T arg) throws AsterixException {
+    public R visit(CreateIndexStatement cis, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DataverseDecl dv, T arg) throws AsterixException {
+    public R visit(DataverseDecl dv, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DeleteStatement del, T arg) throws AsterixException {
+    public R visit(DeleteStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DropDatasetStatement del, T arg) throws AsterixException {
+    public R visit(DropDatasetStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DatasetDecl dd, T arg) throws AsterixException {
+    public R visit(DatasetDecl dd, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(InsertStatement insert, T arg) throws AsterixException {
+    public R visit(InsertStatement insert, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(LoadStatement stmtLoad, T arg) throws AsterixException {
+    public R visit(LoadStatement stmtLoad, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(NodegroupDecl ngd, T arg) throws AsterixException {
+    public R visit(NodegroupDecl ngd, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(OrderedListTypeDefinition olte, T arg) throws AsterixException {
+    public R visit(OrderedListTypeDefinition olte, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(RecordTypeDefinition tre, T arg) throws AsterixException {
+    public R visit(RecordTypeDefinition tre, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SetStatement ss, T arg) throws AsterixException {
+    public R visit(SetStatement ss, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(TypeDecl td, T arg) throws AsterixException {
+    public R visit(TypeDecl td, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(TypeReferenceExpression tre, T arg) throws AsterixException {
+    public R visit(TypeReferenceExpression tre, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(UnorderedListTypeDefinition ulte, T arg) throws AsterixException {
+    public R visit(UnorderedListTypeDefinition ulte, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(UpdateClause del, T arg) throws AsterixException {
+    public R visit(UpdateClause del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(UpdateStatement update, T arg) throws AsterixException {
+    public R visit(UpdateStatement update, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(WriteStatement ws, T arg) throws AsterixException {
+    public R visit(WriteStatement ws, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CreateDataverseStatement del, T arg) throws AsterixException {
+    public R visit(CreateDataverseStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(IndexDropStatement del, T arg) throws AsterixException {
+    public R visit(IndexDropStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(NodeGroupDropStatement del, T arg) throws AsterixException {
+    public R visit(NodeGroupDropStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DataverseDropStatement del, T arg) throws AsterixException {
+    public R visit(DataverseDropStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(TypeDropStatement del, T arg) throws AsterixException {
+    public R visit(TypeDropStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(DisconnectFeedStatement del, T arg) throws AsterixException {
+    public R visit(DisconnectFeedStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CreateFunctionStatement cfs, T arg) throws AsterixException {
+    public R visit(CreateFunctionStatement cfs, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(FunctionDropStatement del, T arg) throws AsterixException {
+    public R visit(FunctionDropStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CreatePrimaryFeedStatement del, T arg) throws AsterixException {
+    public R visit(CreatePrimaryFeedStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CreateSecondaryFeedStatement del, T arg) throws AsterixException {
+    public R visit(CreateSecondaryFeedStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(ConnectFeedStatement del, T arg) throws AsterixException {
+    public R visit(ConnectFeedStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(FeedDropStatement del, T arg) throws AsterixException {
+    public R visit(FeedDropStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CompactStatement del, T arg) throws AsterixException {
+    public R visit(CompactStatement del, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CreateFeedPolicyStatement cfps, T arg) throws AsterixException {
+    public R visit(CreateFeedPolicyStatement cfps, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(FeedPolicyDropStatement dfs, T arg) throws AsterixException {
+    public R visit(FeedPolicyDropStatement dfs, T arg) throws CompilationException {
         return null;
     }
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/ILangVisitor.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/ILangVisitor.java
index 4a16025..4a5c5ed 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/ILangVisitor.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/base/ILangVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.common.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.clause.LimitClause;
@@ -72,104 +72,104 @@
 
 public interface ILangVisitor<R, T> {
 
-    R visit(Query q, T arg) throws AsterixException;
+    R visit(Query q, T arg) throws CompilationException;
 
-    R visit(FunctionDecl fd, T arg) throws AsterixException;
+    R visit(FunctionDecl fd, T arg) throws CompilationException;
 
-    R visit(TypeDecl td, T arg) throws AsterixException;
+    R visit(TypeDecl td, T arg) throws CompilationException;
 
-    R visit(NodegroupDecl ngd, T arg) throws AsterixException;
+    R visit(NodegroupDecl ngd, T arg) throws CompilationException;
 
-    R visit(DatasetDecl dd, T arg) throws AsterixException;
+    R visit(DatasetDecl dd, T arg) throws CompilationException;
 
-    R visit(LoadStatement stmtLoad, T arg) throws AsterixException;
+    R visit(LoadStatement stmtLoad, T arg) throws CompilationException;
 
-    R visit(DropDatasetStatement del, T arg) throws AsterixException;
+    R visit(DropDatasetStatement del, T arg) throws CompilationException;
 
-    R visit(InsertStatement insert, T arg) throws AsterixException;
+    R visit(InsertStatement insert, T arg) throws CompilationException;
 
-    R visit(DeleteStatement del, T arg) throws AsterixException;
+    R visit(DeleteStatement del, T arg) throws CompilationException;
 
-    R visit(UpdateStatement update, T arg) throws AsterixException;
+    R visit(UpdateStatement update, T arg) throws CompilationException;
 
-    R visit(UpdateClause del, T arg) throws AsterixException;
+    R visit(UpdateClause del, T arg) throws CompilationException;
 
-    R visit(TypeReferenceExpression tre, T arg) throws AsterixException;
+    R visit(TypeReferenceExpression tre, T arg) throws CompilationException;
 
-    R visit(RecordTypeDefinition tre, T arg) throws AsterixException;
+    R visit(RecordTypeDefinition tre, T arg) throws CompilationException;
 
-    R visit(OrderedListTypeDefinition olte, T arg) throws AsterixException;
+    R visit(OrderedListTypeDefinition olte, T arg) throws CompilationException;
 
-    R visit(UnorderedListTypeDefinition ulte, T arg) throws AsterixException;
+    R visit(UnorderedListTypeDefinition ulte, T arg) throws CompilationException;
 
-    R visit(LiteralExpr l, T arg) throws AsterixException;
+    R visit(LiteralExpr l, T arg) throws CompilationException;
 
-    R visit(VariableExpr v, T arg) throws AsterixException;
+    R visit(VariableExpr v, T arg) throws CompilationException;
 
-    R visit(ListConstructor lc, T arg) throws AsterixException;
+    R visit(ListConstructor lc, T arg) throws CompilationException;
 
-    R visit(RecordConstructor rc, T arg) throws AsterixException;
+    R visit(RecordConstructor rc, T arg) throws CompilationException;
 
-    R visit(OperatorExpr ifbo, T arg) throws AsterixException;
+    R visit(OperatorExpr ifbo, T arg) throws CompilationException;
 
-    R visit(FieldAccessor fa, T arg) throws AsterixException;
+    R visit(FieldAccessor fa, T arg) throws CompilationException;
 
-    R visit(IndexAccessor ia, T arg) throws AsterixException;
+    R visit(IndexAccessor ia, T arg) throws CompilationException;
 
-    R visit(IfExpr ifexpr, T arg) throws AsterixException;
+    R visit(IfExpr ifexpr, T arg) throws CompilationException;
 
-    R visit(QuantifiedExpression qe, T arg) throws AsterixException;
+    R visit(QuantifiedExpression qe, T arg) throws CompilationException;
 
-    R visit(LetClause lc, T arg) throws AsterixException;
+    R visit(LetClause lc, T arg) throws CompilationException;
 
-    R visit(WhereClause wc, T arg) throws AsterixException;
+    R visit(WhereClause wc, T arg) throws CompilationException;
 
-    R visit(OrderbyClause oc, T arg) throws AsterixException;
+    R visit(OrderbyClause oc, T arg) throws CompilationException;
 
-    R visit(GroupbyClause gc, T arg) throws AsterixException;
+    R visit(GroupbyClause gc, T arg) throws CompilationException;
 
-    R visit(LimitClause lc, T arg) throws AsterixException;
+    R visit(LimitClause lc, T arg) throws CompilationException;
 
-    R visit(UnaryExpr u, T arg) throws AsterixException;
+    R visit(UnaryExpr u, T arg) throws CompilationException;
 
-    R visit(CreateIndexStatement cis, T arg) throws AsterixException;
+    R visit(CreateIndexStatement cis, T arg) throws CompilationException;
 
-    R visit(CreateDataverseStatement del, T arg) throws AsterixException;
+    R visit(CreateDataverseStatement del, T arg) throws CompilationException;
 
-    R visit(IndexDropStatement del, T arg) throws AsterixException;
+    R visit(IndexDropStatement del, T arg) throws CompilationException;
 
-    R visit(NodeGroupDropStatement del, T arg) throws AsterixException;
+    R visit(NodeGroupDropStatement del, T arg) throws CompilationException;
 
-    R visit(DataverseDropStatement del, T arg) throws AsterixException;
+    R visit(DataverseDropStatement del, T arg) throws CompilationException;
 
-    R visit(TypeDropStatement del, T arg) throws AsterixException;
+    R visit(TypeDropStatement del, T arg) throws CompilationException;
 
-    R visit(WriteStatement ws, T arg) throws AsterixException;
+    R visit(WriteStatement ws, T arg) throws CompilationException;
 
-    R visit(SetStatement ss, T arg) throws AsterixException;
+    R visit(SetStatement ss, T arg) throws CompilationException;
 
-    R visit(DisconnectFeedStatement del, T arg) throws AsterixException;
+    R visit(DisconnectFeedStatement del, T arg) throws CompilationException;
 
-    R visit(ConnectFeedStatement del, T arg) throws AsterixException;
+    R visit(ConnectFeedStatement del, T arg) throws CompilationException;
 
-    R visit(CreatePrimaryFeedStatement cpfs, T arg) throws AsterixException;
+    R visit(CreatePrimaryFeedStatement cpfs, T arg) throws CompilationException;
 
-    R visit(CreateSecondaryFeedStatement csfs, T arg) throws AsterixException;
+    R visit(CreateSecondaryFeedStatement csfs, T arg) throws CompilationException;
 
-    R visit(FeedDropStatement del, T arg) throws AsterixException;
+    R visit(FeedDropStatement del, T arg) throws CompilationException;
 
-    R visit(FeedPolicyDropStatement dfs, T arg) throws AsterixException;
+    R visit(FeedPolicyDropStatement dfs, T arg) throws CompilationException;
 
-    R visit(CreateFeedPolicyStatement cfps, T arg) throws AsterixException;
+    R visit(CreateFeedPolicyStatement cfps, T arg) throws CompilationException;
 
-    R visit(CallExpr pf, T arg) throws AsterixException;
+    R visit(CallExpr pf, T arg) throws CompilationException;
 
-    R visit(DataverseDecl dv, T arg) throws AsterixException;
+    R visit(DataverseDecl dv, T arg) throws CompilationException;
 
-    R visit(CreateFunctionStatement cfs, T arg) throws AsterixException;
+    R visit(CreateFunctionStatement cfs, T arg) throws CompilationException;
 
-    R visit(FunctionDropStatement del, T arg) throws AsterixException;
+    R visit(FunctionDropStatement del, T arg) throws CompilationException;
 
-    R visit(CompactStatement del, T arg) throws AsterixException;
+    R visit(CompactStatement del, T arg) throws CompilationException;
 
 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromClause.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromClause.java
index aff731b..65c2f01 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromClause.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromClause.java
@@ -23,7 +23,7 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.visitor.base.ISqlppVisitor;
@@ -37,7 +37,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromTerm.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromTerm.java
index d4e522a..e4390d9 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromTerm.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/FromTerm.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.VariableExpr;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/HavingClause.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/HavingClause.java
index 19b7692..aadbe42 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/HavingClause.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/HavingClause.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -33,7 +33,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/JoinClause.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/JoinClause.java
index 0da25cd..0b2a346 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/JoinClause.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/JoinClause.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -34,7 +34,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/NestClause.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/NestClause.java
index 297868f..a2c27f0 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/NestClause.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/NestClause.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -34,7 +34,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/Projection.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/Projection.java
index 148cc36..28d447a 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/Projection.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/Projection.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -41,7 +41,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectBlock.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectBlock.java
index e297335..51e4ab4 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectBlock.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectBlock.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
@@ -58,7 +58,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectClause.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectClause.java
index 12e501b..0a272f9 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectClause.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectClause.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.visitor.base.ISqlppVisitor;
@@ -38,7 +38,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectElement.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectElement.java
index 6a630b5..9c82d5c 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectElement.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectElement.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -34,7 +34,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectRegular.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectRegular.java
index 1df1e7a..a114337 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectRegular.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectRegular.java
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.visitor.base.ISqlppVisitor;
@@ -36,7 +36,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectSetOperation.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectSetOperation.java
index 6e0fb21..ee622ea 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectSetOperation.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/SelectSetOperation.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.struct.SetOperationInput;
@@ -43,7 +43,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/UnnestClause.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/UnnestClause.java
index b71838b..f1a3964 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/UnnestClause.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/clause/UnnestClause.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.clause;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
@@ -33,7 +33,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/CaseExpression.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/CaseExpression.java
index 45ff082..05300d1 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/CaseExpression.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/CaseExpression.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.expression.LiteralExpr;
 import org.apache.asterix.lang.common.literal.NullLiteral;
@@ -48,7 +48,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/IndependentSubquery.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/IndependentSubquery.java
index 3b4c1aa..24a6217 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/IndependentSubquery.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/IndependentSubquery.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.expression;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.visitor.base.ISqlppVisitor;
@@ -33,7 +33,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/SelectExpression.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/SelectExpression.java
index a940c47..0fb687a 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/SelectExpression.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/expression/SelectExpression.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.clause.LimitClause;
@@ -51,7 +51,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return ((ISqlppVisitor<R, T>) visitor).visit(this, arg);
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
index a1ce60d..d59c5df 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
@@ -22,7 +22,7 @@
 import java.io.StringReader;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.IParser;
 import org.apache.asterix.lang.common.base.IParserFactory;
 import org.apache.asterix.lang.common.base.Statement;
@@ -39,7 +39,7 @@
         this.parserFactory = parserFactory;
     }
 
-    public FunctionDecl getFunctionDecl(Function function) throws AsterixException {
+    public FunctionDecl getFunctionDecl(Function function) throws CompilationException {
         String functionBody = function.getFunctionBody();
         List<String> params = function.getParams();
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppFunctionBodyRewriter.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppFunctionBodyRewriter.java
index 5fee28f..fbf64f7 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppFunctionBodyRewriter.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppFunctionBodyRewriter.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.IReturningStatement;
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.statement.FunctionDecl;
@@ -31,7 +31,7 @@
     @Override
     public void rewrite(List<FunctionDecl> declaredFunctions, IReturningStatement topStatement,
             MetadataProvider metadataProvider,
-            LangRewritingContext context) throws AsterixException {
+            LangRewritingContext context) throws CompilationException {
         // Sets up parameters.
         setup(declaredFunctions, topStatement, metadataProvider, context);
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppQueryRewriter.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppQueryRewriter.java
index 1662f85..f303a6c 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppQueryRewriter.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppQueryRewriter.java
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.IQueryRewriter;
@@ -86,7 +86,7 @@
 
     @Override
     public void rewrite(List<FunctionDecl> declaredFunctions, IReturningStatement topStatement,
-            MetadataProvider metadataProvider, LangRewritingContext context) throws AsterixException {
+            MetadataProvider metadataProvider, LangRewritingContext context) throws CompilationException {
         if (topStatement == null) {
             return;
         }
@@ -147,22 +147,22 @@
         topStatement.setVarCounter(context.getVarCounter());
     }
 
-    protected void rewriteGlobalAggregations() throws AsterixException {
+    protected void rewriteGlobalAggregations() throws CompilationException {
         SqlppGlobalAggregationSugarVisitor globalAggregationVisitor = new SqlppGlobalAggregationSugarVisitor();
         topExpr.accept(globalAggregationVisitor, null);
     }
 
-    protected void rewriteListInputFunctions() throws AsterixException {
+    protected void rewriteListInputFunctions() throws CompilationException {
         SqlppListInputFunctionRewriteVisitor listInputFunctionVisitor = new SqlppListInputFunctionRewriteVisitor();
         topExpr.accept(listInputFunctionVisitor, null);
     }
 
-    protected void rewriteFunctionNames() throws AsterixException {
+    protected void rewriteFunctionNames() throws CompilationException {
         SqlppBuiltinFunctionRewriteVisitor functionNameMapVisitor = new SqlppBuiltinFunctionRewriteVisitor();
         topExpr.accept(functionNameMapVisitor, null);
     }
 
-    protected void inlineWithExpressions() throws AsterixException {
+    protected void inlineWithExpressions() throws CompilationException {
         String inlineWith = metadataProvider.getConfig().get(INLINE_WITH);
         if (inlineWith != null && inlineWith.equalsIgnoreCase(NOT_INLINE_WITH)) {
             return;
@@ -172,49 +172,49 @@
         topExpr.accept(inlineWithExpressionVisitor, null);
     }
 
-    protected void generateColumnNames() throws AsterixException {
+    protected void generateColumnNames() throws CompilationException {
         // Generate column names if they are missing in the user query.
         GenerateColumnNameVisitor generateColumnNameVisitor = new GenerateColumnNameVisitor(context);
         topExpr.accept(generateColumnNameVisitor, null);
     }
 
-    protected void substituteGroupbyKeyExpression() throws AsterixException {
+    protected void substituteGroupbyKeyExpression() throws CompilationException {
         // Substitute group-by key expressions that appear in the select clause.
         SubstituteGroupbyExpressionWithVariableVisitor substituteGbyExprVisitor =
                 new SubstituteGroupbyExpressionWithVariableVisitor(context);
         topExpr.accept(substituteGbyExprVisitor, null);
     }
 
-    protected void rewriteSetOperations() throws AsterixException {
+    protected void rewriteSetOperations() throws CompilationException {
         // Rewrites set operation queries that contain order-by and limit clauses.
         SetOperationVisitor setOperationVisitor = new SetOperationVisitor(context);
         topExpr.accept(setOperationVisitor, null);
     }
 
-    protected void rewriteOperatorExpression() throws AsterixException {
+    protected void rewriteOperatorExpression() throws CompilationException {
         // Rewrites like/not-like/in/not-in operators into function call expressions.
         OperatorExpressionVisitor operatorExpressionVisitor = new OperatorExpressionVisitor(context);
         topExpr.accept(operatorExpressionVisitor, null);
     }
 
-    protected void inlineColumnAlias() throws AsterixException {
+    protected void inlineColumnAlias() throws CompilationException {
         // Inline column aliases.
         InlineColumnAliasVisitor inlineColumnAliasVisitor = new InlineColumnAliasVisitor(context);
         topExpr.accept(inlineColumnAliasVisitor, null);
     }
 
-    protected void variableCheckAndRewrite(boolean overwrite) throws AsterixException {
+    protected void variableCheckAndRewrite(boolean overwrite) throws CompilationException {
         VariableCheckAndRewriteVisitor variableCheckAndRewriteVisitor =
                 new VariableCheckAndRewriteVisitor(context, overwrite, metadataProvider);
         topExpr.accept(variableCheckAndRewriteVisitor, null);
     }
 
-    protected void rewriteGroupBys() throws AsterixException {
+    protected void rewriteGroupBys() throws CompilationException {
         SqlppGroupByVisitor groupByVisitor = new SqlppGroupByVisitor(context);
         topExpr.accept(groupByVisitor, null);
     }
 
-    protected void inlineDeclaredUdfs() throws AsterixException {
+    protected void inlineDeclaredUdfs() throws CompilationException {
         List<FunctionSignature> funIds = new ArrayList<FunctionSignature>();
         for (FunctionDecl fdecl : declaredFunctions) {
             funIds.add(fdecl.getSignature());
@@ -238,7 +238,7 @@
         declaredFunctions.removeAll(usedStoredFunctionDecls);
     }
 
-    private Set<FunctionSignature> getFunctionCalls(Expression expression) throws AsterixException {
+    private Set<FunctionSignature> getFunctionCalls(Expression expression) throws CompilationException {
         GatherFunctionCalls gfc = new GatherFunctionCalls();
         expression.accept(gfc, null);
         return gfc.getCalls();
@@ -250,7 +250,7 @@
         }
 
         @Override
-        public Void visit(FromClause fromClause, Void arg) throws AsterixException {
+        public Void visit(FromClause fromClause, Void arg) throws CompilationException {
             for (FromTerm fromTerm : fromClause.getFromTerms()) {
                 fromTerm.accept(this, arg);
             }
@@ -258,7 +258,7 @@
         }
 
         @Override
-        public Void visit(FromTerm fromTerm, Void arg) throws AsterixException {
+        public Void visit(FromTerm fromTerm, Void arg) throws CompilationException {
             fromTerm.getLeftExpression().accept(this, arg);
             for (AbstractBinaryCorrelateClause correlateClause : fromTerm.getCorrelateClauses()) {
                 correlateClause.accept(this, arg);
@@ -267,21 +267,21 @@
         }
 
         @Override
-        public Void visit(JoinClause joinClause, Void arg) throws AsterixException {
+        public Void visit(JoinClause joinClause, Void arg) throws CompilationException {
             joinClause.getRightExpression().accept(this, arg);
             joinClause.getConditionExpression().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(NestClause nestClause, Void arg) throws AsterixException {
+        public Void visit(NestClause nestClause, Void arg) throws CompilationException {
             nestClause.getRightExpression().accept(this, arg);
             nestClause.getConditionExpression().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(Projection projection, Void arg) throws AsterixException {
+        public Void visit(Projection projection, Void arg) throws CompilationException {
             if (!projection.star()) {
                 projection.getExpression().accept(this, arg);
             }
@@ -289,7 +289,7 @@
         }
 
         @Override
-        public Void visit(SelectBlock selectBlock, Void arg) throws AsterixException {
+        public Void visit(SelectBlock selectBlock, Void arg) throws CompilationException {
             if (selectBlock.hasFromClause()) {
                 selectBlock.getFromClause().accept(this, arg);
             }
@@ -317,7 +317,7 @@
         }
 
         @Override
-        public Void visit(SelectClause selectClause, Void arg) throws AsterixException {
+        public Void visit(SelectClause selectClause, Void arg) throws CompilationException {
             if (selectClause.selectElement()) {
                 selectClause.getSelectElement().accept(this, arg);
             } else {
@@ -327,13 +327,13 @@
         }
 
         @Override
-        public Void visit(SelectElement selectElement, Void arg) throws AsterixException {
+        public Void visit(SelectElement selectElement, Void arg) throws CompilationException {
             selectElement.getExpression().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(SelectRegular selectRegular, Void arg) throws AsterixException {
+        public Void visit(SelectRegular selectRegular, Void arg) throws CompilationException {
             for (Projection projection : selectRegular.getProjections()) {
                 projection.accept(this, arg);
             }
@@ -341,7 +341,7 @@
         }
 
         @Override
-        public Void visit(SelectSetOperation selectSetOperation, Void arg) throws AsterixException {
+        public Void visit(SelectSetOperation selectSetOperation, Void arg) throws CompilationException {
             selectSetOperation.getLeftInput().accept(this, arg);
             for (SetOperationRight setOperationRight : selectSetOperation.getRightInputs()) {
                 setOperationRight.getSetOperationRightInput().accept(this, arg);
@@ -350,7 +350,7 @@
         }
 
         @Override
-        public Void visit(SelectExpression selectStatement, Void arg) throws AsterixException {
+        public Void visit(SelectExpression selectStatement, Void arg) throws CompilationException {
             selectStatement.getSelectSetOperation().accept(this, arg);
             if (selectStatement.hasOrderby()) {
                 selectStatement.getOrderbyClause().accept(this, arg);
@@ -362,25 +362,25 @@
         }
 
         @Override
-        public Void visit(UnnestClause unnestClause, Void arg) throws AsterixException {
+        public Void visit(UnnestClause unnestClause, Void arg) throws CompilationException {
             unnestClause.getRightExpression().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(HavingClause havingClause, Void arg) throws AsterixException {
+        public Void visit(HavingClause havingClause, Void arg) throws CompilationException {
             havingClause.getFilterExpression().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(IndependentSubquery independentSubquery, Void arg) throws AsterixException {
+        public Void visit(IndependentSubquery independentSubquery, Void arg) throws CompilationException {
             independentSubquery.getExpr().accept(this, arg);
             return null;
         }
 
         @Override
-        public Void visit(CaseExpression caseExpression, Void arg) throws AsterixException {
+        public Void visit(CaseExpression caseExpression, Void arg) throws CompilationException {
             caseExpression.getConditionExpr().accept(this, arg);
             for (Expression expr : caseExpression.getWhenExprs()) {
                 expr.accept(this, arg);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppStatementRewriter.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppStatementRewriter.java
index 01cb0f1..5667415 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppStatementRewriter.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppStatementRewriter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.sqlpp.rewrites;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.IStatementRewriter;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.sqlpp.visitor.SqlppDeleteRewriteVisitor;
@@ -26,11 +26,11 @@
 class SqlppStatementRewriter implements IStatementRewriter {
 
     @Override
-    public void rewrite(Statement stmt) throws AsterixException {
+    public void rewrite(Statement stmt) throws CompilationException {
         rewriteDeleteStatement(stmt);
     }
 
-    private void rewriteDeleteStatement(Statement stmt) throws AsterixException {
+    private void rewriteDeleteStatement(Statement stmt) throws CompilationException {
         if (stmt != null) {
             SqlppDeleteRewriteVisitor visitor = new SqlppDeleteRewriteVisitor();
             stmt.accept(visitor, null);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
index e2edb3a..4e1ab1f 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.rewrites.visitor;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -39,14 +39,14 @@
     }
 
     @Override
-    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         // Visit selectBlock first so that column names starts from $1.
         selectBlock.getSelectClause().accept(this, arg);
         return super.visit(selectBlock, arg);
     }
 
     @Override
-    public Expression visit(Projection projection, ILangExpression arg) throws AsterixException {
+    public Expression visit(Projection projection, ILangExpression arg) throws CompilationException {
         if (!projection.star() && projection.getName() == null) {
             projection.setName(SqlppVariableUtil.variableNameToDisplayedFieldName(context.newVariable().getValue()));
         }
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public Expression visit(GroupbyClause groupbyClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(GroupbyClause groupbyClause, ILangExpression arg) throws CompilationException {
         for (GbyVariableExpressionPair gbyKeyPair : groupbyClause.getGbyPairList()) {
             if (gbyKeyPair.getVar() == null) {
                 gbyKeyPair.setVar(new VariableExpr(context.newVariable()));
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
index 36786cd..628bf57 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
@@ -23,11 +23,11 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.Expression.Kind;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.base.Literal;
-import org.apache.asterix.lang.common.base.Expression.Kind;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.expression.FieldBinding;
 import org.apache.asterix.lang.common.expression.LiteralExpr;
@@ -52,7 +52,7 @@
     }
 
     @Override
-    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         // Gets the map from select clause.
         Map<Expression, Expression> map = getMap(selectBlock.getSelectClause());
 
@@ -93,7 +93,7 @@
         return super.visit(selectBlock, arg);
     }
 
-    private Map<Expression, Expression> getMap(SelectClause selectClause) throws AsterixException {
+    private Map<Expression, Expression> getMap(SelectClause selectClause) throws CompilationException {
         if (selectClause.selectElement()) {
             return getMap(selectClause.getSelectElement());
         }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineWithExpressionVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineWithExpressionVisitor.java
index 7a4f0fe..54ef5ab 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineWithExpressionVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineWithExpressionVisitor.java
@@ -25,7 +25,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.LetClause;
@@ -41,7 +41,7 @@
     }
 
     @Override
-    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws CompilationException {
         if (selectExpression.hasLetClauses()) {
             // Inlines the leading WITH list.
             Map<Expression, Expression> varExprMap = new HashMap<>();
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
index 60c4aa0..aa337e3 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
@@ -23,15 +23,15 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.expression.CallExpr;
 import org.apache.asterix.lang.common.expression.OperatorExpr;
 import org.apache.asterix.lang.common.expression.QuantifiedExpression;
-import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.expression.QuantifiedExpression.Quantifier;
+import org.apache.asterix.lang.common.expression.VariableExpr;
 import org.apache.asterix.lang.common.rewrites.LangRewritingContext;
 import org.apache.asterix.lang.common.struct.OperatorType;
 import org.apache.asterix.lang.common.struct.QuantifiedPair;
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public Expression visit(OperatorExpr operatorExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(OperatorExpr operatorExpr, ILangExpression arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : operatorExpr.getExprList()) {
             newExprList.add(expr.accept(this, operatorExpr));
@@ -83,7 +83,7 @@
  new ArrayList<>(Collections.singletonList(likeExpr)));
     }
 
-    private Expression processInOperator(OperatorExpr operatorExpr, OperatorType opType) throws AsterixException {
+    private Expression processInOperator(OperatorExpr operatorExpr, OperatorType opType) throws CompilationException {
         VariableExpr bindingVar = new VariableExpr(context.newVariable());
         Expression itemExpr = operatorExpr.getExprList().get(0);
         Expression collectionExpr = operatorExpr.getExprList().get(1);
@@ -107,7 +107,8 @@
         return new CallExpr(new FunctionSignature(null, CONCAT, 1), operatorExpr.getExprList());
     }
 
-    private Expression processBetweenOperator(OperatorExpr operatorExpr, OperatorType opType) throws AsterixException {
+    private Expression processBetweenOperator(OperatorExpr operatorExpr, OperatorType opType)
+            throws CompilationException {
         // The grammar guarantees that the BETWEEN operator gets exactly three expressions.
         Expression target = operatorExpr.getExprList().get(0);
         Expression left = operatorExpr.getExprList().get(1);
@@ -127,7 +128,7 @@
     }
 
     private Expression createLessThanExpression(Expression lhs, Expression rhs, List<IExpressionAnnotation> hints)
-            throws AsterixException {
+            throws CompilationException {
         OperatorExpr comparison = new OperatorExpr();
         comparison.addOperand(lhs);
         comparison.addOperand(rhs);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
index 66bfecd..ddf3cd6 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.LimitClause;
@@ -72,7 +72,7 @@
     }
 
     @Override
-    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws CompilationException {
         // Recursively visit nested select expressions.
         SelectSetOperation selectSetOperation = selectExpression.getSelectSetOperation();
         if (!selectSetOperation.hasRightInputs() || !(selectExpression.hasOrderby() || selectExpression.hasLimit())) {
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
index fbf08ee..f168ebd 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -39,7 +39,7 @@
 public class SqlppBuiltinFunctionRewriteVisitor extends AbstractSqlppSimpleExpressionVisitor {
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         //TODO(buyingyi): rewrite SQL temporal functions
         FunctionSignature functionSignature = callExpr.getFunctionSignature();
         callExpr.setFunctionSignature(FunctionMapUtil.normalizeBuiltinFunctionSignature(functionSignature, true));
@@ -52,7 +52,7 @@
     }
 
     @Override
-    public Expression visit(CaseExpression caseExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CaseExpression caseExpr, ILangExpression arg) throws CompilationException {
         Expression expr = super.visit(caseExpr, arg); // Visits it as usual first.
         if (expr != caseExpr) {
             return expr.accept(this, arg);
@@ -79,7 +79,7 @@
 
     // Normalizes WHEN expressions so that it can have correct NULL/MISSING semantics as well
     // as type promotion semantics.
-    private CaseExpression normalizeCaseExpr(CaseExpression caseExpr) throws AsterixException {
+    private CaseExpression normalizeCaseExpr(CaseExpression caseExpr) throws CompilationException {
         LiteralExpr trueLiteral = new LiteralExpr(TrueLiteral.INSTANCE);
         Expression conditionExpr = caseExpr.getConditionExpr();
         if (trueLiteral.equals(conditionExpr)) {
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGlobalAggregationSugarVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGlobalAggregationSugarVisitor.java
index 9430e4f..16ae05c 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGlobalAggregationSugarVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGlobalAggregationSugarVisitor.java
@@ -22,13 +22,11 @@
 import java.util.HashMap;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.literal.IntegerLiteral;
 import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
 import org.apache.asterix.lang.sqlpp.clause.SelectClause;
 import org.apache.asterix.lang.sqlpp.visitor.CheckSql92AggregateVisitor;
@@ -37,7 +35,7 @@
 public class SqlppGlobalAggregationSugarVisitor extends AbstractSqlppSimpleExpressionVisitor {
 
     @Override
-    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         SelectClause selectClause = selectBlock.getSelectClause();
         if (!selectBlock.hasGroupbyClause() && selectBlock.hasFromClause()) {
             boolean addImplicitGby;
@@ -58,7 +56,7 @@
         return super.visit(selectBlock, arg);
     }
 
-    private boolean isSql92Aggregate(ILangExpression expr, SelectBlock selectBlock) throws AsterixException {
+    private boolean isSql92Aggregate(ILangExpression expr, SelectBlock selectBlock) throws CompilationException {
         CheckSql92AggregateVisitor visitor = new CheckSql92AggregateVisitor();
         return expr.accept(visitor, selectBlock);
     }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupBySugarVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupBySugarVisitor.java
index 996a2ec..a1c17fc 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupBySugarVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupBySugarVisitor.java
@@ -26,7 +26,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -90,7 +90,7 @@
     }
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         FunctionSignature signature = callExpr.getFunctionSignature();
         boolean aggregate = FunctionMapUtil.isSql92AggregateFunction(signature);
@@ -109,7 +109,7 @@
         return callExpr;
     }
 
-    private Expression wrapAggregationArgument(Expression argExpr) throws AsterixException {
+    private Expression wrapAggregationArgument(Expression argExpr) throws CompilationException {
         Expression expr = argExpr;
         Set<VariableExpr> freeVars = SqlppRewriteUtil.getFreeVariable(expr);
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
index 0170709..b928285 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
@@ -26,7 +26,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -91,7 +91,7 @@
     }
 
     @Override
-    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         // Traverses the select block in the order of "from", "let"s, "where",
         // "group by", "let"s, "having" and "select".
         FromClause fromClause = selectBlock.getFromClause();
@@ -219,7 +219,7 @@
     }
 
     @Override
-    public Expression visit(GroupbyClause gc, ILangExpression arg) throws AsterixException {
+    public Expression visit(GroupbyClause gc, ILangExpression arg) throws CompilationException {
         // Puts all FROM binding variables into withVarList.
         FromClause fromClause = (FromClause) arg;
         Collection<VariableExpr> fromBindingVars =
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppInlineUdfsVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppInlineUdfsVisitor.java
index 56cbb18..b2f56a5 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppInlineUdfsVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppInlineUdfsVisitor.java
@@ -22,7 +22,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.IRewriterFactory;
 import org.apache.asterix.lang.common.clause.LetClause;
@@ -73,13 +73,13 @@
 
     @Override
     protected Expression generateQueryExpression(List<LetClause> letClauses, Expression returnExpr)
-            throws AsterixException {
+            throws CompilationException {
         Map<Expression, Expression> varExprMap = extractLetBindingVariableExpressionMappings(letClauses);
-        return (Expression) SqlppRewriteUtil.substituteExpression(returnExpr, varExprMap, context);
+        return SqlppRewriteUtil.substituteExpression(returnExpr, varExprMap, context);
     }
 
     @Override
-    public Boolean visit(FromClause fromClause, List<FunctionDecl> func) throws AsterixException {
+    public Boolean visit(FromClause fromClause, List<FunctionDecl> func) throws CompilationException {
         boolean changed = false;
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
             changed |= fromTerm.accept(this, func);
@@ -88,7 +88,7 @@
     }
 
     @Override
-    public Boolean visit(FromTerm fromTerm, List<FunctionDecl> func) throws AsterixException {
+    public Boolean visit(FromTerm fromTerm, List<FunctionDecl> func) throws CompilationException {
         boolean changed = false;
         Pair<Boolean, Expression> p = inlineUdfsInExpr(fromTerm.getLeftExpression(), func);
         fromTerm.setLeftExpression(p.second);
@@ -100,7 +100,7 @@
     }
 
     @Override
-    public Boolean visit(JoinClause joinClause, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(JoinClause joinClause, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> p1 = inlineUdfsInExpr(joinClause.getRightExpression(), funcs);
         joinClause.setRightExpression(p1.second);
         Pair<Boolean, Expression> p2 = inlineUdfsInExpr(joinClause.getConditionExpression(), funcs);
@@ -109,7 +109,7 @@
     }
 
     @Override
-    public Boolean visit(NestClause nestClause, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(NestClause nestClause, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> p1 = inlineUdfsInExpr(nestClause.getRightExpression(), funcs);
         nestClause.setRightExpression(p1.second);
         Pair<Boolean, Expression> p2 = inlineUdfsInExpr(nestClause.getConditionExpression(), funcs);
@@ -118,14 +118,14 @@
     }
 
     @Override
-    public Boolean visit(Projection projection, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(Projection projection, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(projection.getExpression(), funcs);
         projection.setExpression(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(SelectBlock selectBlock, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(SelectBlock selectBlock, List<FunctionDecl> funcs) throws CompilationException {
         boolean changed = false;
         if (selectBlock.hasFromClause()) {
             changed |= selectBlock.getFromClause().accept(this, funcs);
@@ -154,7 +154,7 @@
     }
 
     @Override
-    public Boolean visit(SelectClause selectClause, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(SelectClause selectClause, List<FunctionDecl> funcs) throws CompilationException {
         boolean changed = false;
         if (selectClause.selectElement()) {
             changed |= selectClause.getSelectElement().accept(this, funcs);
@@ -165,14 +165,14 @@
     }
 
     @Override
-    public Boolean visit(SelectElement selectElement, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(SelectElement selectElement, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(selectElement.getExpression(), funcs);
         selectElement.setExpression(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(SelectRegular selectRegular, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(SelectRegular selectRegular, List<FunctionDecl> funcs) throws CompilationException {
         boolean changed = false;
         for (Projection projection : selectRegular.getProjections()) {
             changed |= projection.accept(this, funcs);
@@ -181,7 +181,7 @@
     }
 
     @Override
-    public Boolean visit(SelectSetOperation selectSetOperation, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(SelectSetOperation selectSetOperation, List<FunctionDecl> funcs) throws CompilationException {
         boolean changed = false;
         changed |= selectSetOperation.getLeftInput().accept(this, funcs);
         for (SetOperationRight right : selectSetOperation.getRightInputs()) {
@@ -191,7 +191,7 @@
     }
 
     @Override
-    public Boolean visit(SelectExpression selectExpression, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(SelectExpression selectExpression, List<FunctionDecl> funcs) throws CompilationException {
         boolean changed = false;
         if (selectExpression.hasLetClauses()) {
             for (LetClause letClause : selectExpression.getLetList()) {
@@ -209,28 +209,29 @@
     }
 
     @Override
-    public Boolean visit(UnnestClause unnestClause, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(UnnestClause unnestClause, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(unnestClause.getRightExpression(), funcs);
         unnestClause.setRightExpression(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(HavingClause havingClause, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(HavingClause havingClause, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(havingClause.getFilterExpression(), funcs);
         havingClause.setFilterExpression(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(IndependentSubquery independentSubquery, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(IndependentSubquery independentSubquery, List<FunctionDecl> funcs)
+            throws CompilationException {
         Pair<Boolean, Expression> p = inlineUdfsInExpr(independentSubquery.getExpr(), funcs);
         independentSubquery.setExpr(p.second);
         return p.first;
     }
 
     @Override
-    public Boolean visit(CaseExpression caseExpr, List<FunctionDecl> funcs) throws AsterixException {
+    public Boolean visit(CaseExpression caseExpr, List<FunctionDecl> funcs) throws CompilationException {
         Pair<Boolean, Expression> result = inlineUdfsInExpr(caseExpr.getConditionExpr(), funcs);
         caseExpr.setConditionExpr(result.second);
         boolean inlined = result.first;
@@ -249,11 +250,11 @@
     }
 
     private Map<Expression, Expression> extractLetBindingVariableExpressionMappings(List<LetClause> letClauses)
-            throws AsterixException {
+            throws CompilationException {
         Map<Expression, Expression> varExprMap = new HashMap<>();
         for (LetClause lc : letClauses) {
             // inline let variables one by one iteratively.
-            lc.setBindingExpr((Expression) SqlppRewriteUtil.substituteExpression(lc.getBindingExpr(),
+            lc.setBindingExpr(SqlppRewriteUtil.substituteExpression(lc.getBindingExpr(),
                     varExprMap, context));
             varExprMap.put(lc.getVarExpr(), lc.getBindingExpr());
         }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppListInputFunctionRewriteVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppListInputFunctionRewriteVisitor.java
index 847076b..2e65292 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppListInputFunctionRewriteVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppListInputFunctionRewriteVisitor.java
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.expression.CallExpr;
@@ -36,7 +36,7 @@
 public class SqlppListInputFunctionRewriteVisitor extends AbstractSqlppSimpleExpressionVisitor {
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : callExpr.getExprList()) {
             newExprList.add(expr.accept(this, arg));
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SubstituteGroupbyExpressionWithVariableVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SubstituteGroupbyExpressionWithVariableVisitor.java
index eb2f463..6d4816b 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SubstituteGroupbyExpressionWithVariableVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SubstituteGroupbyExpressionWithVariableVisitor.java
@@ -22,11 +22,11 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.base.Expression.Kind;
+import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.expression.CallExpr;
 import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         if (selectBlock.hasGroupbyClause()) {
             Map<Expression, Expression> map = new HashMap<>();
             for (GbyVariableExpressionPair gbyKeyPair : selectBlock.getGroupbyClause().getGbyPairList()) {
@@ -93,7 +93,7 @@
     }
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         FunctionSignature signature = callExpr.getFunctionSignature();
         if (FunctionMapUtil.isSql92AggregateFunction(signature)) {
             return callExpr;
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
index 311a4ea..c271365 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
@@ -22,11 +22,11 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.base.Expression.Kind;
+import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.expression.CallExpr;
 import org.apache.asterix.lang.common.expression.FieldAccessor;
 import org.apache.asterix.lang.common.expression.LiteralExpr;
@@ -65,7 +65,7 @@
     }
 
     @Override
-    public Expression visit(FieldAccessor fa, ILangExpression parent) throws AsterixException {
+    public Expression visit(FieldAccessor fa, ILangExpression parent) throws CompilationException {
         Expression leadingExpr = fa.getExpr();
         if (leadingExpr.getKind() != Kind.VARIABLE_EXPRESSION) {
             fa.setExpr(leadingExpr.accept(this, fa));
@@ -90,7 +90,7 @@
     }
 
     @Override
-    public Expression visit(VariableExpr varExpr, ILangExpression parent) throws AsterixException {
+    public Expression visit(VariableExpr varExpr, ILangExpression parent) throws CompilationException {
         return resolve(varExpr, null /** Resolves within the default dataverse. */
                 , SqlppVariableUtil.toUserDefinedVariableName(varExpr.getVar().getValue()).getValue(), varExpr, parent);
     }
@@ -98,7 +98,7 @@
     // Resolve a variable expression with dataverse name and dataset name.
     private Expression resolve(VariableExpr varExpr, String dataverseName, String datasetName,
             Expression originalExprWithUndefinedIdentifier, ILangExpression parent)
-            throws AsterixException {
+            throws CompilationException {
         String varName = varExpr.getVar().getValue();
         checkError(varName);
         if (!rewriteNeeded(varExpr)) {
@@ -123,23 +123,23 @@
         return wrapWithResolveFunction(varExpr, liveVars);
     }
 
-    private void throwUnresolvableError(String dataverseName, String datasetName) throws AsterixException {
+    private void throwUnresolvableError(String dataverseName, String datasetName) throws CompilationException {
         String defaultDataverseName = metadataProvider.getDefaultDataverseName();
         if (dataverseName == null && defaultDataverseName == null) {
-            throw new AsterixException("Cannot find dataset " + datasetName
+            throw new CompilationException("Cannot find dataset " + datasetName
                     + " because there is no dataverse declared, nor an alias with name " + datasetName + "!");
         }
         //If no available dataset nor in-scope variable to resolve to, we throw an error.
-        throw new AsterixException("Cannot find dataset " + datasetName + " in dataverse "
+        throw new CompilationException("Cannot find dataset " + datasetName + " in dataverse "
                 + (dataverseName == null ? defaultDataverseName : dataverseName) + " nor an alias with name "
                 + datasetName + "!");
     }
 
     // Checks whether we need to error the variable reference, e.g., the variable is referred
     // in a LIMIT clause.
-    private void checkError(String varName) throws AsterixException {
+    private void checkError(String varName) throws CompilationException {
         if (scopeChecker.isInForbiddenScopes(varName)) {
-            throw new AsterixException(
+            throw new CompilationException(
                     "Inside limit clauses, it is disallowed to reference a variable having the same name"
                             + " as any variable bound in the same scope as the limit clause.");
         }
@@ -148,13 +148,13 @@
     // For a From/Join/UNNEST/Quantifiers binding expression, we resolve the undefined identifier reference as
     // a dataset access only.
     private boolean resolveToDatasetOnly(Expression originalExpressionWithUndefinedIdentifier, ILangExpression parent)
-            throws AsterixException {
+            throws CompilationException {
         CheckDatasetOnlyResolutionVisitor visitor = new CheckDatasetOnlyResolutionVisitor();
         return parent.accept(visitor, originalExpressionWithUndefinedIdentifier);
     }
 
     // Whether a rewrite is needed for a variable reference expression.
-    private boolean rewriteNeeded(VariableExpr varExpr) throws AsterixException {
+    private boolean rewriteNeeded(VariableExpr varExpr) throws CompilationException {
         String varName = varExpr.getVar().getValue();
         Identifier ident = scopeChecker.lookupSymbol(varName);
         if (ident != null) {
@@ -168,21 +168,21 @@
         }
     }
 
-    private Expression wrapWithDatasetFunction(String dataverseName, String datasetName) throws AsterixException {
+    private Expression wrapWithDatasetFunction(String dataverseName, String datasetName) throws CompilationException {
         String fullyQualifiedName = dataverseName == null ? datasetName : dataverseName + "." + datasetName;
         List<Expression> argList = new ArrayList<>();
         argList.add(new LiteralExpr(new StringLiteral(fullyQualifiedName)));
         return new CallExpr(datasetFunction, argList);
     }
 
-    private boolean datasetExists(String dataverseName, String datasetName) throws AsterixException {
+    private boolean datasetExists(String dataverseName, String datasetName) throws CompilationException {
         try {
             if (metadataProvider.findDataset(dataverseName, datasetName) != null) {
                 return true;
             }
             return fullyQualifiedDatasetNameExists(datasetName);
         } catch (AlgebricksException e) {
-            throw new AsterixException(e);
+            throw new CompilationException(e);
         }
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/struct/SetOperationInput.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/struct/SetOperationInput.java
index 55245fe..0c4b65b 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/struct/SetOperationInput.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/struct/SetOperationInput.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.sqlpp.struct;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.clause.SelectBlock;
 import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
@@ -51,7 +51,7 @@
         return subquery != null;
     }
 
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         if (selectBlock != null) {
             return ((ISqlppVisitor<R, T>) visitor).visit(selectBlock, arg);
         } else {
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
index 93e1828..cd805a1 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.util;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Expression.Kind;
 import org.apache.asterix.lang.common.expression.FieldAccessor;
@@ -46,7 +46,7 @@
             try {
                 throw new ParseException(
                         "Need an alias for the enclosed expression:\n" + SqlppFormatPrintUtil.toString(expr));
-            } catch (AsterixException e) {
+            } catch (CompilationException e) {
                 LOGGER.error(e.getLocalizedMessage(), e);
                 throw new ParseException(e.getLocalizedMessage());
             }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
index b7d3d62..8f04980 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
@@ -23,7 +23,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.expression.CallExpr;
@@ -58,7 +58,7 @@
      * @return true if the function signature is a SQL-92 core aggregate,
      *         false otherwise.
      */
-    public static boolean isSql92AggregateFunction(FunctionSignature signature) throws AsterixException {
+    public static boolean isSql92AggregateFunction(FunctionSignature signature) throws CompilationException {
         IFunctionInfo finfo = FunctionUtil.getFunctionInfo(new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
                 signature.getName().toLowerCase(), signature.getArity()));
         if (finfo == null) {
@@ -98,9 +98,9 @@
      * @param fs,
      *            the SQL-92 aggregate function signature.
      * @return the SQL++ aggregate function signature.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static FunctionSignature sql92ToCoreAggregateFunction(FunctionSignature fs) throws AsterixException {
+    public static FunctionSignature sql92ToCoreAggregateFunction(FunctionSignature fs) throws CompilationException {
         if (!isSql92AggregateFunction(fs)) {
             return fs;
         }
@@ -116,11 +116,11 @@
      * @return the system internal function.
      */
     public static FunctionSignature normalizeBuiltinFunctionSignature(FunctionSignature fs, boolean checkSql92Aggregate)
-            throws AsterixException {
+            throws CompilationException {
         if (isCoreAggregateFunction(fs)) {
             return internalizeCoreAggregateFunctionName(fs);
         } else if (checkSql92Aggregate && isSql92AggregateFunction(fs)) {
-            throw new AsterixException(fs.getName()
+            throw new CompilationException(fs.getName()
                     + " is a SQL-92 aggregate function. The SQL++ core aggregate function " + CORE_SQL_AGGREGATE_PREFIX
                     + fs.getName().toLowerCase() + " could potentially express the intent.");
         }
@@ -153,10 +153,10 @@
      * @param fs,
      *            a user-facing SQL++ core aggregate function signature.
      * @return the AsterixDB internal function signature for the aggregate function.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     private static FunctionSignature internalizeCoreAggregateFunctionName(FunctionSignature fs)
-            throws AsterixException {
+            throws CompilationException {
         String name = fs.getName().toLowerCase();
         boolean coreAgg = name.startsWith(CORE_AGGREGATE_PREFIX);
         String lowerCaseName = coreAgg ? name.substring(CORE_AGGREGATE_PREFIX.length())
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppAstPrintUtil.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppAstPrintUtil.java
index 0d840cd..ef8c4f5 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppAstPrintUtil.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppAstPrintUtil.java
@@ -23,7 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.IAstPrintVisitorFactory;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.base.Statement;
@@ -45,9 +45,9 @@
      *            the language expression.
      * @param output
      *            a writer for printing strings.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static void print(ILangExpression expr, PrintWriter output) throws AsterixException {
+    public static void print(ILangExpression expr, PrintWriter output) throws CompilationException {
         QueryPrintVisitor visitor = astPrintVisitorFactory.createLangVisitor(output);
         expr.accept(visitor, 0);
         output.flush();
@@ -60,9 +60,9 @@
      *            a list of statements of a query
      * @param output
      *            a writer for printing strings.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static void print(List<Statement> statements, PrintWriter output) throws AsterixException {
+    public static void print(List<Statement> statements, PrintWriter output) throws CompilationException {
         QueryPrintVisitor visitor = astPrintVisitorFactory.createLangVisitor(output);
         for (Statement statement : statements) {
             statement.accept(visitor, 0);
@@ -74,9 +74,9 @@
      * @param expr
      *            a language expression.
      * @return the AST of a language expression.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static String toString(ILangExpression expr) throws AsterixException {
+    public static String toString(ILangExpression expr) throws CompilationException {
         List<ILangExpression> exprs = new ArrayList<>();
         exprs.add(expr);
         return toString(exprs);
@@ -86,9 +86,9 @@
      * @param exprs
      *            a list of language expression.
      * @return an AST of the input language expressions.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static String toString(List<ILangExpression> exprs) throws AsterixException {
+    public static String toString(List<ILangExpression> exprs) throws CompilationException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         PrintWriter output = new PrintWriter(bos);
         QueryPrintVisitor visitor = astPrintVisitorFactory.createLangVisitor(output);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppFormatPrintUtil.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppFormatPrintUtil.java
index 2c8f582..6cfaeef 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppFormatPrintUtil.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppFormatPrintUtil.java
@@ -23,7 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.sqlpp.visitor.SqlppFormatPrintVisitor;
@@ -41,9 +41,9 @@
      *            the language expression.
      * @param output
      *            a writer for printing strings.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static void print(ILangExpression expr, PrintWriter output) throws AsterixException {
+    public static void print(ILangExpression expr, PrintWriter output) throws CompilationException {
         SqlppFormatPrintVisitor visitor = new SqlppFormatPrintVisitor(output);
         expr.accept(visitor, 0);
     }
@@ -55,9 +55,9 @@
      *            a list of statements of a query
      * @param output
      *            a writer for printing strings.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static void print(List<Statement> statements, PrintWriter output) throws AsterixException {
+    public static void print(List<Statement> statements, PrintWriter output) throws CompilationException {
         SqlppFormatPrintVisitor visitor = new SqlppFormatPrintVisitor(output);
         for (Statement statement : statements) {
             statement.accept(visitor, 0);
@@ -68,9 +68,9 @@
      * @param expr
      *            a language expression.
      * @return a formatted string of a language expression.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static String toString(ILangExpression expr) throws AsterixException {
+    public static String toString(ILangExpression expr) throws CompilationException {
         List<ILangExpression> exprs = new ArrayList<>();
         exprs.add(expr);
         return toString(exprs);
@@ -80,9 +80,9 @@
      * @param exprs
      *            a list of language expression.
      * @return a formatted string of the input language expressions.
-     * @throws AsterixException
+     * @throws CompilationException
      */
-    public static String toString(List<ILangExpression> exprs) throws AsterixException {
+    public static String toString(List<ILangExpression> exprs) throws CompilationException {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         PrintWriter output = new PrintWriter(bos);
         SqlppFormatPrintVisitor visitor = new SqlppFormatPrintVisitor(output);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
index 519963a..a066110 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
@@ -23,7 +23,7 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.expression.VariableExpr;
@@ -43,19 +43,19 @@
     // Applying sugar rewriting for group-by.
     public static Expression rewriteExpressionUsingGroupVariable(VariableExpr groupVar,
             Collection<VariableExpr> fieldVars, ILangExpression expr,
-            LangRewritingContext context) throws AsterixException {
+            LangRewritingContext context) throws CompilationException {
         SqlppGroupBySugarVisitor visitor = new SqlppGroupBySugarVisitor(context, groupVar, fieldVars);
         return expr.accept(visitor, null);
     }
 
-    public static Set<VariableExpr> getFreeVariable(Expression expr) throws AsterixException {
+    public static Set<VariableExpr> getFreeVariable(Expression expr) throws CompilationException {
         Set<VariableExpr> vars = new HashSet<>();
         FreeVariableVisitor visitor = new FreeVariableVisitor();
         expr.accept(visitor, vars);
         return vars;
     }
 
-    public static ILangExpression deepCopy(ILangExpression expr) throws AsterixException {
+    public static ILangExpression deepCopy(ILangExpression expr) throws CompilationException {
         if (expr == null) {
             return expr;
         }
@@ -64,7 +64,7 @@
     }
 
     // Checks if an ILangExpression contains a subquery.
-    public static boolean constainsSubquery(ILangExpression expr) throws AsterixException {
+    public static boolean constainsSubquery(ILangExpression expr) throws CompilationException {
         if (expr == null) {
             return false;
         }
@@ -83,10 +83,10 @@
      * @return an expression, where sub-expressions of the input expression (including the input expression itself)
      *         are replaced with deep copies with their mapped replacements in the exprMap if there exists such a
      *         replacement expression.
-     * @throws AsterixException
+     * @throws CompilationException
      */
     public static Expression substituteExpression(Expression expression, Map<Expression, Expression> exprMap,
-            LangRewritingContext context) throws AsterixException {
+            LangRewritingContext context) throws CompilationException {
         if (exprMap.isEmpty()) {
             return expression;
         }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppVariableUtil.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppVariableUtil.java
index 5352804..2d6ac53 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppVariableUtil.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppVariableUtil.java
@@ -26,7 +26,7 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
@@ -101,7 +101,7 @@
         return new VarIdentifier(USER_VAR_PREFIX + idName);
     }
 
-    public static Collection<VariableExpr> getFreeVariables(ILangExpression langExpr) throws AsterixException {
+    public static Collection<VariableExpr> getFreeVariables(ILangExpression langExpr) throws CompilationException {
         Collection<VariableExpr> freeVars = new HashSet<>();
         FreeVariableVisitor visitor = new FreeVariableVisitor();
         langExpr.accept(visitor, freeVars);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckDatasetOnlyResolutionVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckDatasetOnlyResolutionVisitor.java
index 05b1018..cab7b5b 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckDatasetOnlyResolutionVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckDatasetOnlyResolutionVisitor.java
@@ -19,7 +19,7 @@
 
 package org.apache.asterix.lang.sqlpp.visitor;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
@@ -64,57 +64,57 @@
 public class CheckDatasetOnlyResolutionVisitor extends AbstractSqlppQueryExpressionVisitor<Boolean, ILangExpression> {
 
     @Override
-    public Boolean visit(Query q, ILangExpression expr) throws AsterixException {
+    public Boolean visit(Query q, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FunctionDecl fd, ILangExpression expr) throws AsterixException {
+    public Boolean visit(FunctionDecl fd, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(LiteralExpr l, ILangExpression expr) throws AsterixException {
+    public Boolean visit(LiteralExpr l, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(VariableExpr v, ILangExpression expr) throws AsterixException {
+    public Boolean visit(VariableExpr v, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(ListConstructor lc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(ListConstructor lc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(RecordConstructor rc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(RecordConstructor rc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(OperatorExpr ifbo, ILangExpression expr) throws AsterixException {
+    public Boolean visit(OperatorExpr ifbo, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FieldAccessor fa, ILangExpression expr) throws AsterixException {
+    public Boolean visit(FieldAccessor fa, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(IndexAccessor ia, ILangExpression expr) throws AsterixException {
+    public Boolean visit(IndexAccessor ia, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(IfExpr ifexpr, ILangExpression expr) throws AsterixException {
+    public Boolean visit(IfExpr ifexpr, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(QuantifiedExpression qe, ILangExpression expr) throws AsterixException {
+    public Boolean visit(QuantifiedExpression qe, ILangExpression expr) throws CompilationException {
         for (QuantifiedPair qp : qe.getQuantifiedList()) {
             // If the target reference of undefined variable is a binding expression in a quantified pair,
             // then we only resolve it to dataset.
@@ -126,112 +126,112 @@
     }
 
     @Override
-    public Boolean visit(UnaryExpr u, ILangExpression expr) throws AsterixException {
+    public Boolean visit(UnaryExpr u, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(CallExpr pf, ILangExpression expr) throws AsterixException {
+    public Boolean visit(CallExpr pf, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(LetClause lc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(LetClause lc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(WhereClause wc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(WhereClause wc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(OrderbyClause oc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(OrderbyClause oc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(GroupbyClause gc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(GroupbyClause gc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(LimitClause lc, ILangExpression expr) throws AsterixException {
+    public Boolean visit(LimitClause lc, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FromClause fromClause, ILangExpression expr) throws AsterixException {
+    public Boolean visit(FromClause fromClause, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FromTerm fromTerm, ILangExpression expr) throws AsterixException {
+    public Boolean visit(FromTerm fromTerm, ILangExpression expr) throws CompilationException {
         return expr == fromTerm.getLeftExpression();
     }
 
     @Override
-    public Boolean visit(JoinClause joinClause, ILangExpression expr) throws AsterixException {
+    public Boolean visit(JoinClause joinClause, ILangExpression expr) throws CompilationException {
         return expr == joinClause.getRightExpression();
     }
 
     @Override
-    public Boolean visit(NestClause nestClause, ILangExpression expr) throws AsterixException {
+    public Boolean visit(NestClause nestClause, ILangExpression expr) throws CompilationException {
         return expr == nestClause.getRightExpression();
     }
 
     @Override
-    public Boolean visit(Projection projection, ILangExpression expr) throws AsterixException {
+    public Boolean visit(Projection projection, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectBlock selectBlock, ILangExpression expr) throws AsterixException {
+    public Boolean visit(SelectBlock selectBlock, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectClause selectClause, ILangExpression expr) throws AsterixException {
+    public Boolean visit(SelectClause selectClause, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectElement selectElement, ILangExpression expr) throws AsterixException {
+    public Boolean visit(SelectElement selectElement, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectRegular selectRegular, ILangExpression expr) throws AsterixException {
+    public Boolean visit(SelectRegular selectRegular, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectSetOperation selectSetOperation, ILangExpression expr) throws AsterixException {
+    public Boolean visit(SelectSetOperation selectSetOperation, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectExpression selectStatement, ILangExpression expr) throws AsterixException {
+    public Boolean visit(SelectExpression selectStatement, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(UnnestClause unnestClause, ILangExpression expr) throws AsterixException {
+    public Boolean visit(UnnestClause unnestClause, ILangExpression expr) throws CompilationException {
         return expr == unnestClause.getRightExpression();
     }
 
     @Override
-    public Boolean visit(HavingClause havingClause, ILangExpression expr) throws AsterixException {
+    public Boolean visit(HavingClause havingClause, ILangExpression expr) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(IndependentSubquery independentSubquery, ILangExpression arg) throws AsterixException {
+    public Boolean visit(IndependentSubquery independentSubquery, ILangExpression arg) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(CaseExpression caseExpr, ILangExpression arg) throws AsterixException {
+    public Boolean visit(CaseExpression caseExpr, ILangExpression arg) throws CompilationException {
         return false;
     }
 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSql92AggregateVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSql92AggregateVisitor.java
index ca25775..1fd110c 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSql92AggregateVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSql92AggregateVisitor.java
@@ -20,7 +20,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -67,32 +67,32 @@
 public class CheckSql92AggregateVisitor extends AbstractSqlppQueryExpressionVisitor<Boolean, ILangExpression> {
 
     @Override
-    public Boolean visit(Query q, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(Query q, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FunctionDecl fd, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(FunctionDecl fd, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(LiteralExpr l, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(LiteralExpr l, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(VariableExpr v, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(VariableExpr v, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(ListConstructor lc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(ListConstructor lc, ILangExpression parentSelectBlock) throws CompilationException {
         return visitExprList(lc.getExprList(), parentSelectBlock);
     }
 
     @Override
-    public Boolean visit(RecordConstructor rc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(RecordConstructor rc, ILangExpression parentSelectBlock) throws CompilationException {
         for (FieldBinding fieldBinding : rc.getFbList()) {
             ILangExpression leftExpr = fieldBinding.getLeftExpr();
             ILangExpression rightExpr = fieldBinding.getRightExpr();
@@ -107,22 +107,22 @@
     }
 
     @Override
-    public Boolean visit(OperatorExpr ifbo, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(OperatorExpr ifbo, ILangExpression parentSelectBlock) throws CompilationException {
         return visitExprList(ifbo.getExprList(), parentSelectBlock);
     }
 
     @Override
-    public Boolean visit(FieldAccessor fa, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(FieldAccessor fa, ILangExpression parentSelectBlock) throws CompilationException {
         return fa.getExpr().accept(this, parentSelectBlock);
     }
 
     @Override
-    public Boolean visit(IndexAccessor ia, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(IndexAccessor ia, ILangExpression parentSelectBlock) throws CompilationException {
         return ia.getExpr().accept(this, parentSelectBlock);
     }
 
     @Override
-    public Boolean visit(IfExpr ifexpr, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(IfExpr ifexpr, ILangExpression parentSelectBlock) throws CompilationException {
         if (ifexpr.getCondExpr().accept(this, parentSelectBlock)) {
             return true;
         } else {
@@ -132,17 +132,17 @@
     }
 
     @Override
-    public Boolean visit(QuantifiedExpression qe, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(QuantifiedExpression qe, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(UnaryExpr u, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(UnaryExpr u, ILangExpression parentSelectBlock) throws CompilationException {
         return u.getExpr().accept(this, parentSelectBlock);
     }
 
     @Override
-    public Boolean visit(CallExpr pf, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(CallExpr pf, ILangExpression parentSelectBlock) throws CompilationException {
         FunctionSignature fs = pf.getFunctionSignature();
         if (FunctionMapUtil.isSql92AggregateFunction(fs)) {
             return true;
@@ -156,52 +156,52 @@
     }
 
     @Override
-    public Boolean visit(LetClause lc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(LetClause lc, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(WhereClause wc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(WhereClause wc, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(OrderbyClause oc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(OrderbyClause oc, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(GroupbyClause gc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(GroupbyClause gc, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(LimitClause lc, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(LimitClause lc, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FromClause fromClause, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(FromClause fromClause, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(FromTerm fromTerm, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(FromTerm fromTerm, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(JoinClause joinClause, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(JoinClause joinClause, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(NestClause nestClause, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(NestClause nestClause, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(Projection projection, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(Projection projection, ILangExpression parentSelectBlock) throws CompilationException {
         if (projection.star()) {
             return false;
         }
@@ -209,12 +209,12 @@
     }
 
     @Override
-    public Boolean visit(SelectBlock selectBlock, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(SelectBlock selectBlock, ILangExpression parentSelectBlock) throws CompilationException {
         return selectBlock.getSelectClause().accept(this, selectBlock);
     }
 
     @Override
-    public Boolean visit(SelectClause selectClause, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(SelectClause selectClause, ILangExpression parentSelectBlock) throws CompilationException {
         if (selectClause.selectElement()) {
             return selectClause.getSelectElement().accept(this, parentSelectBlock);
         } else {
@@ -223,12 +223,12 @@
     }
 
     @Override
-    public Boolean visit(SelectElement selectElement, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(SelectElement selectElement, ILangExpression parentSelectBlock) throws CompilationException {
         return selectElement.getExpression().accept(this, parentSelectBlock);
     }
 
     @Override
-    public Boolean visit(SelectRegular selectRegular, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(SelectRegular selectRegular, ILangExpression parentSelectBlock) throws CompilationException {
         for (Projection projection : selectRegular.getProjections()) {
             if (projection.accept(this, parentSelectBlock)) {
                 return true;
@@ -239,26 +239,28 @@
 
     @Override
     public Boolean visit(SelectSetOperation selectSetOperation, ILangExpression parentSelectBlock)
-            throws AsterixException {
+            throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(SelectExpression selectStatement, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(SelectExpression selectStatement, ILangExpression parentSelectBlock)
+            throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(UnnestClause unnestClause, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(UnnestClause unnestClause, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(HavingClause havingClause, ILangExpression parentSelectBlock) throws AsterixException {
+    public Boolean visit(HavingClause havingClause, ILangExpression parentSelectBlock) throws CompilationException {
         return false;
     }
 
-    private Boolean visitExprList(List<Expression> exprs, ILangExpression parentSelectBlock) throws AsterixException {
+    private Boolean visitExprList(List<Expression> exprs, ILangExpression parentSelectBlock)
+            throws CompilationException {
         for (Expression item : exprs) {
             if (item.accept(this, parentSelectBlock)) {
                 return true;
@@ -268,12 +270,12 @@
     }
 
     @Override
-    public Boolean visit(IndependentSubquery independentSubquery, ILangExpression arg) throws AsterixException {
+    public Boolean visit(IndependentSubquery independentSubquery, ILangExpression arg) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(CaseExpression caseExpr, ILangExpression arg) throws AsterixException {
+    public Boolean visit(CaseExpression caseExpr, ILangExpression arg) throws CompilationException {
         return caseExpr.getConditionExpr().accept(this, arg) || visitExprList(caseExpr.getWhenExprs(), arg)
                 || visitExprList(caseExpr.getThenExprs(), arg) || caseExpr.getElseExpr().accept(this, arg);
     }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSubqueryVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSubqueryVisitor.java
index e772df5..7f93b2f 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSubqueryVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/CheckSubqueryVisitor.java
@@ -21,7 +21,7 @@
 
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -72,7 +72,7 @@
 public class CheckSubqueryVisitor extends AbstractSqlppQueryExpressionVisitor<Boolean, ILangExpression> {
 
     @Override
-    public Boolean visit(FromClause fromClause, ILangExpression arg) throws AsterixException {
+    public Boolean visit(FromClause fromClause, ILangExpression arg) throws CompilationException {
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
             if (fromTerm.accept(this, arg)) {
                 return false;
@@ -82,7 +82,7 @@
     }
 
     @Override
-    public Boolean visit(FromTerm fromTerm, ILangExpression arg) throws AsterixException {
+    public Boolean visit(FromTerm fromTerm, ILangExpression arg) throws CompilationException {
         if (visit(fromTerm.getLeftExpression(), arg)) {
             return true;
         }
@@ -95,17 +95,17 @@
     }
 
     @Override
-    public Boolean visit(JoinClause joinClause, ILangExpression arg) throws AsterixException {
+    public Boolean visit(JoinClause joinClause, ILangExpression arg) throws CompilationException {
         return visit(joinClause.getRightExpression(), arg) || visit(joinClause.getConditionExpression(), arg);
     }
 
     @Override
-    public Boolean visit(NestClause nestClause, ILangExpression arg) throws AsterixException {
+    public Boolean visit(NestClause nestClause, ILangExpression arg) throws CompilationException {
         return nestClause.accept(this, arg);
     }
 
     @Override
-    public Boolean visit(Projection projection, ILangExpression arg) throws AsterixException {
+    public Boolean visit(Projection projection, ILangExpression arg) throws CompilationException {
         if (projection.star()) {
             return false;
         }
@@ -113,7 +113,7 @@
     }
 
     @Override
-    public Boolean visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Boolean visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         boolean hasSubquery = visit(selectBlock.getFromClause(), arg) || visit(selectBlock.getGroupbyClause(), arg)
                 || visit(selectBlock.getHavingClause(), arg) || visit(selectBlock.getWhereClause(), arg);
         return hasSubquery || visit(selectBlock.getSelectClause(), arg) || visit(selectBlock.getLetList(), arg)
@@ -121,22 +121,22 @@
     }
 
     @Override
-    public Boolean visit(SelectClause selectClause, ILangExpression arg) throws AsterixException {
+    public Boolean visit(SelectClause selectClause, ILangExpression arg) throws CompilationException {
         return visit(selectClause.getSelectElement(), arg) || visit(selectClause.getSelectRegular(), arg);
     }
 
     @Override
-    public Boolean visit(SelectElement selectElement, ILangExpression arg) throws AsterixException {
+    public Boolean visit(SelectElement selectElement, ILangExpression arg) throws CompilationException {
         return visit(selectElement.getExpression(), arg);
     }
 
     @Override
-    public Boolean visit(SelectRegular selectRegular, ILangExpression arg) throws AsterixException {
+    public Boolean visit(SelectRegular selectRegular, ILangExpression arg) throws CompilationException {
         return visit(selectRegular.getProjections(), arg);
     }
 
     @Override
-    public Boolean visit(SelectSetOperation selectSetOperation, ILangExpression arg) throws AsterixException {
+    public Boolean visit(SelectSetOperation selectSetOperation, ILangExpression arg) throws CompilationException {
         if (selectSetOperation.getLeftInput().accept(this, arg)) {
             return true;
         }
@@ -149,7 +149,7 @@
     }
 
     @Override
-    public Boolean visit(SelectExpression selectStatement, ILangExpression arg) throws AsterixException {
+    public Boolean visit(SelectExpression selectStatement, ILangExpression arg) throws CompilationException {
         if (selectStatement.isSubquery()) {
             return true;
         }
@@ -159,53 +159,53 @@
     }
 
     @Override
-    public Boolean visit(UnnestClause unnestClause, ILangExpression arg) throws AsterixException {
+    public Boolean visit(UnnestClause unnestClause, ILangExpression arg) throws CompilationException {
         return visit(unnestClause.getRightExpression(), arg);
     }
 
     @Override
-    public Boolean visit(HavingClause havingClause, ILangExpression arg) throws AsterixException {
+    public Boolean visit(HavingClause havingClause, ILangExpression arg) throws CompilationException {
         return visit(havingClause.getFilterExpression(), arg);
     }
 
     @Override
-    public Boolean visit(IndependentSubquery independentSubquery, ILangExpression arg) throws AsterixException {
+    public Boolean visit(IndependentSubquery independentSubquery, ILangExpression arg) throws CompilationException {
         return visit(independentSubquery.getExpr(), arg);
     }
 
     @Override
-    public Boolean visit(CaseExpression caseExpression, ILangExpression arg) throws AsterixException {
+    public Boolean visit(CaseExpression caseExpression, ILangExpression arg) throws CompilationException {
         return visit(caseExpression.getConditionExpr(), arg) || visit(caseExpression.getWhenExprs(), arg)
                 || visit(caseExpression.getThenExprs(), arg) || visit(caseExpression.getElseExpr(), arg);
     }
 
     @Override
-    public Boolean visit(Query q, ILangExpression arg) throws AsterixException {
+    public Boolean visit(Query q, ILangExpression arg) throws CompilationException {
         return visit(q.getBody(), arg);
     }
 
     @Override
-    public Boolean visit(FunctionDecl fd, ILangExpression arg) throws AsterixException {
+    public Boolean visit(FunctionDecl fd, ILangExpression arg) throws CompilationException {
         return fd.getFuncBody().accept(this, arg);
     }
 
     @Override
-    public Boolean visit(LiteralExpr l, ILangExpression arg) throws AsterixException {
+    public Boolean visit(LiteralExpr l, ILangExpression arg) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(VariableExpr v, ILangExpression arg) throws AsterixException {
+    public Boolean visit(VariableExpr v, ILangExpression arg) throws CompilationException {
         return false;
     }
 
     @Override
-    public Boolean visit(ListConstructor lc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(ListConstructor lc, ILangExpression arg) throws CompilationException {
         return visit(lc.getExprList(), arg);
     }
 
     @Override
-    public Boolean visit(RecordConstructor rc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(RecordConstructor rc, ILangExpression arg) throws CompilationException {
         for (FieldBinding fb : rc.getFbList()) {
             if (visit(fb.getLeftExpr(), arg)) {
                 return true;
@@ -218,27 +218,27 @@
     }
 
     @Override
-    public Boolean visit(OperatorExpr operatorExpr, ILangExpression arg) throws AsterixException {
+    public Boolean visit(OperatorExpr operatorExpr, ILangExpression arg) throws CompilationException {
         return visit(operatorExpr.getExprList(), arg);
     }
 
     @Override
-    public Boolean visit(FieldAccessor fa, ILangExpression arg) throws AsterixException {
+    public Boolean visit(FieldAccessor fa, ILangExpression arg) throws CompilationException {
         return visit(fa.getExpr(), arg);
     }
 
     @Override
-    public Boolean visit(IndexAccessor ia, ILangExpression arg) throws AsterixException {
+    public Boolean visit(IndexAccessor ia, ILangExpression arg) throws CompilationException {
         return visit(ia.getExpr(), arg) || visit(ia.getIndexExpr(), arg);
     }
 
     @Override
-    public Boolean visit(IfExpr ifexpr, ILangExpression arg) throws AsterixException {
+    public Boolean visit(IfExpr ifexpr, ILangExpression arg) throws CompilationException {
         return visit(ifexpr.getCondExpr(), arg) || visit(ifexpr.getThenExpr(), arg) || visit(ifexpr.getElseExpr(), arg);
     }
 
     @Override
-    public Boolean visit(QuantifiedExpression qe, ILangExpression arg) throws AsterixException {
+    public Boolean visit(QuantifiedExpression qe, ILangExpression arg) throws CompilationException {
         for (QuantifiedPair qf : qe.getQuantifiedList()) {
             if (visit(qf.getExpr(), arg)) {
                 return true;
@@ -248,22 +248,22 @@
     }
 
     @Override
-    public Boolean visit(LetClause lc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(LetClause lc, ILangExpression arg) throws CompilationException {
         return visit(lc.getBindingExpr(), arg);
     }
 
     @Override
-    public Boolean visit(WhereClause wc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(WhereClause wc, ILangExpression arg) throws CompilationException {
         return visit(wc.getWhereExpr(), arg);
     }
 
     @Override
-    public Boolean visit(OrderbyClause oc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(OrderbyClause oc, ILangExpression arg) throws CompilationException {
         return visit(oc.getOrderbyList(), arg);
     }
 
     @Override
-    public Boolean visit(GroupbyClause gc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(GroupbyClause gc, ILangExpression arg) throws CompilationException {
         for (GbyVariableExpressionPair key : gc.getGbyPairList()) {
             if (visit(key.getExpr(), arg)) {
                 return true;
@@ -283,21 +283,21 @@
     }
 
     @Override
-    public Boolean visit(LimitClause lc, ILangExpression arg) throws AsterixException {
+    public Boolean visit(LimitClause lc, ILangExpression arg) throws CompilationException {
         return visit(lc.getLimitExpr(), arg) || visit(lc.getOffset(), arg);
     }
 
     @Override
-    public Boolean visit(UnaryExpr u, ILangExpression arg) throws AsterixException {
+    public Boolean visit(UnaryExpr u, ILangExpression arg) throws CompilationException {
         return visit(u.getExpr(), arg);
     }
 
     @Override
-    public Boolean visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Boolean visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         return visit(callExpr.getExprList(), arg);
     }
 
-    private boolean visit(List<?> langExprs, ILangExpression arg) throws AsterixException {
+    private boolean visit(List<?> langExprs, ILangExpression arg) throws CompilationException {
         for (Object o : langExprs) {
             ILangExpression langExpr = (ILangExpression) o;
             if (langExpr.accept(this, arg)) {
@@ -307,7 +307,7 @@
         return false;
     }
 
-    private boolean visit(ILangExpression langExpr, ILangExpression arg) throws AsterixException {
+    private boolean visit(ILangExpression langExpr, ILangExpression arg) throws CompilationException {
         if (langExpr == null) {
             return false;
         }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
index f6d3e7f..7c2a1747 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
@@ -24,7 +24,7 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -74,7 +74,7 @@
 public class DeepCopyVisitor extends AbstractSqlppQueryExpressionVisitor<ILangExpression, Void> {
 
     @Override
-    public FromClause visit(FromClause fromClause, Void arg) throws AsterixException {
+    public FromClause visit(FromClause fromClause, Void arg) throws CompilationException {
         List<FromTerm> fromTerms = new ArrayList<>();
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
             fromTerms.add((FromTerm) fromTerm.accept(this, arg));
@@ -83,7 +83,7 @@
     }
 
     @Override
-    public FromTerm visit(FromTerm fromTerm, Void arg) throws AsterixException {
+    public FromTerm visit(FromTerm fromTerm, Void arg) throws CompilationException {
         // Visit the left expression of a from term.
         Expression fromExpr = (Expression) fromTerm.getLeftExpression().accept(this, arg);
         VariableExpr fromVar = (VariableExpr) fromTerm.getLeftVariable().accept(this, arg);
@@ -99,7 +99,7 @@
     }
 
     @Override
-    public JoinClause visit(JoinClause joinClause, Void arg) throws AsterixException {
+    public JoinClause visit(JoinClause joinClause, Void arg) throws CompilationException {
         Expression rightExpression = (Expression) joinClause.getRightExpression().accept(this, arg);
         VariableExpr rightVar = (VariableExpr) joinClause.getRightVariable().accept(this, arg);
         VariableExpr rightPositionVar = joinClause.getPositionalVariable() == null ? null
@@ -110,7 +110,7 @@
     }
 
     @Override
-    public NestClause visit(NestClause nestClause, Void arg) throws AsterixException {
+    public NestClause visit(NestClause nestClause, Void arg) throws CompilationException {
         Expression rightExpression = (Expression) nestClause.getRightExpression().accept(this, arg);
         VariableExpr rightVar = (VariableExpr) nestClause.getRightVariable().accept(this, arg);
         VariableExpr rightPositionVar = nestClause.getPositionalVariable() == null ? null
@@ -121,7 +121,7 @@
     }
 
     @Override
-    public UnnestClause visit(UnnestClause unnestClause, Void arg) throws AsterixException {
+    public UnnestClause visit(UnnestClause unnestClause, Void arg) throws CompilationException {
         Expression rightExpression = (Expression) unnestClause.getRightExpression().accept(this, arg);
         VariableExpr rightVar = (VariableExpr) unnestClause.getRightVariable().accept(this, arg);
         VariableExpr rightPositionVar = unnestClause.getPositionalVariable() == null ? null
@@ -130,14 +130,14 @@
     }
 
     @Override
-    public Projection visit(Projection projection, Void arg) throws AsterixException {
+    public Projection visit(Projection projection, Void arg) throws CompilationException {
         return new Projection(projection.star() ? null : (Expression) projection.getExpression().accept(this, arg),
                 projection.getName(),
                 projection.star(), projection.exprStar());
     }
 
     @Override
-    public SelectBlock visit(SelectBlock selectBlock, Void arg) throws AsterixException {
+    public SelectBlock visit(SelectBlock selectBlock, Void arg) throws CompilationException {
         FromClause fromClause = null;
         List<LetClause> letClauses = new ArrayList<>();
         WhereClause whereClause = null;
@@ -177,7 +177,7 @@
     }
 
     @Override
-    public SelectClause visit(SelectClause selectClause, Void arg) throws AsterixException {
+    public SelectClause visit(SelectClause selectClause, Void arg) throws CompilationException {
         SelectElement selectElement = null;
         SelectRegular selectRegular = null;
         if (selectClause.selectElement()) {
@@ -190,12 +190,12 @@
     }
 
     @Override
-    public SelectElement visit(SelectElement selectElement, Void arg) throws AsterixException {
+    public SelectElement visit(SelectElement selectElement, Void arg) throws CompilationException {
         return new SelectElement((Expression) selectElement.getExpression().accept(this, arg));
     }
 
     @Override
-    public SelectRegular visit(SelectRegular selectRegular, Void arg) throws AsterixException {
+    public SelectRegular visit(SelectRegular selectRegular, Void arg) throws CompilationException {
         List<Projection> projections = new ArrayList<>();
         for (Projection projection : selectRegular.getProjections()) {
             projections.add((Projection) projection.accept(this, arg));
@@ -204,7 +204,7 @@
     }
 
     @Override
-    public SelectSetOperation visit(SelectSetOperation selectSetOperation, Void arg) throws AsterixException {
+    public SelectSetOperation visit(SelectSetOperation selectSetOperation, Void arg) throws CompilationException {
         SetOperationInput leftInput = selectSetOperation.getLeftInput();
         SetOperationInput newLeftInput;
         if (leftInput.selectBlock()) {
@@ -227,28 +227,28 @@
     }
 
     @Override
-    public HavingClause visit(HavingClause havingClause, Void arg) throws AsterixException {
+    public HavingClause visit(HavingClause havingClause, Void arg) throws CompilationException {
         return new HavingClause((Expression) havingClause.getFilterExpression().accept(this, arg));
     }
 
     @Override
-    public Query visit(Query q, Void arg) throws AsterixException {
+    public Query visit(Query q, Void arg) throws CompilationException {
         return new Query(q.isExplain(), q.isTopLevel(), (Expression) q.getBody().accept(this, arg), q.getVarCounter(),
                 q.getDataverses(), q.getDatasets());
     }
 
     @Override
-    public FunctionDecl visit(FunctionDecl fd, Void arg) throws AsterixException {
+    public FunctionDecl visit(FunctionDecl fd, Void arg) throws CompilationException {
         return new FunctionDecl(fd.getSignature(), fd.getParamList(), (Expression) fd.getFuncBody().accept(this, arg));
     }
 
     @Override
-    public WhereClause visit(WhereClause whereClause, Void arg) throws AsterixException {
+    public WhereClause visit(WhereClause whereClause, Void arg) throws CompilationException {
         return new WhereClause((Expression) whereClause.getWhereExpr().accept(this, arg));
     }
 
     @Override
-    public OrderbyClause visit(OrderbyClause oc, Void arg) throws AsterixException {
+    public OrderbyClause visit(OrderbyClause oc, Void arg) throws CompilationException {
         List<Expression> newOrderbyList = new ArrayList<>();
         for (Expression orderExpr : oc.getOrderbyList()) {
             newOrderbyList.add((Expression) orderExpr.accept(this, arg));
@@ -257,7 +257,7 @@
     }
 
     @Override
-    public GroupbyClause visit(GroupbyClause gc, Void arg) throws AsterixException {
+    public GroupbyClause visit(GroupbyClause gc, Void arg) throws CompilationException {
         List<GbyVariableExpressionPair> gbyPairList = new ArrayList<>();
         List<GbyVariableExpressionPair> decorPairList = new ArrayList<>();
         Map<Expression, VariableExpr> withVarMap = new HashMap<>();
@@ -288,20 +288,20 @@
     }
 
     @Override
-    public LimitClause visit(LimitClause limitClause, Void arg) throws AsterixException {
+    public LimitClause visit(LimitClause limitClause, Void arg) throws CompilationException {
         Expression limitExpr = (Expression) limitClause.getLimitExpr().accept(this, arg);
         Expression offsetExpr = limitClause.hasOffset() ? (Expression) limitClause.getOffset().accept(this, arg) : null;
         return new LimitClause(limitExpr, offsetExpr);
     }
 
     @Override
-    public LetClause visit(LetClause letClause, Void arg) throws AsterixException {
+    public LetClause visit(LetClause letClause, Void arg) throws CompilationException {
         return new LetClause((VariableExpr) letClause.getVarExpr().accept(this, arg),
                 (Expression) letClause.getBindingExpr().accept(this, arg));
     }
 
     @Override
-    public SelectExpression visit(SelectExpression selectExpression, Void arg) throws AsterixException {
+    public SelectExpression visit(SelectExpression selectExpression, Void arg) throws CompilationException {
         List<LetClause> lets = new ArrayList<>();
         SelectSetOperation select;
         OrderbyClause orderby = null;
@@ -334,17 +334,17 @@
     }
 
     @Override
-    public LiteralExpr visit(LiteralExpr l, Void arg) throws AsterixException {
+    public LiteralExpr visit(LiteralExpr l, Void arg) throws CompilationException {
         return l;
     }
 
     @Override
-    public ListConstructor visit(ListConstructor lc, Void arg) throws AsterixException {
+    public ListConstructor visit(ListConstructor lc, Void arg) throws CompilationException {
         return new ListConstructor(lc.getType(), copyExprList(lc.getExprList(), arg));
     }
 
     @Override
-    public RecordConstructor visit(RecordConstructor rc, Void arg) throws AsterixException {
+    public RecordConstructor visit(RecordConstructor rc, Void arg) throws CompilationException {
         List<FieldBinding> bindings = new ArrayList<>();
         for (FieldBinding binding : rc.getFbList()) {
             FieldBinding fb = new FieldBinding((Expression) binding.getLeftExpr().accept(this, arg),
@@ -355,13 +355,13 @@
     }
 
     @Override
-    public OperatorExpr visit(OperatorExpr operatorExpr, Void arg) throws AsterixException {
+    public OperatorExpr visit(OperatorExpr operatorExpr, Void arg) throws CompilationException {
         return new OperatorExpr(copyExprList(operatorExpr.getExprList(), arg), operatorExpr.getExprBroadcastIdx(),
                 operatorExpr.getOpList(), operatorExpr.isCurrentop());
     }
 
     @Override
-    public IfExpr visit(IfExpr ifExpr, Void arg) throws AsterixException {
+    public IfExpr visit(IfExpr ifExpr, Void arg) throws CompilationException {
         Expression conditionExpr = (Expression) ifExpr.getCondExpr().accept(this, arg);
         Expression thenExpr = (Expression) ifExpr.getThenExpr().accept(this, arg);
         Expression elseExpr = (Expression) ifExpr.getElseExpr().accept(this, arg);
@@ -369,7 +369,7 @@
     }
 
     @Override
-    public QuantifiedExpression visit(QuantifiedExpression qe, Void arg) throws AsterixException {
+    public QuantifiedExpression visit(QuantifiedExpression qe, Void arg) throws CompilationException {
         List<QuantifiedPair> quantifiedPairs = new ArrayList<>();
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
             Expression expr = (Expression) pair.getExpr().accept(this, arg);
@@ -381,7 +381,7 @@
     }
 
     @Override
-    public CallExpr visit(CallExpr callExpr, Void arg) throws AsterixException {
+    public CallExpr visit(CallExpr callExpr, Void arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : callExpr.getExprList()) {
             newExprList.add((Expression) expr.accept(this, arg));
@@ -390,24 +390,24 @@
     }
 
     @Override
-    public VariableExpr visit(VariableExpr varExpr, Void arg) throws AsterixException {
+    public VariableExpr visit(VariableExpr varExpr, Void arg) throws CompilationException {
         VariableExpr clonedVar = new VariableExpr(new VarIdentifier(varExpr.getVar()));
         clonedVar.setIsNewVar(varExpr.getIsNewVar());
         return clonedVar;
     }
 
     @Override
-    public UnaryExpr visit(UnaryExpr u, Void arg) throws AsterixException {
+    public UnaryExpr visit(UnaryExpr u, Void arg) throws CompilationException {
         return new UnaryExpr(u.getExprType(), (Expression) u.getExpr().accept(this, arg));
     }
 
     @Override
-    public FieldAccessor visit(FieldAccessor fa, Void arg) throws AsterixException {
+    public FieldAccessor visit(FieldAccessor fa, Void arg) throws CompilationException {
         return new FieldAccessor((Expression) fa.getExpr().accept(this, arg), fa.getIdent());
     }
 
     @Override
-    public Expression visit(IndexAccessor ia, Void arg) throws AsterixException {
+    public Expression visit(IndexAccessor ia, Void arg) throws CompilationException {
         Expression expr = (Expression) ia.getExpr().accept(this, arg);
         Expression indexExpr = null;
         if (ia.getIndexExpr() != null) {
@@ -417,12 +417,12 @@
     }
 
     @Override
-    public ILangExpression visit(IndependentSubquery independentSubquery, Void arg) throws AsterixException {
+    public ILangExpression visit(IndependentSubquery independentSubquery, Void arg) throws CompilationException {
         return new IndependentSubquery((Expression) independentSubquery.getExpr().accept(this, arg));
     }
 
     @Override
-    public ILangExpression visit(CaseExpression caseExpr, Void arg) throws AsterixException {
+    public ILangExpression visit(CaseExpression caseExpr, Void arg) throws CompilationException {
         Expression conditionExpr = (Expression) caseExpr.getConditionExpr().accept(this, arg);
         List<Expression> whenExprList = copyExprList(caseExpr.getWhenExprs(), arg);
         List<Expression> thenExprList = copyExprList(caseExpr.getThenExprs(), arg);
@@ -430,7 +430,7 @@
         return new CaseExpression(conditionExpr, whenExprList, thenExprList, elseExpr);
     }
 
-    private List<Expression> copyExprList(List<Expression> exprs, Void arg) throws AsterixException {
+    private List<Expression> copyExprList(List<Expression> exprs, Void arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : exprs) {
             newExprList.add((Expression) expr.accept(this, arg));
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/FreeVariableVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/FreeVariableVisitor.java
index 3a9bebf..e152b9b 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/FreeVariableVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/FreeVariableVisitor.java
@@ -22,9 +22,9 @@
 import java.util.HashSet;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Clause.ClauseType;
+import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.clause.LimitClause;
@@ -71,7 +71,7 @@
 public class FreeVariableVisitor extends AbstractSqlppQueryExpressionVisitor<Void, Collection<VariableExpr>> {
 
     @Override
-    public Void visit(FromClause fromClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(FromClause fromClause, Collection<VariableExpr> freeVars) throws CompilationException {
         Collection<VariableExpr> bindingVars = new HashSet<>();
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
             Collection<VariableExpr> fromTermFreeVars = new HashSet<>();
@@ -91,7 +91,7 @@
     }
 
     @Override
-    public Void visit(FromTerm fromTerm, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(FromTerm fromTerm, Collection<VariableExpr> freeVars) throws CompilationException {
         // The encountered binding variables so far in the fromterm.
         Collection<VariableExpr> bindingVariables = new HashSet<>();
 
@@ -125,25 +125,25 @@
     }
 
     @Override
-    public Void visit(JoinClause joinClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(JoinClause joinClause, Collection<VariableExpr> freeVars) throws CompilationException {
         visitJoinAndNest(joinClause, joinClause.getConditionExpression(), freeVars);
         return null;
     }
 
     @Override
-    public Void visit(NestClause nestClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(NestClause nestClause, Collection<VariableExpr> freeVars) throws CompilationException {
         visitJoinAndNest(nestClause, nestClause.getConditionExpression(), freeVars);
         return null;
     }
 
     @Override
-    public Void visit(UnnestClause unnestClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(UnnestClause unnestClause, Collection<VariableExpr> freeVars) throws CompilationException {
         unnestClause.getRightExpression().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(Projection projection, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(Projection projection, Collection<VariableExpr> freeVars) throws CompilationException {
         if (!projection.star()) {
             projection.getExpression().accept(this, freeVars);
         }
@@ -151,7 +151,7 @@
     }
 
     @Override
-    public Void visit(SelectBlock selectBlock, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(SelectBlock selectBlock, Collection<VariableExpr> freeVars) throws CompilationException {
         Collection<VariableExpr> selectFreeVars = new HashSet<>();
         Collection<VariableExpr> fromFreeVars = new HashSet<>();
         Collection<VariableExpr> letsFreeVars = new HashSet<>();
@@ -213,7 +213,7 @@
     }
 
     @Override
-    public Void visit(SelectClause selectClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(SelectClause selectClause, Collection<VariableExpr> freeVars) throws CompilationException {
         if (selectClause.selectElement()) {
             selectClause.getSelectElement().accept(this, freeVars);
         }
@@ -224,13 +224,13 @@
     }
 
     @Override
-    public Void visit(SelectElement selectElement, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(SelectElement selectElement, Collection<VariableExpr> freeVars) throws CompilationException {
         selectElement.getExpression().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(SelectRegular selectRegular, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(SelectRegular selectRegular, Collection<VariableExpr> freeVars) throws CompilationException {
         for (Projection projection : selectRegular.getProjections()) {
             projection.accept(this, freeVars);
         }
@@ -239,7 +239,7 @@
 
     @Override
     public Void visit(SelectSetOperation selectSetOperation, Collection<VariableExpr> freeVars)
-            throws AsterixException {
+            throws CompilationException {
         selectSetOperation.getLeftInput().accept(this, freeVars);
         for (SetOperationRight right : selectSetOperation.getRightInputs()) {
             right.getSetOperationRightInput().accept(this, freeVars);
@@ -248,37 +248,37 @@
     }
 
     @Override
-    public Void visit(HavingClause havingClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(HavingClause havingClause, Collection<VariableExpr> freeVars) throws CompilationException {
         havingClause.getFilterExpression().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(Query q, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(Query q, Collection<VariableExpr> freeVars) throws CompilationException {
         q.getBody().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(FunctionDecl fd, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(FunctionDecl fd, Collection<VariableExpr> freeVars) throws CompilationException {
         fd.getFuncBody().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(WhereClause whereClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(WhereClause whereClause, Collection<VariableExpr> freeVars) throws CompilationException {
         whereClause.getWhereExpr().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(OrderbyClause oc, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(OrderbyClause oc, Collection<VariableExpr> freeVars) throws CompilationException {
         visit(oc.getOrderbyList(), freeVars);
         return null;
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(GroupbyClause gc, Collection<VariableExpr> freeVars) throws CompilationException {
         // Puts all group-by variables into the symbol set of the new scope.
         for (GbyVariableExpressionPair gbyVarExpr : gc.getGbyPairList()) {
             gbyVarExpr.getExpr().accept(this, freeVars);
@@ -295,19 +295,20 @@
     }
 
     @Override
-    public Void visit(LimitClause limitClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(LimitClause limitClause, Collection<VariableExpr> freeVars) throws CompilationException {
         limitClause.getLimitExpr().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(LetClause letClause, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(LetClause letClause, Collection<VariableExpr> freeVars) throws CompilationException {
         letClause.getBindingExpr().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(SelectExpression selectExpression, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(SelectExpression selectExpression, Collection<VariableExpr> freeVars)
+            throws CompilationException {
         Collection<VariableExpr> letsFreeVars = new HashSet<>();
         Collection<VariableExpr> selectFreeVars = new HashSet<>();
         visitLetClauses(selectExpression.getLetList(), letsFreeVars);
@@ -335,18 +336,18 @@
     }
 
     @Override
-    public Void visit(LiteralExpr l, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(LiteralExpr l, Collection<VariableExpr> freeVars) throws CompilationException {
         return null;
     }
 
     @Override
-    public Void visit(ListConstructor lc, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(ListConstructor lc, Collection<VariableExpr> freeVars) throws CompilationException {
         visit(lc.getExprList(), freeVars);
         return null;
     }
 
     @Override
-    public Void visit(RecordConstructor rc, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(RecordConstructor rc, Collection<VariableExpr> freeVars) throws CompilationException {
         for (FieldBinding binding : rc.getFbList()) {
             binding.getLeftExpr().accept(this, freeVars);
             binding.getRightExpr().accept(this, freeVars);
@@ -355,13 +356,13 @@
     }
 
     @Override
-    public Void visit(OperatorExpr operatorExpr, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(OperatorExpr operatorExpr, Collection<VariableExpr> freeVars) throws CompilationException {
         visit(operatorExpr.getExprList(), freeVars);
         return null;
     }
 
     @Override
-    public Void visit(IfExpr ifExpr, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(IfExpr ifExpr, Collection<VariableExpr> freeVars) throws CompilationException {
         ifExpr.getCondExpr().accept(this, freeVars);
         ifExpr.getThenExpr().accept(this, freeVars);
         ifExpr.getElseExpr().accept(this, freeVars);
@@ -369,7 +370,7 @@
     }
 
     @Override
-    public Void visit(QuantifiedExpression qe, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(QuantifiedExpression qe, Collection<VariableExpr> freeVars) throws CompilationException {
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
             pair.getExpr().accept(this, freeVars);
         }
@@ -378,7 +379,7 @@
     }
 
     @Override
-    public Void visit(CallExpr callExpr, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(CallExpr callExpr, Collection<VariableExpr> freeVars) throws CompilationException {
         for (Expression expr : callExpr.getExprList()) {
             expr.accept(this, freeVars);
         }
@@ -386,25 +387,25 @@
     }
 
     @Override
-    public Void visit(VariableExpr varExpr, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(VariableExpr varExpr, Collection<VariableExpr> freeVars) throws CompilationException {
         freeVars.add(varExpr);
         return null;
     }
 
     @Override
-    public Void visit(UnaryExpr u, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(UnaryExpr u, Collection<VariableExpr> freeVars) throws CompilationException {
         u.getExpr().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(FieldAccessor fa, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(FieldAccessor fa, Collection<VariableExpr> freeVars) throws CompilationException {
         fa.getExpr().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(IndexAccessor ia, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(IndexAccessor ia, Collection<VariableExpr> freeVars) throws CompilationException {
         ia.getExpr().accept(this, freeVars);
         if (ia.getIndexExpr() != null) {
             ia.getIndexExpr();
@@ -414,13 +415,13 @@
 
     @Override
     public Void visit(IndependentSubquery independentSubquery, Collection<VariableExpr> freeVars)
-            throws AsterixException {
+            throws CompilationException {
         independentSubquery.getExpr().accept(this, freeVars);
         return null;
     }
 
     @Override
-    public Void visit(CaseExpression caseExpr, Collection<VariableExpr> freeVars) throws AsterixException {
+    public Void visit(CaseExpression caseExpr, Collection<VariableExpr> freeVars) throws CompilationException {
         caseExpr.getConditionExpr().accept(this, freeVars);
         visit(caseExpr.getWhenExprs(), freeVars);
         visit(caseExpr.getThenExprs(), freeVars);
@@ -429,7 +430,7 @@
     }
 
     private void visitLetClauses(List<LetClause> letClauses, Collection<VariableExpr> freeVars)
-            throws AsterixException {
+            throws CompilationException {
         if (letClauses == null || letClauses.isEmpty()) {
             return;
         }
@@ -448,7 +449,7 @@
     }
 
     private void visitJoinAndNest(AbstractBinaryCorrelateClause clause, Expression condition,
-            Collection<VariableExpr> freeVars) throws AsterixException {
+            Collection<VariableExpr> freeVars) throws CompilationException {
         clause.getRightExpression().accept(this, freeVars);
         Collection<VariableExpr> conditionFreeVars = new HashSet<>();
         condition.accept(this, freeVars);
@@ -461,7 +462,7 @@
         freeVars.addAll(conditionFreeVars);
     }
 
-    private void visit(List<Expression> exprs, Collection<VariableExpr> arg) throws AsterixException {
+    private void visit(List<Expression> exprs, Collection<VariableExpr> arg) throws CompilationException {
         for (Expression expr : exprs) {
             expr.accept(this, arg);
         }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
index 30caa4b..e52bee3 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
@@ -21,7 +21,7 @@
 import java.io.PrintWriter;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -67,7 +67,7 @@
     }
 
     @Override
-    public Void visit(FromClause fromClause, Integer step) throws AsterixException {
+    public Void visit(FromClause fromClause, Integer step) throws CompilationException {
         out.print(skip(step) + "FROM [");
         int index = 0;
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
@@ -82,7 +82,7 @@
     }
 
     @Override
-    public Void visit(FromTerm fromTerm, Integer step) throws AsterixException {
+    public Void visit(FromTerm fromTerm, Integer step) throws CompilationException {
         fromTerm.getLeftExpression().accept(this, step);
         out.print(skip(step) + "AS ");
         fromTerm.getLeftVariable().accept(this, 0);
@@ -99,7 +99,7 @@
     }
 
     @Override
-    public Void visit(JoinClause joinClause, Integer step) throws AsterixException {
+    public Void visit(JoinClause joinClause, Integer step) throws CompilationException {
         out.println(skip(step) + joinClause.getJoinType() + " JOIN");
         joinClause.getRightExpression().accept(this, step + 1);
         out.print(skip(step + 1) + "AS ");
@@ -114,7 +114,7 @@
     }
 
     @Override
-    public Void visit(NestClause nestClause, Integer step) throws AsterixException {
+    public Void visit(NestClause nestClause, Integer step) throws CompilationException {
         out.println(skip(step) + nestClause.getJoinType() + " NEST");
         nestClause.getRightExpression().accept(this, step + 1);
         out.print(skip(step + 1) + "AS ");
@@ -129,7 +129,7 @@
     }
 
     @Override
-    public Void visit(Projection projection, Integer step) throws AsterixException {
+    public Void visit(Projection projection, Integer step) throws CompilationException {
         if (projection.star()) {
             out.println(skip(step) + "*");
         } else {
@@ -140,7 +140,7 @@
     }
 
     @Override
-    public Void visit(SelectBlock selectBlock, Integer step) throws AsterixException {
+    public Void visit(SelectBlock selectBlock, Integer step) throws CompilationException {
         selectBlock.getSelectClause().accept(this, step);
         if (selectBlock.hasFromClause()) {
             selectBlock.getFromClause().accept(this, step);
@@ -168,7 +168,7 @@
     }
 
     @Override
-    public Void visit(SelectClause selectClause, Integer step) throws AsterixException {
+    public Void visit(SelectClause selectClause, Integer step) throws CompilationException {
         if (selectClause.selectRegular()) {
             selectClause.getSelectRegular().accept(this, step);
         }
@@ -179,7 +179,7 @@
     }
 
     @Override
-    public Void visit(SelectElement selectElement, Integer step) throws AsterixException {
+    public Void visit(SelectElement selectElement, Integer step) throws CompilationException {
         out.println(skip(step) + "SELECT ELEMENT [");
         selectElement.getExpression().accept(this, step);
         out.println(skip(step) + "]");
@@ -187,7 +187,7 @@
     }
 
     @Override
-    public Void visit(SelectRegular selectRegular, Integer step) throws AsterixException {
+    public Void visit(SelectRegular selectRegular, Integer step) throws CompilationException {
         out.println(skip(step) + "SELECT [");
         for (Projection projection : selectRegular.getProjections()) {
             projection.accept(this, step);
@@ -197,7 +197,7 @@
     }
 
     @Override
-    public Void visit(SelectSetOperation selectSetOperation, Integer step) throws AsterixException {
+    public Void visit(SelectSetOperation selectSetOperation, Integer step) throws CompilationException {
         selectSetOperation.getLeftInput().accept(this, step);
         if (selectSetOperation.hasRightInputs()) {
             for (SetOperationRight right : selectSetOperation.getRightInputs()) {
@@ -210,7 +210,7 @@
     }
 
     @Override
-    public Void visit(SelectExpression selectStatement, Integer step) throws AsterixException {
+    public Void visit(SelectExpression selectStatement, Integer step) throws CompilationException {
         if (selectStatement.isSubquery()) {
             out.println(skip(step) + "(");
         }
@@ -234,7 +234,7 @@
     }
 
     @Override
-    public Void visit(UnnestClause unnestClause, Integer step) throws AsterixException {
+    public Void visit(UnnestClause unnestClause, Integer step) throws CompilationException {
         out.println(skip(step) + unnestClause.getJoinType() + " UNNEST");
         unnestClause.getRightExpression().accept(this, step + 1);
         out.print(skip(step + 1) + " AS ");
@@ -247,14 +247,14 @@
     }
 
     @Override
-    public Void visit(HavingClause havingClause, Integer step) throws AsterixException {
+    public Void visit(HavingClause havingClause, Integer step) throws CompilationException {
         out.println(skip(step) + " HAVING");
         havingClause.getFilterExpression().accept(this, step + 1);
         return null;
     }
 
     @Override
-    public Void visit(CallExpr pf, Integer step) throws AsterixException {
+    public Void visit(CallExpr pf, Integer step) throws CompilationException {
         FunctionSignature functionSignature = pf.getFunctionSignature();
         FunctionSignature normalizedFunctionSignature =
                 FunctionMapUtil.normalizeBuiltinFunctionSignature(functionSignature, false);
@@ -270,7 +270,7 @@
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Integer step) throws AsterixException {
+    public Void visit(GroupbyClause gc, Integer step) throws CompilationException {
         if (gc.isGroupAll()) {
             out.println(skip(step) + "Group All");
             return null;
@@ -300,13 +300,13 @@
     }
 
     @Override
-    public Void visit(IndependentSubquery independentSubquery, Integer arg) throws AsterixException {
+    public Void visit(IndependentSubquery independentSubquery, Integer arg) throws CompilationException {
         independentSubquery.getExpr().accept(this, arg);
         return null;
     }
 
     @Override
-    public Void visit(CaseExpression caseExpr, Integer step) throws AsterixException {
+    public Void visit(CaseExpression caseExpr, Integer step) throws CompilationException {
         out.print(skip(step) + "CASE");
         caseExpr.getConditionExpr().accept(this, step + 2);
         out.println();
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
index 81aba54..9579741 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
@@ -21,10 +21,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
+import org.apache.asterix.lang.common.base.Clause.ClauseType;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
-import org.apache.asterix.lang.common.base.Clause.ClauseType;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
 import org.apache.asterix.lang.common.clause.LimitClause;
@@ -68,7 +68,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(FromClause fromClause,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         VariableSubstitutionEnvironment currentEnv = new VariableSubstitutionEnvironment(env);
         List<FromTerm> newFromTerms = new ArrayList<>();
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
@@ -83,7 +83,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(FromTerm fromTerm,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         VariableExpr leftVar = fromTerm.getLeftVariable();
         VariableExpr newLeftVar = generateNewVariable(context, leftVar);
         VariableExpr newLeftPosVar = fromTerm.hasPositionalVariable() ? generateNewVariable(context,
@@ -120,7 +120,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(JoinClause joinClause,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         VariableExpr rightVar = joinClause.getRightVariable();
         VariableExpr newRightVar = generateNewVariable(context, rightVar);
         VariableExpr newRightPosVar = joinClause.hasPositionalVariable() ? generateNewVariable(context,
@@ -145,7 +145,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(NestClause nestClause,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         VariableExpr rightVar = nestClause.getRightVariable();
         VariableExpr newRightVar = generateNewVariable(context, rightVar);
         VariableExpr newRightPosVar = nestClause.hasPositionalVariable() ? generateNewVariable(context,
@@ -170,7 +170,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(UnnestClause unnestClause,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         VariableExpr rightVar = unnestClause.getRightVariable();
         VariableExpr newRightVar = generateNewVariable(context, rightVar);
         VariableExpr newRightPosVar = unnestClause.hasPositionalVariable() ? generateNewVariable(context,
@@ -193,7 +193,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(Projection projection,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         if (projection.star()) {
             return new Pair<>(projection, env);
         }
@@ -204,7 +204,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(SelectBlock selectBlock,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> newFrom = null;
         Pair<ILangExpression, VariableSubstitutionEnvironment> newLet;
         Pair<ILangExpression, VariableSubstitutionEnvironment> newWhere = null;
@@ -262,7 +262,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(SelectClause selectClause,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         boolean distinct = selectClause.distinct();
         if (selectClause.selectElement()) {
             Pair<ILangExpression, VariableSubstitutionEnvironment> newSelectElement = selectClause.getSelectElement()
@@ -279,7 +279,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(SelectElement selectElement,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> newExpr = selectElement.getExpression()
                 .accept(this, env);
         return new Pair<>(new SelectElement((Expression) newExpr.first), newExpr.second);
@@ -287,7 +287,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(SelectRegular selectRegular,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         List<Projection> newProjections = new ArrayList<>();
         for (Projection projection : selectRegular.getProjections()) {
             newProjections.add((Projection) projection.accept(this, env).first);
@@ -297,7 +297,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(SelectSetOperation selectSetOperation,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         SetOperationInput leftInput = selectSetOperation.getLeftInput();
         SetOperationInput newLeftInput;
 
@@ -335,7 +335,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(SelectExpression selectExpression,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         boolean subquery = selectExpression.isSubquery();
         List<LetClause> newLetList = new ArrayList<>();
         SelectSetOperation newSelectSetOperation;
@@ -374,7 +374,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(HavingClause havingClause,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p = havingClause.getFilterExpression().accept(this, env);
         HavingClause newHavingClause = new HavingClause((Expression) p.first);
         return new Pair<>(newHavingClause, p.second);
@@ -382,7 +382,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(IndependentSubquery independentSubquery,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p = independentSubquery.getExpr().accept(this, env);
         IndependentSubquery newSubquery = new IndependentSubquery((Expression) p.first);
         return new Pair<>(newSubquery, p.second);
@@ -390,7 +390,7 @@
 
     @Override
     public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(CaseExpression caseExpr,
-            VariableSubstitutionEnvironment env) throws AsterixException {
+            VariableSubstitutionEnvironment env) throws CompilationException {
         Expression conditionExpr = (Expression) caseExpr.getConditionExpr().accept(this, env).first;
         List<Expression> whenExprList = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(caseExpr.getWhenExprs(),
                 env, this);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppFormatPrintVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppFormatPrintVisitor.java
index 1beba9b..a62a1cc 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppFormatPrintVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppFormatPrintVisitor.java
@@ -21,7 +21,7 @@
 import java.io.PrintWriter;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
 import org.apache.asterix.lang.common.clause.LetClause;
@@ -68,7 +68,7 @@
     }
 
     @Override
-    public Void visit(FromClause fromClause, Integer step) throws AsterixException {
+    public Void visit(FromClause fromClause, Integer step) throws CompilationException {
         out.print(skip(step) + "from ");
         int index = 0;
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
@@ -83,7 +83,7 @@
     }
 
     @Override
-    public Void visit(FromTerm fromTerm, Integer step) throws AsterixException {
+    public Void visit(FromTerm fromTerm, Integer step) throws CompilationException {
         fromTerm.getLeftExpression().accept(this, step + 2);
         out.print(" as ");
         fromTerm.getLeftVariable().accept(this, step + 2);
@@ -100,7 +100,7 @@
     }
 
     @Override
-    public Void visit(JoinClause joinClause, Integer step) throws AsterixException {
+    public Void visit(JoinClause joinClause, Integer step) throws CompilationException {
         out.print(joinClause.getJoinType());
         joinClause.getRightExpression().accept(this, step + 2);
         out.print(" as ");
@@ -114,7 +114,7 @@
     }
 
     @Override
-    public Void visit(NestClause nestClause, Integer step) throws AsterixException {
+    public Void visit(NestClause nestClause, Integer step) throws CompilationException {
         out.print(nestClause.getJoinType());
         nestClause.getRightExpression().accept(this, step + 2);
         out.println(skip(step + 1) + " as ");
@@ -128,7 +128,7 @@
     }
 
     @Override
-    public Void visit(Projection projection, Integer step) throws AsterixException {
+    public Void visit(Projection projection, Integer step) throws CompilationException {
         if (projection.star()) {
             out.print(" * ");
             return null;
@@ -142,7 +142,7 @@
     }
 
     @Override
-    public Void visit(SelectBlock selectBlock, Integer step) throws AsterixException {
+    public Void visit(SelectBlock selectBlock, Integer step) throws CompilationException {
         selectBlock.getSelectClause().accept(this, step);
         if (selectBlock.hasFromClause()) {
             selectBlock.getFromClause().accept(this, step);
@@ -170,7 +170,7 @@
     }
 
     @Override
-    public Void visit(SelectClause selectClause, Integer step) throws AsterixException {
+    public Void visit(SelectClause selectClause, Integer step) throws CompilationException {
         if (selectClause.selectRegular()) {
             selectClause.getSelectRegular().accept(this, step);
         }
@@ -182,14 +182,14 @@
     }
 
     @Override
-    public Void visit(SelectElement selectElement, Integer step) throws AsterixException {
+    public Void visit(SelectElement selectElement, Integer step) throws CompilationException {
         out.print("select element ");
         selectElement.getExpression().accept(this, step);
         return null;
     }
 
     @Override
-    public Void visit(SelectRegular selectRegular, Integer step) throws AsterixException {
+    public Void visit(SelectRegular selectRegular, Integer step) throws CompilationException {
         out.print("select ");
         int index = 0;
         for (Projection projection : selectRegular.getProjections()) {
@@ -203,7 +203,7 @@
     }
 
     @Override
-    public Void visit(SelectSetOperation selectSetOperation, Integer step) throws AsterixException {
+    public Void visit(SelectSetOperation selectSetOperation, Integer step) throws CompilationException {
         selectSetOperation.getLeftInput().accept(this, step);
         if (selectSetOperation.hasRightInputs()) {
             for (SetOperationRight right : selectSetOperation.getRightInputs()) {
@@ -216,7 +216,7 @@
     }
 
     @Override
-    public Void visit(SelectExpression selectStatement, Integer step) throws AsterixException {
+    public Void visit(SelectExpression selectStatement, Integer step) throws CompilationException {
         if (selectStatement.isSubquery()) {
             out.print("(");
         }
@@ -240,7 +240,7 @@
     }
 
     @Override
-    public Void visit(UnnestClause unnestClause, Integer step) throws AsterixException {
+    public Void visit(UnnestClause unnestClause, Integer step) throws CompilationException {
         out.print(unnestClause.getJoinType());
         unnestClause.getRightExpression().accept(this, step + 2);
         out.print(" as ");
@@ -253,7 +253,7 @@
     }
 
     @Override
-    public Void visit(HavingClause havingClause, Integer step) throws AsterixException {
+    public Void visit(HavingClause havingClause, Integer step) throws CompilationException {
         out.print(skip(step) + " having ");
         havingClause.getFilterExpression().accept(this, step + 2);
         out.println();
@@ -261,7 +261,7 @@
     }
 
     @Override
-    public Void visit(GroupbyClause gc, Integer step) throws AsterixException {
+    public Void visit(GroupbyClause gc, Integer step) throws CompilationException {
         if (gc.hasHashGroupByHint()) {
             out.println(skip(step) + "/* +hash */");
         }
@@ -272,7 +272,7 @@
     }
 
     @Override
-    public Void visit(InsertStatement insert, Integer step) throws AsterixException {
+    public Void visit(InsertStatement insert, Integer step) throws CompilationException {
         out.print(skip(step) + "insert into " + datasetSymbol
                 + generateFullName(insert.getDataverseName(), insert.getDatasetName()) + "\n");
         insert.getQuery().accept(this, step);
@@ -281,7 +281,7 @@
     }
 
     @Override
-    public Void visit(LetClause lc, Integer step) throws AsterixException {
+    public Void visit(LetClause lc, Integer step) throws CompilationException {
         out.print(skip(step) + "with ");
         Expression bindingExpr = lc.getBindingExpr();
         bindingExpr.accept(this, step + 2);
@@ -293,7 +293,7 @@
 
     @Override
     protected void printDelimitedGbyExpressions(List<GbyVariableExpressionPair> gbyList, int step)
-            throws AsterixException {
+            throws CompilationException {
         int gbySize = gbyList.size();
         int gbyIndex = 0;
         for (GbyVariableExpressionPair pair : gbyList) {
@@ -309,13 +309,13 @@
     }
 
     @Override
-    public Void visit(IndependentSubquery independentSubquery, Integer step) throws AsterixException {
+    public Void visit(IndependentSubquery independentSubquery, Integer step) throws CompilationException {
         independentSubquery.getExpr().accept(this, step);
         return null;
     }
 
     @Override
-    public Void visit(CaseExpression caseExpr, Integer step) throws AsterixException {
+    public Void visit(CaseExpression caseExpr, Integer step) throws CompilationException {
         out.print(skip(step) + "case ");
         caseExpr.getConditionExpr().accept(this, step + 2);
         out.println();
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteExpressionVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteExpressionVisitor.java
index 9b19d7c..39229e2 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteExpressionVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteExpressionVisitor.java
@@ -22,7 +22,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.context.Scope;
 import org.apache.asterix.lang.common.expression.VariableExpr;
@@ -49,7 +49,7 @@
     // An example is:
     // asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-expr-3/gby-expr-3.3.query.sqlpp
     @Override
-    protected Expression preVisit(Expression expr) throws AsterixException {
+    protected Expression preVisit(Expression expr) throws CompilationException {
         Expression mappedExpr = exprMap.get(expr);
         if (mappedExpr == null) {
             return expr;
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppAstVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppAstVisitor.java
index c0947f3..ec17484 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppAstVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppAstVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.sqlpp.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.AbstractAstVisitor;
 import org.apache.asterix.lang.sqlpp.clause.FromClause;
 import org.apache.asterix.lang.sqlpp.clause.FromTerm;
@@ -42,77 +42,77 @@
 public abstract class AbstractSqlppAstVisitor<R, T> extends AbstractAstVisitor<R, T> implements ISqlppVisitor<R, T> {
 
     @Override
-    public R visit(FromClause fromClause, T arg) throws AsterixException {
+    public R visit(FromClause fromClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(FromTerm fromTerm, T arg) throws AsterixException {
+    public R visit(FromTerm fromTerm, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(JoinClause joinClause, T arg) throws AsterixException {
+    public R visit(JoinClause joinClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(NestClause nestClause, T arg) throws AsterixException {
+    public R visit(NestClause nestClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(Projection projection, T arg) throws AsterixException {
+    public R visit(Projection projection, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SelectBlock selectBlock, T arg) throws AsterixException {
+    public R visit(SelectBlock selectBlock, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SelectClause selectClause, T arg) throws AsterixException {
+    public R visit(SelectClause selectClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SelectElement selectElement, T arg) throws AsterixException {
+    public R visit(SelectElement selectElement, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SelectRegular selectRegular, T arg) throws AsterixException {
+    public R visit(SelectRegular selectRegular, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SelectSetOperation selectSetOperation, T arg) throws AsterixException {
+    public R visit(SelectSetOperation selectSetOperation, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(SelectExpression selectStatement, T arg) throws AsterixException {
+    public R visit(SelectExpression selectStatement, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(UnnestClause unnestClause, T arg) throws AsterixException {
+    public R visit(UnnestClause unnestClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(HavingClause havingClause, T arg) throws AsterixException {
+    public R visit(HavingClause havingClause, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(IndependentSubquery independentSubquery, T arg) throws AsterixException {
+    public R visit(IndependentSubquery independentSubquery, T arg) throws CompilationException {
         return null;
     }
 
     @Override
-    public R visit(CaseExpression caseExpr, T arg) throws AsterixException {
+    public R visit(CaseExpression caseExpr, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
index c289ebe..96c5987 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
@@ -22,10 +22,10 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
@@ -58,8 +58,8 @@
 import org.apache.asterix.lang.sqlpp.expression.SelectExpression;
 import org.apache.asterix.lang.sqlpp.struct.SetOperationRight;
 import org.apache.asterix.lang.sqlpp.util.SqlppVariableUtil;
-import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.asterix.metadata.utils.MetadataConstants;
+import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.algebricks.core.algebra.base.Counter;
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 
@@ -80,7 +80,7 @@
     }
 
     @Override
-    public Expression visit(FromClause fromClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(FromClause fromClause, ILangExpression arg) throws CompilationException {
         Scope scopeForFromClause = scopeChecker.extendCurrentScope();
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
             fromTerm.accept(this, fromClause);
@@ -93,7 +93,7 @@
     }
 
     @Override
-    public Expression visit(FromTerm fromTerm, ILangExpression arg) throws AsterixException {
+    public Expression visit(FromTerm fromTerm, ILangExpression arg) throws CompilationException {
         scopeChecker.createNewScope();
         // Visit the left expression of a from term.
         fromTerm.setLeftExpression(visit(fromTerm.getLeftExpression(), fromTerm));
@@ -115,7 +115,7 @@
     }
 
     @Override
-    public Expression visit(JoinClause joinClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(JoinClause joinClause, ILangExpression arg) throws CompilationException {
         Scope leftScope = scopeChecker.removeCurrentScope();
         scopeChecker.createNewScope();
         // NOTE: the two join branches cannot be correlated, instead of checking
@@ -143,7 +143,7 @@
     }
 
     @Override
-    public Expression visit(NestClause nestClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(NestClause nestClause, ILangExpression arg) throws CompilationException {
         // NOTE: the two branches of a NEST cannot be correlated, instead of
         // checking the correlation here, we defer the check to the query
         // optimizer.
@@ -166,7 +166,7 @@
     }
 
     @Override
-    public Expression visit(UnnestClause unnestClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(UnnestClause unnestClause, ILangExpression arg) throws CompilationException {
         unnestClause.setRightExpression(visit(unnestClause.getRightExpression(), unnestClause));
 
         // register the data item variable
@@ -182,7 +182,7 @@
     }
 
     @Override
-    public Expression visit(SelectSetOperation selectSetOperation, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectSetOperation selectSetOperation, ILangExpression arg) throws CompilationException {
         Scope scopeBeforeCurrentBranch = scopeChecker.getCurrentScope();
         scopeChecker.createNewScope();
         selectSetOperation.getLeftInput().accept(this, arg);
@@ -204,7 +204,7 @@
     }
 
     @Override
-    public Expression visit(Query q, ILangExpression arg) throws AsterixException {
+    public Expression visit(Query q, ILangExpression arg) throws CompilationException {
         q.setBody(visit(q.getBody(), q));
         q.setVarCounter(scopeChecker.getVarCounter());
         context.setVarCounter(scopeChecker.getVarCounter());
@@ -212,7 +212,7 @@
     }
 
     @Override
-    public Expression visit(FunctionDecl fd, ILangExpression arg) throws AsterixException {
+    public Expression visit(FunctionDecl fd, ILangExpression arg) throws CompilationException {
         scopeChecker.createNewScope();
         fd.setFuncBody(visit(fd.getFuncBody(), fd));
         scopeChecker.removeCurrentScope();
@@ -220,7 +220,7 @@
     }
 
     @Override
-    public Expression visit(GroupbyClause gc, ILangExpression arg) throws AsterixException {
+    public Expression visit(GroupbyClause gc, ILangExpression arg) throws CompilationException {
         // After a GROUP BY, variables defined before the current SELECT BLOCK (e.g., in a WITH clause
         // or an outer scope query) should still be visible.
         Scope newScope = new Scope(scopeChecker, scopeChecker.getCurrentScope().getParentScope());
@@ -266,7 +266,7 @@
     }
 
     @Override
-    public Expression visit(LimitClause limitClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(LimitClause limitClause, ILangExpression arg) throws CompilationException {
         scopeChecker.pushForbiddenScope(scopeChecker.getCurrentScope());
         limitClause.setLimitExpr(visit(limitClause.getLimitExpr(), limitClause));
         if(limitClause.hasOffset()) {
@@ -277,7 +277,7 @@
     }
 
     @Override
-    public Expression visit(LetClause letClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(LetClause letClause, ILangExpression arg) throws CompilationException {
         scopeChecker.extendCurrentScope();
         letClause.setBindingExpr(visit(letClause.getBindingExpr(), letClause));
         addNewVarSymbolToScope(scopeChecker.getCurrentScope(), letClause.getVarExpr().getVar());
@@ -285,7 +285,7 @@
     }
 
     @Override
-    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws CompilationException {
         Scope scopeBeforeSelectExpression = scopeChecker.getCurrentScope();
         scopeChecker.createNewScope();
 
@@ -320,7 +320,7 @@
     }
 
     @Override
-    public Expression visit(IndependentSubquery independentSubquery, ILangExpression arg) throws AsterixException {
+    public Expression visit(IndependentSubquery independentSubquery, ILangExpression arg) throws CompilationException {
         // Masks parent scopes so as that the subquery is independent of the environment.
         // In this way, free variables defined in the subquery will not be resolved using
         // variables defined in the parent scope.
@@ -332,7 +332,7 @@
     }
 
     @Override
-    public Expression visit(QuantifiedExpression qe, ILangExpression arg) throws AsterixException {
+    public Expression visit(QuantifiedExpression qe, ILangExpression arg) throws CompilationException {
         scopeChecker.createNewScope();
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
             pair.setExpr(visit(pair.getExpr(), qe));
@@ -344,10 +344,10 @@
     }
 
     @Override
-    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws CompilationException {
         String varName = varExpr.getVar().getValue();
         if (scopeChecker.isInForbiddenScopes(varName)) {
-            throw new AsterixException(
+            throw new CompilationException(
                     "Inside limit clauses, it is disallowed to reference a variable having the same name as any variable bound in the same scope as the limit clause.");
         }
         Identifier ident = scopeChecker.lookupSymbol(varName);
@@ -361,7 +361,7 @@
     }
 
     @Override
-    public Expression visit(InsertStatement insertStatement, ILangExpression arg) throws AsterixException {
+    public Expression visit(InsertStatement insertStatement, ILangExpression arg) throws CompilationException {
         scopeChecker.createNewScope();
 
         // Visits the body query.
@@ -383,7 +383,7 @@
 
     // Rewrites for an undefined variable reference, which potentially could be a syntatic sugar.
     protected Expression wrapWithResolveFunction(VariableExpr expr, Set<VariableExpr> liveVars)
-            throws AsterixException {
+            throws CompilationException {
         List<Expression> argList = new ArrayList<>();
         //Ignore the parser-generated prefix "$" for a dataset.
         String varName = SqlppVariableUtil.toUserDefinedVariableName(expr.getVar().getValue()).getValue();
@@ -393,20 +393,21 @@
     }
 
     // Adds a new encountered alias identifier into a scope
-    private void addNewVarSymbolToScope(Scope scope, VarIdentifier var) throws AsterixException {
+    private void addNewVarSymbolToScope(Scope scope, VarIdentifier var) throws CompilationException {
         if (scope.findLocalSymbol(var.getValue()) != null) {
-            throw new AsterixException("Duplicate alias definitions: "
+            throw new CompilationException("Duplicate alias definitions: "
                     + SqlppVariableUtil.toUserDefinedName(var.getValue()));
         }
         scope.addNewVarSymbolToScope(var);
     }
 
     // Merges <code>scopeToBeMerged</code> into <code>hostScope</code>.
-    private void mergeScopes(Scope hostScope, Scope scopeToBeMerged) throws AsterixException {
+    private void mergeScopes(Scope hostScope, Scope scopeToBeMerged) throws CompilationException {
         Set<String> symbolsToBeMerged = scopeToBeMerged.getLocalSymbols();
         for (String symbolToBeMerged : symbolsToBeMerged) {
             if (hostScope.findLocalSymbol(symbolToBeMerged) != null) {
-                throw new AsterixException("Duplicate alias definitions: "
+                throw new CompilationException(
+                        "Duplicate alias definitions: "
                         + SqlppVariableUtil.toUserDefinedName(symbolToBeMerged));
             }
         }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppSimpleExpressionVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppSimpleExpressionVisitor.java
index f788aea..d754702 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppSimpleExpressionVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppSimpleExpressionVisitor.java
@@ -21,7 +21,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.clause.GroupbyClause;
@@ -68,7 +68,7 @@
         extends AbstractSqlppQueryExpressionVisitor<Expression, ILangExpression> {
 
     @Override
-    public Expression visit(FromClause fromClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(FromClause fromClause, ILangExpression arg) throws CompilationException {
         for (FromTerm fromTerm : fromClause.getFromTerms()) {
             visit(fromTerm, arg);
         }
@@ -76,7 +76,7 @@
     }
 
     @Override
-    public Expression visit(FromTerm fromTerm, ILangExpression arg) throws AsterixException {
+    public Expression visit(FromTerm fromTerm, ILangExpression arg) throws CompilationException {
         // Visit the left expression of a from term.
         fromTerm.setLeftExpression(visit(fromTerm.getLeftExpression(), arg));
 
@@ -88,27 +88,27 @@
     }
 
     @Override
-    public Expression visit(JoinClause joinClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(JoinClause joinClause, ILangExpression arg) throws CompilationException {
         joinClause.setRightExpression(visit(joinClause.getRightExpression(), arg));
         joinClause.setConditionExpression(visit(joinClause.getConditionExpression(), arg));
         return null;
     }
 
     @Override
-    public Expression visit(NestClause nestClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(NestClause nestClause, ILangExpression arg) throws CompilationException {
         nestClause.setRightExpression(visit(nestClause.getRightExpression(), arg));
         nestClause.setConditionExpression(visit(nestClause.getConditionExpression(), arg));
         return null;
     }
 
     @Override
-    public Expression visit(UnnestClause unnestClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(UnnestClause unnestClause, ILangExpression arg) throws CompilationException {
         unnestClause.setRightExpression(visit(unnestClause.getRightExpression(), arg));
         return null;
     }
 
     @Override
-    public Expression visit(Projection projection, ILangExpression arg) throws AsterixException {
+    public Expression visit(Projection projection, ILangExpression arg) throws CompilationException {
         if (!projection.star()) {
             projection.setExpression(visit(projection.getExpression(), arg));
         }
@@ -116,7 +116,7 @@
     }
 
     @Override
-    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectBlock selectBlock, ILangExpression arg) throws CompilationException {
         // Traverses the select block in the order of "from", "let"s, "where",
         // "group by", "let"s, "having" and "select".
         if (selectBlock.hasFromClause()) {
@@ -148,7 +148,7 @@
     }
 
     @Override
-    public Expression visit(SelectClause selectClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectClause selectClause, ILangExpression arg) throws CompilationException {
         if (selectClause.selectElement()) {
             selectClause.getSelectElement().accept(this, selectClause);
         }
@@ -159,13 +159,13 @@
     }
 
     @Override
-    public Expression visit(SelectElement selectElement, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectElement selectElement, ILangExpression arg) throws CompilationException {
         selectElement.setExpression(visit(selectElement.getExpression(), selectElement));
         return null;
     }
 
     @Override
-    public Expression visit(SelectRegular selectRegular, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectRegular selectRegular, ILangExpression arg) throws CompilationException {
         for (Projection projection : selectRegular.getProjections()) {
             projection.accept(this, arg);
         }
@@ -173,7 +173,7 @@
     }
 
     @Override
-    public Expression visit(SelectSetOperation selectSetOperation, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectSetOperation selectSetOperation, ILangExpression arg) throws CompilationException {
         selectSetOperation.getLeftInput().accept(this, arg);
         for (SetOperationRight right : selectSetOperation.getRightInputs()) {
             right.getSetOperationRightInput().accept(this, arg);
@@ -182,37 +182,37 @@
     }
 
     @Override
-    public Expression visit(HavingClause havingClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(HavingClause havingClause, ILangExpression arg) throws CompilationException {
         havingClause.setFilterExpression(visit(havingClause.getFilterExpression(), havingClause));
         return null;
     }
 
     @Override
-    public Expression visit(Query q, ILangExpression arg) throws AsterixException {
+    public Expression visit(Query q, ILangExpression arg) throws CompilationException {
         q.setBody(visit(q.getBody(), q));
         return null;
     }
 
     @Override
-    public Expression visit(FunctionDecl fd, ILangExpression arg) throws AsterixException {
+    public Expression visit(FunctionDecl fd, ILangExpression arg) throws CompilationException {
         fd.setFuncBody(visit(fd.getFuncBody(), fd));
         return null;
     }
 
     @Override
-    public Expression visit(WhereClause whereClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(WhereClause whereClause, ILangExpression arg) throws CompilationException {
         whereClause.setWhereExpr(visit(whereClause.getWhereExpr(), whereClause));
         return null;
     }
 
     @Override
-    public Expression visit(OrderbyClause oc, ILangExpression arg) throws AsterixException {
+    public Expression visit(OrderbyClause oc, ILangExpression arg) throws CompilationException {
         oc.setOrderbyList(visit(oc.getOrderbyList(), arg));
         return null;
     }
 
     @Override
-    public Expression visit(GroupbyClause gc, ILangExpression arg) throws AsterixException {
+    public Expression visit(GroupbyClause gc, ILangExpression arg) throws CompilationException {
         for (GbyVariableExpressionPair gbyVarExpr : gc.getGbyPairList()) {
             gbyVarExpr.setExpr(visit(gbyVarExpr.getExpr(), gc));
         }
@@ -220,7 +220,7 @@
     }
 
     @Override
-    public Expression visit(LimitClause limitClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(LimitClause limitClause, ILangExpression arg) throws CompilationException {
         limitClause.setLimitExpr(visit(limitClause.getLimitExpr(), limitClause));
         if (limitClause.hasOffset()) {
             limitClause.setOffset(visit(limitClause.getOffset(), limitClause));
@@ -229,13 +229,13 @@
     }
 
     @Override
-    public Expression visit(LetClause letClause, ILangExpression arg) throws AsterixException {
+    public Expression visit(LetClause letClause, ILangExpression arg) throws CompilationException {
         letClause.setBindingExpr(visit(letClause.getBindingExpr(), letClause));
         return null;
     }
 
     @Override
-    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws AsterixException {
+    public Expression visit(SelectExpression selectExpression, ILangExpression arg) throws CompilationException {
         // visit let list
         if (selectExpression.hasLetClauses()) {
             for (LetClause letClause : selectExpression.getLetList()) {
@@ -259,18 +259,18 @@
     }
 
     @Override
-    public Expression visit(LiteralExpr l, ILangExpression arg) throws AsterixException {
+    public Expression visit(LiteralExpr l, ILangExpression arg) throws CompilationException {
         return l;
     }
 
     @Override
-    public Expression visit(ListConstructor lc, ILangExpression arg) throws AsterixException {
+    public Expression visit(ListConstructor lc, ILangExpression arg) throws CompilationException {
         lc.setExprList(visit(lc.getExprList(), arg));
         return lc;
     }
 
     @Override
-    public Expression visit(RecordConstructor rc, ILangExpression arg) throws AsterixException {
+    public Expression visit(RecordConstructor rc, ILangExpression arg) throws CompilationException {
         for (FieldBinding binding : rc.getFbList()) {
             binding.setLeftExpr(visit(binding.getLeftExpr(), rc));
             binding.setRightExpr(visit(binding.getRightExpr(), rc));
@@ -279,13 +279,13 @@
     }
 
     @Override
-    public Expression visit(OperatorExpr operatorExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(OperatorExpr operatorExpr, ILangExpression arg) throws CompilationException {
         operatorExpr.setExprList(visit(operatorExpr.getExprList(), arg));
         return operatorExpr;
     }
 
     @Override
-    public Expression visit(IfExpr ifExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(IfExpr ifExpr, ILangExpression arg) throws CompilationException {
         ifExpr.setCondExpr(visit(ifExpr.getCondExpr(), ifExpr));
         ifExpr.setThenExpr(visit(ifExpr.getThenExpr(), ifExpr));
         ifExpr.setElseExpr(visit(ifExpr.getElseExpr(), ifExpr));
@@ -293,7 +293,7 @@
     }
 
     @Override
-    public Expression visit(QuantifiedExpression qe, ILangExpression arg) throws AsterixException {
+    public Expression visit(QuantifiedExpression qe, ILangExpression arg) throws CompilationException {
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
             pair.setExpr(visit(pair.getExpr(), qe));
         }
@@ -302,30 +302,30 @@
     }
 
     @Override
-    public Expression visit(CallExpr callExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CallExpr callExpr, ILangExpression arg) throws CompilationException {
         callExpr.setExprList(visit(callExpr.getExprList(), arg));
         return callExpr;
     }
 
     @Override
-    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(VariableExpr varExpr, ILangExpression arg) throws CompilationException {
         return varExpr;
     }
 
     @Override
-    public Expression visit(UnaryExpr u, ILangExpression arg) throws AsterixException {
+    public Expression visit(UnaryExpr u, ILangExpression arg) throws CompilationException {
         u.setExpr(visit(u.getExpr(), u));
         return u;
     }
 
     @Override
-    public Expression visit(FieldAccessor fa, ILangExpression arg) throws AsterixException {
+    public Expression visit(FieldAccessor fa, ILangExpression arg) throws CompilationException {
         fa.setExpr(visit(fa.getExpr(), fa));
         return fa;
     }
 
     @Override
-    public Expression visit(IndexAccessor ia, ILangExpression arg) throws AsterixException {
+    public Expression visit(IndexAccessor ia, ILangExpression arg) throws CompilationException {
         ia.setExpr(visit(ia.getExpr(), ia));
         if (ia.getIndexExpr() != null) {
             ia.setIndexExpr(visit(ia.getIndexExpr(), arg));
@@ -334,13 +334,13 @@
     }
 
     @Override
-    public Expression visit(IndependentSubquery independentSubquery, ILangExpression arg) throws AsterixException {
+    public Expression visit(IndependentSubquery independentSubquery, ILangExpression arg) throws CompilationException {
         independentSubquery.setExpr(visit(independentSubquery.getExpr(), arg));
         return independentSubquery;
     }
 
     @Override
-    public Expression visit(CaseExpression caseExpr, ILangExpression arg) throws AsterixException {
+    public Expression visit(CaseExpression caseExpr, ILangExpression arg) throws CompilationException {
         caseExpr.setConditionExpr(visit(caseExpr.getConditionExpr(), arg));
         caseExpr.setWhenExprs(visit(caseExpr.getWhenExprs(), arg));
         caseExpr.setThenExprs(visit(caseExpr.getThenExprs(), arg));
@@ -349,7 +349,7 @@
     }
 
     @Override
-    public Expression visit(InsertStatement insertStatement, ILangExpression arg) throws AsterixException {
+    public Expression visit(InsertStatement insertStatement, ILangExpression arg) throws CompilationException {
         Expression returnExpr = insertStatement.getReturnExpression();
         if (returnExpr != null) {
             insertStatement.setReturnExpression(visit(returnExpr, arg));
@@ -359,19 +359,19 @@
         return null;
     }
 
-    protected Expression visit(Expression expr, ILangExpression arg) throws AsterixException{
+    protected Expression visit(Expression expr, ILangExpression arg) throws CompilationException {
         return postVisit(preVisit(expr).accept(this, arg));
     }
 
-    protected Expression preVisit(Expression expr) throws AsterixException{
+    protected Expression preVisit(Expression expr) throws CompilationException {
         return expr;
     }
 
-    protected Expression postVisit(Expression expr) throws AsterixException {
+    protected Expression postVisit(Expression expr) throws CompilationException {
         return expr;
     }
 
-    private List<Expression> visit(List<Expression> exprs, ILangExpression arg) throws AsterixException {
+    private List<Expression> visit(List<Expression> exprs, ILangExpression arg) throws CompilationException {
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : exprs) {
             newExprList.add(visit(expr, arg));
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/ISqlppVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/ISqlppVisitor.java
index 2827e37..639f3b5 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/ISqlppVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/ISqlppVisitor.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.sqlpp.visitor.base;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.lang.sqlpp.clause.FromClause;
 import org.apache.asterix.lang.sqlpp.clause.FromTerm;
@@ -38,33 +38,33 @@
 
 public interface ISqlppVisitor<R, T> extends ILangVisitor<R, T> {
 
-    R visit(FromClause fromClause, T arg) throws AsterixException;
+    R visit(FromClause fromClause, T arg) throws CompilationException;
 
-    R visit(FromTerm fromTerm, T arg) throws AsterixException;
+    R visit(FromTerm fromTerm, T arg) throws CompilationException;
 
-    R visit(JoinClause joinClause, T arg) throws AsterixException;
+    R visit(JoinClause joinClause, T arg) throws CompilationException;
 
-    R visit(NestClause nestClause, T arg) throws AsterixException;
+    R visit(NestClause nestClause, T arg) throws CompilationException;
 
-    R visit(Projection projection, T arg) throws AsterixException;
+    R visit(Projection projection, T arg) throws CompilationException;
 
-    R visit(SelectBlock selectBlock, T arg) throws AsterixException;
+    R visit(SelectBlock selectBlock, T arg) throws CompilationException;
 
-    R visit(SelectClause selectClause, T arg) throws AsterixException;
+    R visit(SelectClause selectClause, T arg) throws CompilationException;
 
-    R visit(SelectElement selectElement, T arg) throws AsterixException;
+    R visit(SelectElement selectElement, T arg) throws CompilationException;
 
-    R visit(SelectRegular selectRegular, T arg) throws AsterixException;
+    R visit(SelectRegular selectRegular, T arg) throws CompilationException;
 
-    R visit(SelectSetOperation selectSetOperation, T arg) throws AsterixException;
+    R visit(SelectSetOperation selectSetOperation, T arg) throws CompilationException;
 
-    R visit(SelectExpression selectStatement, T arg) throws AsterixException;
+    R visit(SelectExpression selectStatement, T arg) throws CompilationException;
 
-    R visit(UnnestClause unnestClause, T arg) throws AsterixException;
+    R visit(UnnestClause unnestClause, T arg) throws CompilationException;
 
-    R visit(HavingClause havingClause, T arg) throws AsterixException;
+    R visit(HavingClause havingClause, T arg) throws CompilationException;
 
-    R visit(IndependentSubquery independentSubquery, T arg) throws AsterixException;
+    R visit(IndependentSubquery independentSubquery, T arg) throws CompilationException;
 
-    R visit(CaseExpression caseExpression, T arg) throws AsterixException;
+    R visit(CaseExpression caseExpression, T arg) throws CompilationException;
 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index e08f758..047fcc4 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -45,7 +45,7 @@
 import org.apache.asterix.common.annotations.UndeclaredFieldsDataGen;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Literal;
@@ -258,7 +258,7 @@
         super.setInput(s);
     }
 
-    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, AsterixException {
+    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, CompilationException {
         File file = new File(args[0]);
         Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
         SQLPPParser parser = new SQLPPParser(fis);
@@ -266,15 +266,15 @@
         //st.accept(new SQLPPPrintVisitor(), 0);
     }
 
-    public List<Statement> parse() throws AsterixException {
+    public List<Statement> parse() throws CompilationException {
         try {
             return Statement();
         } catch (Error e) {
             // this is here as the JavaCharStream that's below the lexer somtimes throws Errors that are not handled
             // by the ANTLR-generated lexer or parser (e.g it does this for invalid backslash u + 4 hex digits escapes)
-            throw new AsterixException(new ParseException(e.getMessage()));
+            throw new CompilationException(new ParseException(e.getMessage()));
         } catch (ParseException e) {
-            throw new AsterixException("Syntax error: " + getMessage(e));
+            throw new CompilationException("Syntax error: " + getMessage(e));
         }
     }
 
@@ -1782,7 +1782,7 @@
         }
         try{
            op.addOperator(token.image.toLowerCase());
-        } catch (AsterixException e){
+        } catch (CompilationException e){
            throw new ParseException(e.getMessage());
         }
     }
@@ -1855,7 +1855,7 @@
           }
           try{
             op.addOperator(operator);
-          } catch (AsterixException e){
+          } catch (CompilationException e){
             throw new ParseException(e.getMessage());
           }
         }
@@ -1906,7 +1906,7 @@
           }
           try{
             op.addOperator(operator);
-          } catch (AsterixException e){
+          } catch (CompilationException e){
             throw new ParseException(e.getMessage());
           }
         }
@@ -2100,7 +2100,7 @@
         uexpr = new UnaryExpr();
         try{
             uexpr.setExprType(exprType);
-        } catch (AsterixException e){
+        } catch (CompilationException e){
             throw new ParseException(e.getMessage());
         }
     }
diff --git a/asterixdb/asterix-lang-sqlpp/src/test/java/org/apache/asterix/lang/sqlpp/parser/ParserTest.java b/asterixdb/asterix-lang-sqlpp/src/test/java/org/apache/asterix/lang/sqlpp/parser/ParserTest.java
index 27679a9..dbb72c7 100644
--- a/asterixdb/asterix-lang-sqlpp/src/test/java/org/apache/asterix/lang/sqlpp/parser/ParserTest.java
+++ b/asterixdb/asterix-lang-sqlpp/src/test/java/org/apache/asterix/lang/sqlpp/parser/ParserTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.sqlpp.parser;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.IParser;
 import org.apache.asterix.lang.common.base.IParserFactory;
 import org.junit.Test;
@@ -30,7 +30,7 @@
         IParser parser = factory.createParser(query);
         try {
             parser.parse();
-        } catch (AsterixException e) {
+        } catch (CompilationException e) {
             if (!e.getMessage().contains("Syntax error: In line 3")) {
                 throw new Exception("Unexpected error", e);
             }
diff --git a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/test/java/org/apache/asterix/lang/extension/EchoStatement.java b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/test/java/org/apache/asterix/lang/extension/EchoStatement.java
index 3d98299..1121287 100644
--- a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/test/java/org/apache/asterix/lang/extension/EchoStatement.java
+++ b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/test/java/org/apache/asterix/lang/extension/EchoStatement.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.lang.extension;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 
@@ -31,7 +31,7 @@
     }
 
     @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException {
         return null;
     }
 
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataException.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataException.java
index 84c908f..0501d48 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataException.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataException.java
@@ -19,9 +19,9 @@
 
 package org.apache.asterix.metadata;
 
-import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 
-public class MetadataException extends AsterixException {
+public class MetadataException extends CompilationException {
     private static final long serialVersionUID = 1L;
 
     public MetadataException(String message) {
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
index 61c1aff..26706c6 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
@@ -25,19 +25,20 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.common.config.StorageProperties;
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.ExternalFilePendingOp;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.config.GlobalConfig;
+import org.apache.asterix.common.config.StorageProperties;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
 import org.apache.asterix.common.context.ITransactionSubsystemProvider;
 import org.apache.asterix.common.context.TransactionSubsystemProvider;
+import org.apache.asterix.common.dataflow.IApplicationContextInfo;
 import org.apache.asterix.common.dataflow.LSMIndexUtil;
 import org.apache.asterix.common.dataflow.LSMInvertedIndexInsertDeleteOperatorDescriptor;
 import org.apache.asterix.common.dataflow.LSMTreeInsertDeleteOperatorDescriptor;
-import org.apache.asterix.common.dataflow.IApplicationContextInfo;
 import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeWithBuddyIOOperationCallbackFactory;
 import org.apache.asterix.common.ioopcallbacks.LSMInvertedIndexIOOperationCallbackFactory;
@@ -93,8 +94,8 @@
 import org.apache.asterix.runtime.operators.LSMInvertedIndexUpsertOperatorDescriptor;
 import org.apache.asterix.runtime.operators.LSMTreeUpsertOperatorDescriptor;
 import org.apache.asterix.runtime.util.AppContextInfo;
-import org.apache.asterix.runtime.util.RuntimeComponentsProvider;
 import org.apache.asterix.runtime.util.ClusterStateManager;
+import org.apache.asterix.runtime.util.RuntimeComponentsProvider;
 import org.apache.asterix.transaction.management.opcallbacks.LockThenSearchOperationCallbackFactory;
 import org.apache.asterix.transaction.management.opcallbacks.PrimaryIndexInstantSearchOperationCallbackFactory;
 import org.apache.asterix.transaction.management.opcallbacks.PrimaryIndexModificationOperationCallbackFactory;
@@ -409,18 +410,18 @@
         return new Pair<>(dataScanner, constraint);
     }
 
-    public IDataFormat getDataFormat(String dataverseName) throws AsterixException {
+    public IDataFormat getDataFormat(String dataverseName) throws CompilationException {
         Dataverse dataverse = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, dataverseName);
         IDataFormat format;
         try {
             format = (IDataFormat) Class.forName(dataverse.getDataFormat()).newInstance();
         } catch (Exception e) {
-            throw new AsterixException(e);
+            throw new CompilationException(e);
         }
         return format;
     }
 
-    public Dataverse findDataverse(String dataverseName) throws AsterixException {
+    public Dataverse findDataverse(String dataverseName) throws CompilationException {
         return MetadataManager.INSTANCE.getDataverse(mdTxnCtx, dataverseName);
     }
 
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
index 12e854d..21db749 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetadataUtil.java
@@ -32,6 +32,7 @@
 import org.apache.asterix.common.dataflow.LSMTreeInsertDeleteOperatorDescriptor;
 import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.common.library.ILibraryManager;
 import org.apache.asterix.external.api.IAdapterFactory;
@@ -93,36 +94,37 @@
     private static final Logger LOGGER = Logger.getLogger(FeedMetadataUtil.class.getName());
 
     public static Dataset validateIfDatasetExists(String dataverse, String datasetName, MetadataTransactionContext ctx)
-            throws AsterixException {
+            throws CompilationException {
         Dataset dataset = MetadataManager.INSTANCE.getDataset(ctx, dataverse, datasetName);
         if (dataset == null) {
-            throw new AsterixException("Unknown target dataset :" + datasetName);
+            throw new CompilationException("Unknown target dataset :" + datasetName);
         }
 
         if (!dataset.getDatasetType().equals(DatasetType.INTERNAL)) {
-            throw new AsterixException("Statement not applicable. Dataset " + datasetName + " is not of required type "
+            throw new CompilationException("Statement not applicable. Dataset " + datasetName
+                    + " is not of required type "
                     + DatasetType.INTERNAL);
         }
         return dataset;
     }
 
     public static Feed validateIfFeedExists(String dataverse, String feedName, MetadataTransactionContext ctx)
-            throws AsterixException {
+            throws CompilationException {
         Feed feed = MetadataManager.INSTANCE.getFeed(ctx, dataverse, feedName);
         if (feed == null) {
-            throw new AsterixException("Unknown source feed: " + feedName);
+            throw new CompilationException("Unknown source feed: " + feedName);
         }
         return feed;
     }
 
     public static FeedPolicyEntity validateIfPolicyExists(String dataverse, String policyName,
-            MetadataTransactionContext ctx) throws AsterixException {
+            MetadataTransactionContext ctx) throws CompilationException {
         FeedPolicyEntity feedPolicy = MetadataManager.INSTANCE.getFeedPolicy(ctx, dataverse, policyName);
         if (feedPolicy == null) {
             feedPolicy = MetadataManager.INSTANCE.getFeedPolicy(ctx, MetadataConstants.METADATA_DATAVERSE_NAME,
                     policyName);
             if (feedPolicy == null) {
-                throw new AsterixException("Unknown feed policy" + policyName);
+                throw new CompilationException("Unknown feed policy" + policyName);
             }
         }
         return feedPolicy;
