You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "abdullah alamoudi (Code Review)" <do...@asterixdb.incubator.apache.org> on 2018/09/10 19:25:38 UTC

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2960

Change subject: WIP: Start and End of Expressions
......................................................................

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
50 files changed, 537 insertions(+), 457 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/60/2960/1

diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
index 4b2ff76..80708cd 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
@@ -262,6 +262,10 @@
                 || func.getFunctionIdentifier() == BuiltinFunctions.CLOSED_RECORD_CONSTRUCTOR)) {
             return false;
         }
+        if (inputType.isOpen() && inputType.getFieldNames().length == 0 && reqType.isOpen()
+                && reqType.getFieldNames().length == 0) {
+            return false;
+        }
         IAType[] reqFieldTypes = reqType.getFieldTypes();
         String[] reqFieldNames = reqType.getFieldNames();
         IAType[] inputFieldTypes = inputType.getFieldTypes();
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 91de474..4dc64d2 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
@@ -155,6 +155,8 @@
 import org.apache.hyracks.api.exceptions.SourceLocation;
 import org.apache.hyracks.api.io.FileSplit;
 import org.apache.hyracks.api.io.ManagedFileSplit;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Each visit returns a pair of an operator and a variable. The variable
@@ -168,6 +170,7 @@
 class LangExpressionToPlanTranslator
         extends AbstractQueryExpressionVisitor<Pair<ILogicalOperator, LogicalVariable>, Mutable<ILogicalOperator>>
         implements ILangExpressionToPlanTranslator {
+    private static final Logger LOGGER = LogManager.getLogger();
 
     protected final MetadataProvider metadataProvider;
     protected final TranslationContext context;
@@ -309,14 +312,14 @@
         if (baseOp != null) {
             base = new MutableObject<>(baseOp);
         }
-        SourceLocation sourceLoc = expr.getSourceLocation();
+        SourceLocation sourceLoc = expr.getStartSourceLocation();
         Pair<ILogicalOperator, LogicalVariable> p = expr.accept(this, base);
         ArrayList<Mutable<ILogicalOperator>> globalPlanRoots = new ArrayList<>();
         ILogicalOperator topOp = p.first;
         List<LogicalVariable> liveVars = new ArrayList<>();
         VariableUtilities.getLiveVariables(topOp, liveVars);
-        LogicalVariable unnestVar = liveVars.get(0);
-        LogicalVariable resVar = unnestVar;
+        LogicalVariable resVar = liveVars.get(0);
+        LogicalVariable unnestVar = getUnnestVar(topOp);
 
         if (outputDatasetName == null) {
             FileSplit outputFileSplit = metadataProvider.getOutputFile();
@@ -441,6 +444,19 @@
         ILogicalPlan plan = new ALogicalPlanImpl(globalPlanRoots);
         eliminateSharedOperatorReferenceForPlan(plan);
         return plan;
+    }
+
+    private LogicalVariable getUnnestVar(ILogicalOperator topOp) throws AlgebricksException {
+        ILogicalOperator currentOp = topOp;
+        while (currentOp.getOperatorTag() != LogicalOperatorTag.UNNEST) {
+            List<Mutable<ILogicalOperator>> input = currentOp.getInputs();
+            if (input.size() != 1) {
+                LOGGER.info("Couldn't find unnest operator");
+                return null;
+            }
+            currentOp = input.get(0).getValue();
+        }
+        return ((UnnestOperator) currentOp).getVariable();
     }
 
     private ILogicalOperator translateDelete(DatasetDataSource targetDatasource, Mutable<ILogicalExpression> varRef,
@@ -684,7 +700,7 @@
         LogicalVariable v;
         AssignOperator returnedOp;
         Expression bindingExpr = lc.getBindingExpr();
-        SourceLocation sourceLoc = bindingExpr.getSourceLocation();
+        SourceLocation sourceLoc = bindingExpr.getStartSourceLocation();
         if (bindingExpr.getKind() == Kind.VARIABLE_EXPRESSION) {
             VariableExpr bindingVarExpr = (VariableExpr) bindingExpr;
             ILogicalExpression prevVarRef = translateVariableRef(bindingVarExpr);
@@ -706,7 +722,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FieldAccessor fa, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = fa.getSourceLocation();
+        SourceLocation sourceLoc = fa.getStartSourceLocation();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(fa.getExpr(), tupSource);
         LogicalVariable v = context.newVarFromExpression(fa);
         AbstractFunctionCallExpression fldAccess =
@@ -725,7 +741,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(IndexAccessor ia, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = ia.getSourceLocation();
+        SourceLocation sourceLoc = ia.getStartSourceLocation();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(ia.getExpr(), tupSource);
         LogicalVariable v = context.newVar();
         AbstractFunctionCallExpression f;
@@ -778,7 +794,7 @@
             }
         }
 
-        SourceLocation sourceLoc = fcall.getSourceLocation();
+        SourceLocation sourceLoc = fcall.getStartSourceLocation();
         AbstractFunctionCallExpression f;
         if ((f = lookupUserDefinedFunction(signature, args, sourceLoc)) == null) {
             f = lookupBuiltinFunction(signature.getName(), signature.getArity(), args, sourceLoc);
@@ -808,11 +824,11 @@
     protected ILogicalExpression translateVariableRef(VariableExpr varExpr) throws CompilationException {
         LogicalVariable var = context.getVar(varExpr.getVar().getId());
         if (var == null) {
-            throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, varExpr.getSourceLocation(),
+            throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, varExpr.getStartSourceLocation(),
                     varExpr.toString());
         }
         VariableReferenceExpression varRef = new VariableReferenceExpression(var);
-        varRef.setSourceLocation(varExpr.getSourceLocation());
+        varRef.setSourceLocation(varExpr.getStartSourceLocation());
         return varRef;
     }
 
@@ -886,7 +902,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(GroupbyClause gc, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = gc.getSourceLocation();
+        SourceLocation sourceLoc = gc.getStartSourceLocation();
         Mutable<ILogicalOperator> topOp = tupSource;
         LogicalVariable groupRecordVar = null;
         if (gc.hasGroupVar()) {
@@ -1000,18 +1016,18 @@
 
         // Creates a subplan for the "then" branch.
         VariableReferenceExpression varCondRef1 = new VariableReferenceExpression(varCond);
-        varCondRef1.setSourceLocation(condExpr.getSourceLocation());
+        varCondRef1.setSourceLocation(condExpr.getStartSourceLocation());
 
         Pair<ILogicalOperator, LogicalVariable> opAndVarForThen =
                 constructSubplanOperatorForBranch(pCond.first, new MutableObject<>(varCondRef1), thenExpr);
 
         // Creates a subplan for the "else" branch.
         VariableReferenceExpression varCondRef2 = new VariableReferenceExpression(varCond);
-        varCondRef2.setSourceLocation(condExpr.getSourceLocation());
+        varCondRef2.setSourceLocation(condExpr.getStartSourceLocation());
         AbstractFunctionCallExpression notVarCond =
                 new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(AlgebricksBuiltinFunctions.NOT),
                         Collections.singletonList(generateAndNotIsUnknownWrap(varCondRef2)));
-        notVarCond.setSourceLocation(condExpr.getSourceLocation());
+        notVarCond.setSourceLocation(condExpr.getStartSourceLocation());
 
         Pair<ILogicalOperator, LogicalVariable> opAndVarForElse =
                 constructSubplanOperatorForBranch(opAndVarForThen.first, new MutableObject<>(notVarCond), elseExpr);
@@ -1020,41 +1036,41 @@
         LogicalVariable selectVar = context.newVar();
         List<Mutable<ILogicalExpression>> arguments = new ArrayList<>();
         VariableReferenceExpression varCondRef3 = new VariableReferenceExpression(varCond);
-        varCondRef3.setSourceLocation(condExpr.getSourceLocation());
+        varCondRef3.setSourceLocation(condExpr.getStartSourceLocation());
         VariableReferenceExpression varThenRef = new VariableReferenceExpression(opAndVarForThen.second);
-        varThenRef.setSourceLocation(thenExpr.getSourceLocation());
+        varThenRef.setSourceLocation(thenExpr.getStartSourceLocation());
         VariableReferenceExpression varElseRef = new VariableReferenceExpression(opAndVarForElse.second);
-        varElseRef.setSourceLocation(elseExpr.getSourceLocation());
+        varElseRef.setSourceLocation(elseExpr.getStartSourceLocation());
         arguments.add(new MutableObject<>(varCondRef3));
         arguments.add(new MutableObject<>(ConstantExpression.TRUE));
         arguments.add(new MutableObject<>(varThenRef));
         arguments.add(new MutableObject<>(varElseRef));
         AbstractFunctionCallExpression swithCaseExpr =
                 new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.SWITCH_CASE), arguments);
-        swithCaseExpr.setSourceLocation(ifexpr.getSourceLocation());
+        swithCaseExpr.setSourceLocation(ifexpr.getStartSourceLocation());
         AssignOperator assignOp = new AssignOperator(selectVar, new MutableObject<>(swithCaseExpr));
         assignOp.getInputs().add(new MutableObject<>(opAndVarForElse.first));
-        assignOp.setSourceLocation(ifexpr.getSourceLocation());
+        assignOp.setSourceLocation(ifexpr.getStartSourceLocation());
 
         // Unnests the selected ("if" or "else") result.
         LogicalVariable unnestVar = context.newVar();
         VariableReferenceExpression selectVarRef = new VariableReferenceExpression(selectVar);
-        selectVarRef.setSourceLocation(ifexpr.getSourceLocation());
+        selectVarRef.setSourceLocation(ifexpr.getStartSourceLocation());
         UnnestingFunctionCallExpression scanCollExpr =
                 new UnnestingFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.SCAN_COLLECTION),
                         Collections.singletonList(new MutableObject<>(selectVarRef)));
-        scanCollExpr.setSourceLocation(ifexpr.getSourceLocation());
+        scanCollExpr.setSourceLocation(ifexpr.getStartSourceLocation());
         UnnestOperator unnestOp = new UnnestOperator(unnestVar, new MutableObject<>(scanCollExpr));
         unnestOp.getInputs().add(new MutableObject<>(assignOp));
-        unnestOp.setSourceLocation(ifexpr.getSourceLocation());
+        unnestOp.setSourceLocation(ifexpr.getStartSourceLocation());
 
         // Produces the final result.
         LogicalVariable resultVar = context.newVar();
         VariableReferenceExpression unnestVarRef = new VariableReferenceExpression(unnestVar);
-        unnestVarRef.setSourceLocation(ifexpr.getSourceLocation());
+        unnestVarRef.setSourceLocation(ifexpr.getStartSourceLocation());
         AssignOperator finalAssignOp = new AssignOperator(resultVar, new MutableObject<>(unnestVarRef));
         finalAssignOp.getInputs().add(new MutableObject<>(unnestOp));
-        finalAssignOp.setSourceLocation(ifexpr.getSourceLocation());
+        finalAssignOp.setSourceLocation(ifexpr.getStartSourceLocation());
         return new Pair<>(finalAssignOp, resultVar);
     }
 
@@ -1063,7 +1079,7 @@
         LogicalVariable var = context.newVar();
         AssignOperator a = new AssignOperator(var, new MutableObject<>(
                 new ConstantExpression(new AsterixConstantValue(ConstantHelper.objectFromLiteral(l.getValue())))));
-        a.setSourceLocation(l.getSourceLocation());
+        a.setSourceLocation(l.getStartSourceLocation());
         if (tupSource != null) {
             a.getInputs().add(tupSource);
         }
@@ -1084,7 +1100,7 @@
 
         Mutable<ILogicalOperator> topOp = tupSource;
 
-        SourceLocation sourceLoc = op.getSourceLocation();
+        SourceLocation sourceLoc = op.getStartSourceLocation();
         AbstractFunctionCallExpression currExpr = null;
         for (int i = 0; i <= nOps; i++) {
             Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(exprs.get(i), topOp);
@@ -1142,7 +1158,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(OrderbyClause oc, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = oc.getSourceLocation();
+        SourceLocation sourceLoc = oc.getStartSourceLocation();
         OrderOperator ord = new OrderOperator();
         ord.setSourceLocation(sourceLoc);
         Iterator<OrderModifier> modifIter = oc.getModifierList().iterator();
@@ -1173,7 +1189,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(QuantifiedExpression qe, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = qe.getSourceLocation();
+        SourceLocation sourceLoc = qe.getStartSourceLocation();
         Mutable<ILogicalOperator> topOp = tupSource;
 
         ILogicalOperator firstOp = null;
@@ -1185,7 +1201,7 @@
             topOp = eo1.second;
             LogicalVariable uVar = context.newVarFromExpression(qt.getVarExpr());
             UnnestOperator u = new UnnestOperator(uVar, new MutableObject<>(makeUnnestExpression(eo1.first)));
-            u.setSourceLocation(expr.getSourceLocation());
+            u.setSourceLocation(expr.getStartSourceLocation());
 
             if (firstOp == null) {
                 firstOp = u;
@@ -1256,10 +1272,10 @@
             throws CompilationException {
         AbstractFunctionCallExpression f = new ScalarFunctionCallExpression(
                 FunctionUtil.getFunctionInfo(BuiltinFunctions.OPEN_RECORD_CONSTRUCTOR));
-        f.setSourceLocation(rc.getSourceLocation());
+        f.setSourceLocation(rc.getStartSourceLocation());
         LogicalVariable v1 = context.newVar();
         AssignOperator a = new AssignOperator(v1, new MutableObject<>(f));
-        a.setSourceLocation(rc.getSourceLocation());
+        a.setSourceLocation(rc.getStartSourceLocation());
         Mutable<ILogicalOperator> topOp = tupSource;
         for (FieldBinding fb : rc.getFbList()) {
             Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo1 = langExprToAlgExpression(fb.getLeftExpr(), topOp);
@@ -1276,9 +1292,10 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(ListConstructor lc, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = lc.getSourceLocation();
+        SourceLocation sourceLoc = lc.getStartSourceLocation();
         FunctionIdentifier fid = (lc.getType() == ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR)
-                ? BuiltinFunctions.ORDERED_LIST_CONSTRUCTOR : BuiltinFunctions.UNORDERED_LIST_CONSTRUCTOR;
+                ? BuiltinFunctions.ORDERED_LIST_CONSTRUCTOR
+                : BuiltinFunctions.UNORDERED_LIST_CONSTRUCTOR;
         AbstractFunctionCallExpression f = new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(fid));
         f.setSourceLocation(sourceLoc);
         LogicalVariable v1 = context.newVar();
@@ -1297,7 +1314,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(UnaryExpr u, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = u.getSourceLocation();
+        SourceLocation sourceLoc = u.getStartSourceLocation();
         Expression expr = u.getExpr();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(expr, tupSource);
         LogicalVariable v1 = context.newVar();
@@ -1337,7 +1354,7 @@
         LogicalVariable var = context.newVar();
         AssignOperator a = new AssignOperator(var, new MutableObject<>(oldVRef));
         a.getInputs().add(tupSource);
-        a.setSourceLocation(v.getSourceLocation());
+        a.setSourceLocation(v.getStartSourceLocation());
         return new Pair<>(a, var);
     }
 
@@ -1347,24 +1364,24 @@
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(w.getWhereExpr(), tupSource);
         SelectOperator s = new SelectOperator(new MutableObject<>(p.first), false, null);
         s.getInputs().add(p.second);
-        s.setSourceLocation(w.getSourceLocation());
+        s.setSourceLocation(w.getStartSourceLocation());
         return new Pair<>(s, null);
     }
 
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(LimitClause lc, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = lc.getSourceLocation();
+        SourceLocation sourceLoc = lc.getStartSourceLocation();
         LimitOperator opLim;
 
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> p1 = langExprToAlgExpression(lc.getLimitExpr(), tupSource);
         ILogicalExpression maxObjectsExpr =
-                createLimitOffsetValueExpression(p1.first, lc.getLimitExpr().getSourceLocation());
+                createLimitOffsetValueExpression(p1.first, lc.getLimitExpr().getStartSourceLocation());
         Expression offset = lc.getOffset();
         if (offset != null) {
             Pair<ILogicalExpression, Mutable<ILogicalOperator>> p2 = langExprToAlgExpression(offset, p1.second);
             ILogicalExpression offsetExpr =
-                    createLimitOffsetValueExpression(p2.first, lc.getOffset().getSourceLocation());
+                    createLimitOffsetValueExpression(p2.first, lc.getOffset().getStartSourceLocation());
             opLim = new LimitOperator(maxObjectsExpr, offsetExpr);
             opLim.getInputs().add(p2.second);
             opLim.setSourceLocation(sourceLoc);
@@ -1475,7 +1492,7 @@
 
     protected Pair<ILogicalExpression, Mutable<ILogicalOperator>> langExprToAlgExpression(Expression expr,
             Mutable<ILogicalOperator> topOpRef) throws CompilationException {
-        SourceLocation sourceLoc = expr.getSourceLocation();
+        SourceLocation sourceLoc = expr.getStartSourceLocation();
         switch (expr.getKind()) {
             case VARIABLE_EXPRESSION:
                 VariableExpr varExpr = (VariableExpr) expr;
@@ -1548,7 +1565,7 @@
 
     protected Pair<ILogicalOperator, LogicalVariable> visitAndOrOperator(OperatorExpr op,
             Mutable<ILogicalOperator> tupSource) throws CompilationException {
-        SourceLocation sourceLoc = op.getSourceLocation();
+        SourceLocation sourceLoc = op.getStartSourceLocation();
         List<OperatorType> ops = op.getOpList();
         int nOps = ops.size();
 
@@ -1776,15 +1793,15 @@
         Pair<ILogicalOperator, LogicalVariable> pBranch = branchExpression.accept(this, new MutableObject<>(select));
         LogicalVariable branchVar = context.newVar();
         VariableReferenceExpression pBranchVarRef = new VariableReferenceExpression(pBranch.second);
-        pBranchVarRef.setSourceLocation(branchExpression.getSourceLocation());
+        pBranchVarRef.setSourceLocation(branchExpression.getStartSourceLocation());
         AggregateFunctionCallExpression listifyExpr =
                 new AggregateFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.LISTIFY), false,
                         Collections.singletonList(new MutableObject<>(pBranchVarRef)));
-        listifyExpr.setSourceLocation(branchExpression.getSourceLocation());
+        listifyExpr.setSourceLocation(branchExpression.getStartSourceLocation());
         AggregateOperator aggOp = new AggregateOperator(Collections.singletonList(branchVar),
                 Collections.singletonList(new MutableObject<>(listifyExpr)));
         aggOp.getInputs().add(new MutableObject<>(pBranch.first));
-        aggOp.setSourceLocation(branchExpression.getSourceLocation());
+        aggOp.setSourceLocation(branchExpression.getStartSourceLocation());
         ILogicalPlan planForBranch = new ALogicalPlanImpl(new MutableObject<>(aggOp));
         subplanOp.getNestedPlans().add(planForBranch);
         context.exitSubplan();
@@ -1857,7 +1874,7 @@
         List<Mutable<ILogicalOperator>> inputOpRefsToUnion = new ArrayList<>();
         List<LogicalVariable> vars = new ArrayList<>();
         for (ILangExpression expr : inputExprs) {
-            SourceLocation exprSourceLoc = expr.getSourceLocation();
+            SourceLocation exprSourceLoc = expr.getStartSourceLocation();
             // Visits the expression of one branch.
             Pair<ILogicalOperator, LogicalVariable> opAndVar = expr.accept(this, tupSource);
 
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 03c4bc5..971caee 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
@@ -149,7 +149,7 @@
     public Pair<ILogicalOperator, LogicalVariable> visit(Query q, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
         Expression queryBody = q.getBody();
-        SourceLocation sourceLoc = queryBody.getSourceLocation();
+        SourceLocation sourceLoc = queryBody.getStartSourceLocation();
         if (queryBody.getKind() == Kind.SELECT_EXPRESSION) {
             SelectExpression selectExpr = (SelectExpression) queryBody;
             if (q.isTopLevel()) {
@@ -209,7 +209,7 @@
         SelectExpression leftInputExpr;
         if (leftInput.selectBlock()) {
             leftInputExpr = new SelectExpression(null, new SelectSetOperation(leftInput, null), null, null, true);
-            leftInputExpr.setSourceLocation(leftInput.getSelectBlock().getSourceLocation());
+            leftInputExpr.setStartSourceLocation(leftInput.getSelectBlock().getStartSourceLocation());
         } else {
             leftInputExpr = leftInput.getSubquery();
         }
@@ -217,7 +217,7 @@
         for (SetOperationRight setOperationRight : selectSetOperation.getRightInputs()) {
             SetOpType setOpType = setOperationRight.getSetOpType();
             if (setOpType != SetOpType.UNION || setOperationRight.isSetSemantics()) {
-                throw new CompilationException(ErrorCode.COMPILATION_ERROR, selectSetOperation.getSourceLocation(),
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, selectSetOperation.getStartSourceLocation(),
                         "Operation " + setOpType + (setOperationRight.isSetSemantics() ? " with set semantics" : "ALL")
                                 + " is not supported.");
             }
@@ -225,13 +225,13 @@
             SelectExpression rightInputExpr;
             if (rightInput.selectBlock()) {
                 rightInputExpr = new SelectExpression(null, new SelectSetOperation(rightInput, null), null, null, true);
-                rightInputExpr.setSourceLocation(rightInput.getSelectBlock().getSourceLocation());
+                rightInputExpr.setStartSourceLocation(rightInput.getSelectBlock().getStartSourceLocation());
             } else {
                 rightInputExpr = rightInput.getSubquery();
             }
             inputExprs.add(rightInputExpr);
         }
-        return translateUnionAllFromInputExprs(inputExprs, tupSource, selectSetOperation.getSourceLocation());
+        return translateUnionAllFromInputExprs(inputExprs, tupSource, selectSetOperation.getStartSourceLocation());
     }
 
     @Override
@@ -278,7 +278,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(FromTerm fromTerm, Mutable<ILogicalOperator> tupSource)
             throws CompilationException {
-        SourceLocation sourceLoc = fromTerm.getSourceLocation();
+        SourceLocation sourceLoc = fromTerm.getStartSourceLocation();
         LogicalVariable fromVar = context.newVarFromExpression(fromTerm.getLeftVariable());
         Expression fromExpr = fromTerm.getLeftExpression();
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(fromExpr, tupSource);
@@ -314,7 +314,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(JoinClause joinClause, Mutable<ILogicalOperator> inputRef)
             throws CompilationException {
-        SourceLocation sourceLoc = joinClause.getSourceLocation();
+        SourceLocation sourceLoc = joinClause.getStartSourceLocation();
         Mutable<ILogicalOperator> leftInputRef = uncorrelatedLeftBranchStack.pop();
         if (joinClause.getJoinType() == JoinType.INNER) {
             Pair<ILogicalOperator, LogicalVariable> rightBranch =
@@ -363,10 +363,10 @@
                 // Creates record to get correlation between the two aggregate variables.
                 VariableReferenceExpression rightUnnestVarRef =
                         new VariableReferenceExpression(rightUnnestOp.getVariable());
-                rightUnnestVarRef.setSourceLocation(joinClause.getRightVariable().getSourceLocation());
+                rightUnnestVarRef.setSourceLocation(joinClause.getRightVariable().getStartSourceLocation());
                 VariableReferenceExpression rightUnnestPosVarRef =
                         new VariableReferenceExpression(rightUnnestOp.getPositionalVariable());
-                rightUnnestPosVarRef.setSourceLocation(joinClause.getPositionalVariable().getSourceLocation());
+                rightUnnestPosVarRef.setSourceLocation(joinClause.getPositionalVariable().getStartSourceLocation());
                 ScalarFunctionCallExpression recordCreationFunc = new ScalarFunctionCallExpression(
                         FunctionUtil.getFunctionInfo(BuiltinFunctions.CLOSED_RECORD_CONSTRUCTOR),
                         // Field name for the listified right unnest var.
@@ -377,13 +377,13 @@
                         new MutableObject<>(new ConstantExpression(new AsterixConstantValue(new AString("posvar")))),
                         // The listified right unnest positional var.
                         new MutableObject<>(rightUnnestPosVarRef));
-                recordCreationFunc.setSourceLocation(joinClause.getRightVariable().getSourceLocation());
+                recordCreationFunc.setSourceLocation(joinClause.getRightVariable().getStartSourceLocation());
 
                 // Assigns the record constructor function to a record variable.
                 LogicalVariable recordVar = context.newVar();
                 AssignOperator assignOp = new AssignOperator(recordVar, new MutableObject<>(recordCreationFunc));
                 assignOp.getInputs().add(new MutableObject<>(currentTopOp));
-                assignOp.setSourceLocation(joinClause.getRightVariable().getSourceLocation());
+                assignOp.setSourceLocation(joinClause.getRightVariable().getStartSourceLocation());
 
                 // Sets currentTopOp and varToListify for later usages.
                 currentTopOp = assignOp;
@@ -424,20 +424,21 @@
 
             if (hasRightPosVar) {
                 VariableReferenceExpression outerUnnestVarRef1 = new VariableReferenceExpression(outerUnnestVar);
-                outerUnnestVarRef1.setSourceLocation(joinClause.getRightVariable().getSourceLocation());
+                outerUnnestVarRef1.setSourceLocation(joinClause.getRightVariable().getStartSourceLocation());
                 ScalarFunctionCallExpression fieldAccessForRightUnnestVar = new ScalarFunctionCallExpression(
                         FunctionUtil.getFunctionInfo(BuiltinFunctions.FIELD_ACCESS_BY_INDEX),
                         new MutableObject<>(outerUnnestVarRef1),
                         new MutableObject<>(new ConstantExpression(new AsterixConstantValue(new AInt32(0)))));
-                fieldAccessForRightUnnestVar.setSourceLocation(joinClause.getRightVariable().getSourceLocation());
+                fieldAccessForRightUnnestVar.setSourceLocation(joinClause.getRightVariable().getStartSourceLocation());
 
                 VariableReferenceExpression outerUnnestVarRef2 = new VariableReferenceExpression(outerUnnestVar);
-                outerUnnestVarRef2.setSourceLocation(joinClause.getPositionalVariable().getSourceLocation());
+                outerUnnestVarRef2.setSourceLocation(joinClause.getPositionalVariable().getStartSourceLocation());
                 ScalarFunctionCallExpression fieldAccessForRightPosVar = new ScalarFunctionCallExpression(
                         FunctionUtil.getFunctionInfo(BuiltinFunctions.FIELD_ACCESS_BY_INDEX),
                         new MutableObject<>(outerUnnestVarRef2),
                         new MutableObject<>(new ConstantExpression(new AsterixConstantValue(new AInt32(1)))));
-                fieldAccessForRightPosVar.setSourceLocation(joinClause.getPositionalVariable().getSourceLocation());
+                fieldAccessForRightPosVar
+                        .setSourceLocation(joinClause.getPositionalVariable().getStartSourceLocation());
 
                 // Creates variables for assign.
                 LogicalVariable rightUnnestVar = context.newVar();
@@ -460,7 +461,7 @@
                 // Creates the assign operator.
                 AssignOperator assignOp = new AssignOperator(assignVars, assignExprs);
                 assignOp.getInputs().add(new MutableObject<>(currentTopOp));
-                assignOp.setSourceLocation(joinClause.getRightVariable().getSourceLocation());
+                assignOp.setSourceLocation(joinClause.getRightVariable().getStartSourceLocation());
                 currentTopOp = assignOp;
             } else {
                 context.setVar(joinClause.getRightVariable(), outerUnnestVar);
@@ -472,7 +473,7 @@
     @Override
     public Pair<ILogicalOperator, LogicalVariable> visit(NestClause nestClause, Mutable<ILogicalOperator> arg)
             throws CompilationException {
-        throw new CompilationException(ErrorCode.COMPILATION_ERROR, nestClause.getSourceLocation(),
+        throw new CompilationException(ErrorCode.COMPILATION_ERROR, nestClause.getStartSourceLocation(),
                 "Nest clause has not been implemented");
     }
 
@@ -513,7 +514,7 @@
                     : new LeftOuterUnnestOperator(rightVar, new MutableObject<>(makeUnnestExpression(eo.first)));
         }
         unnestOp.getInputs().add(eo.second);
-        unnestOp.setSourceLocation(binaryCorrelate.getRightVariable().getSourceLocation());
+        unnestOp.setSourceLocation(binaryCorrelate.getRightVariable().getStartSourceLocation());
         return new Pair<>(unnestOp, rightVar);
     }
 
@@ -558,7 +559,7 @@
             // Variable whenConditionVar is corresponds to the current "WHEN" condition.
             LogicalVariable whenConditionVar = whenExprResult.second;
             VariableReferenceExpression whenConditionVarRef1 = new VariableReferenceExpression(whenConditionVar);
-            whenConditionVarRef1.setSourceLocation(whenExpr.getSourceLocation());
+            whenConditionVarRef1.setSourceLocation(whenExpr.getStartSourceLocation());
             Mutable<ILogicalExpression> branchEntraceConditionExprRef = new MutableObject<>(whenConditionVarRef1);
 
             // Constructs an expression that filters data based on preceding "WHEN" conditions
@@ -569,14 +570,14 @@
                 // entered other matched "WHEN...THEN" case.
                 List<Mutable<ILogicalExpression>> andArgs = new ArrayList<>();
                 andArgs.add(generateNoMatchedPrecedingWhenBranchesFilter(branchCondVarReferences,
-                        caseExpression.getSourceLocation()));
+                        caseExpression.getStartSourceLocation()));
                 andArgs.add(branchEntraceConditionExprRef);
 
                 // A "THEN" branch can be entered only when the tuple has not enter any other preceding
                 // branches and the current "WHEN" condition is TRUE.
                 ScalarFunctionCallExpression andExpr =
                         new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.AND), andArgs);
-                andExpr.setSourceLocation(whenExpr.getSourceLocation());
+                andExpr.setSourceLocation(whenExpr.getStartSourceLocation());
                 branchEntraceConditionExprRef = new MutableObject<>(andExpr);
             }
 
@@ -586,15 +587,15 @@
                     constructSubplanOperatorForBranch(currentOperator, branchEntraceConditionExprRef, thenExpr);
 
             VariableReferenceExpression whenConditionVarRef2 = new VariableReferenceExpression(whenConditionVar);
-            whenConditionVarRef2.setSourceLocation(whenExpr.getSourceLocation());
+            whenConditionVarRef2.setSourceLocation(whenExpr.getStartSourceLocation());
             branchCondVarReferences.add(whenConditionVarRef2);
 
             VariableReferenceExpression whenConditionVarRef3 = new VariableReferenceExpression(whenConditionVar);
-            whenConditionVarRef3.setSourceLocation(whenExpr.getSourceLocation());
+            whenConditionVarRef3.setSourceLocation(whenExpr.getStartSourceLocation());
             allVarReferences.add(whenConditionVarRef3);
 
             VariableReferenceExpression thenVarRef = new VariableReferenceExpression(opAndVarForThen.second);
-            thenVarRef.setSourceLocation(thenExpr.getSourceLocation());
+            thenVarRef.setSourceLocation(thenExpr.getStartSourceLocation());
             allVarReferences.add(thenVarRef);
 
             currentOperator = opAndVarForThen.first;
@@ -603,7 +604,7 @@
 
         // Creates a subplan for the "ELSE" branch.
         Mutable<ILogicalExpression> elseCondExprRef = generateNoMatchedPrecedingWhenBranchesFilter(
-                branchCondVarReferences, caseExpression.getSourceLocation());
+                branchCondVarReferences, caseExpression.getStartSourceLocation());
         Expression elseExpr = caseExpression.getElseExpr();
         Pair<ILogicalOperator, LogicalVariable> opAndVarForElse =
                 constructSubplanOperatorForBranch(currentOperator, elseCondExprRef, elseExpr);
@@ -616,34 +617,34 @@
             arguments.add(new MutableObject<>(argVar));
         }
         VariableReferenceExpression varForElseRef = new VariableReferenceExpression(opAndVarForElse.second);
-        varForElseRef.setSourceLocation(elseExpr.getSourceLocation());
+        varForElseRef.setSourceLocation(elseExpr.getStartSourceLocation());
         arguments.add(new MutableObject<>(varForElseRef));
         AbstractFunctionCallExpression swithCaseExpr =
                 new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.SWITCH_CASE), arguments);
-        swithCaseExpr.setSourceLocation(caseExpression.getSourceLocation());
+        swithCaseExpr.setSourceLocation(caseExpression.getStartSourceLocation());
         AssignOperator assignOp = new AssignOperator(selectVar, new MutableObject<>(swithCaseExpr));
         assignOp.getInputs().add(new MutableObject<>(opAndVarForElse.first));
-        assignOp.setSourceLocation(caseExpression.getSourceLocation());
+        assignOp.setSourceLocation(caseExpression.getStartSourceLocation());
 
         // Unnests the selected (a "THEN" or "ELSE" branch) result.
         LogicalVariable unnestVar = context.newVar();
         VariableReferenceExpression selectVarRef = new VariableReferenceExpression(selectVar);
-        selectVarRef.setSourceLocation(caseExpression.getSourceLocation());
+        selectVarRef.setSourceLocation(caseExpression.getStartSourceLocation());
         UnnestingFunctionCallExpression scanCollectionExpr =
                 new UnnestingFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.SCAN_COLLECTION),
                         Collections.singletonList(new MutableObject<>(selectVarRef)));
-        scanCollectionExpr.setSourceLocation(caseExpression.getSourceLocation());
+        scanCollectionExpr.setSourceLocation(caseExpression.getStartSourceLocation());
         UnnestOperator unnestOp = new UnnestOperator(unnestVar, new MutableObject<>(scanCollectionExpr));
         unnestOp.getInputs().add(new MutableObject<>(assignOp));
-        unnestOp.setSourceLocation(caseExpression.getSourceLocation());
+        unnestOp.setSourceLocation(caseExpression.getStartSourceLocation());
 
         // Produces the final assign operator.
         LogicalVariable resultVar = context.newVar();
         VariableReferenceExpression unnestVarRef = new VariableReferenceExpression(unnestVar);
-        unnestVarRef.setSourceLocation(caseExpression.getSourceLocation());
+        unnestVarRef.setSourceLocation(caseExpression.getStartSourceLocation());
         AssignOperator finalAssignOp = new AssignOperator(resultVar, new MutableObject<>(unnestVarRef));
         finalAssignOp.getInputs().add(new MutableObject<>(unnestOp));
-        finalAssignOp.setSourceLocation(caseExpression.getSourceLocation());
+        finalAssignOp.setSourceLocation(caseExpression.getStartSourceLocation());
         return new Pair<>(finalAssignOp, resultVar);
     }
 
@@ -651,7 +652,7 @@
     protected ILogicalExpression translateVariableRef(VariableExpr varExpr) throws CompilationException {
         VarIdentifier varId = varExpr.getVar();
         if (SqlppVariableUtil.isExternalVariableIdentifier(varId)) {
-            SourceLocation sourceLoc = varExpr.getSourceLocation();
+            SourceLocation sourceLoc = varExpr.getStartSourceLocation();
             IAObject value = getExternalVariableValue(varId, sourceLoc);
             return translateConstantValue(value, sourceLoc);
         }
@@ -707,7 +708,7 @@
         Pair<ILogicalExpression, Mutable<ILogicalOperator>> eo = langExprToAlgExpression(returnExpr, tupSrc);
         LogicalVariable returnVar;
         ILogicalOperator returnOperator;
-        SourceLocation sourceLoc = returnExpr.getSourceLocation();
+        SourceLocation sourceLoc = returnExpr.getStartSourceLocation();
         if (returnExpr.getKind() == Kind.VARIABLE_EXPRESSION
                 && eo.first.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
             VariableExpr varExpr = (VariableExpr) returnExpr;
@@ -744,18 +745,18 @@
             if (projection.varStar()) {
                 if (!fieldBindings.isEmpty()) {
                     RecordConstructor recordConstr = new RecordConstructor(new ArrayList<>(fieldBindings));
-                    recordConstr.setSourceLocation(selectRegular.getSourceLocation());
+                    recordConstr.setStartSourceLocation(selectRegular.getStartSourceLocation());
                     recordExprs.add(recordConstr);
                     fieldBindings.clear();
                 }
                 Expression projectionExpr = projection.getExpression();
-                SourceLocation sourceLoc = projection.getSourceLocation();
+                SourceLocation sourceLoc = projection.getStartSourceLocation();
                 CallExpr toObjectExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.TO_OBJECT),
                         Collections.singletonList(projectionExpr));
-                toObjectExpr.setSourceLocation(sourceLoc);
+                toObjectExpr.setStartSourceLocation(sourceLoc);
                 CallExpr ifMissingOrNullExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.IF_MISSING_OR_NULL),
                         Arrays.asList(toObjectExpr, new RecordConstructor(Collections.emptyList())));
-                ifMissingOrNullExpr.setSourceLocation(sourceLoc);
+                ifMissingOrNullExpr.setStartSourceLocation(sourceLoc);
                 recordExprs.add(ifMissingOrNullExpr);
             } else if (projection.star()) {
                 if (selectBlock.hasGroupbyClause()) {
@@ -774,12 +775,13 @@
             } else if (projection.hasName()) {
                 fieldBindings.add(getFieldBinding(projection, fieldNames));
             } else {
-                throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, projection.getSourceLocation());
+                throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE,
+                        projection.getStartSourceLocation());
             }
         }
         if (!fieldBindings.isEmpty()) {
             RecordConstructor recordConstr = new RecordConstructor(fieldBindings);
-            recordConstr.setSourceLocation(selectRegular.getSourceLocation());
+            recordConstr.setStartSourceLocation(selectRegular.getStartSourceLocation());
             recordExprs.add(recordConstr);
         }
 
@@ -788,7 +790,7 @@
         } else {
             CallExpr recordConcatExpr =
                     new CallExpr(new FunctionSignature(BuiltinFunctions.RECORD_CONCAT_STRICT), recordExprs);
-            recordConcatExpr.setSourceLocation(selectRegular.getSourceLocation());
+            recordConcatExpr.setStartSourceLocation(selectRegular.getStartSourceLocation());
             return recordConcatExpr;
         }
     }
@@ -824,7 +826,7 @@
         }
         if (groupbyClause.hasWithMap()) {
             // no WITH in SQLPP
-            throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, groupbyClause.getSourceLocation(),
+            throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, groupbyClause.getStartSourceLocation(),
                     groupbyClause.getWithVarMap().values().toString());
         }
     }
@@ -840,14 +842,14 @@
     // Generates a field binding for a variable.
     private FieldBinding getFieldBinding(VariableExpr varExpr, Set<String> outFieldNames) throws CompilationException {
         String fieldName = SqlppVariableUtil.variableNameToDisplayedFieldName(varExpr.getVar().getValue());
-        return generateFieldBinding(fieldName, varExpr, outFieldNames, varExpr.getSourceLocation());
+        return generateFieldBinding(fieldName, varExpr, outFieldNames, varExpr.getStartSourceLocation());
     }
 
     // Generates a field binding for a named projection.
     private FieldBinding getFieldBinding(Projection projection, Set<String> outFieldNames) throws CompilationException {
         String fieldName = projection.getName();
         Expression fieldValueExpr = projection.getExpression();
-        return generateFieldBinding(fieldName, fieldValueExpr, outFieldNames, projection.getSourceLocation());
+        return generateFieldBinding(fieldName, fieldValueExpr, outFieldNames, projection.getStartSourceLocation());
     }
 
     private FieldBinding generateFieldBinding(String fieldName, Expression fieldValueExpr, Set<String> outFieldNames,
@@ -933,7 +935,7 @@
 
     private Pair<ILogicalOperator, LogicalVariable> translateInOperatorWithStaticList(QuantifiedExpression qe,
             Mutable<ILogicalOperator> tupSource) throws CompilationException {
-        SourceLocation sourceLoc = qe.getSourceLocation();
+        SourceLocation sourceLoc = qe.getStartSourceLocation();
 
         QuantifiedPair qp = qe.getQuantifiedList().get(0);
         VariableExpr varExpr = qp.getVarExpr();
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
index d2466bf..23e1ae5 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
@@ -20,6 +20,7 @@
 
 import java.util.List;
 
+import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.lang.common.util.FunctionUtil;
 import org.apache.asterix.om.base.AOrderedList;
 import org.apache.asterix.om.base.AString;
@@ -43,7 +44,11 @@
 
     public static void prepareMetaKeyAccessExpression(List<String> field, LogicalVariable resVar,
             List<Mutable<ILogicalExpression>> assignExpressions, List<LogicalVariable> vars,
-            List<Mutable<ILogicalExpression>> varRefs, IVariableContext context, SourceLocation sourceLoc) {
+            List<Mutable<ILogicalExpression>> varRefs, IVariableContext context, SourceLocation sourceLoc)
+            throws CompilationException {
+        if (resVar == null) {
+            throw new CompilationException("Meta field not found in input data");
+        }
         IAObject value = (field.size() > 1) ? new AOrderedList(field) : new AString(field.get(0));
         ScalarFunctionCallExpression metaKeyFunction =
                 new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.META_KEY));
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 cfec2de..cac2270 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
@@ -201,8 +201,8 @@
         // establish facts
         final boolean isQuery = query != null;
         final boolean isLoad = statement != null && statement.getKind() == Statement.Kind.LOAD;
-        final SourceLocation sourceLoc =
-                query != null ? query.getSourceLocation() : statement != null ? statement.getSourceLocation() : null;
+        final SourceLocation sourceLoc = query != null ? query.getStartSourceLocation()
+                : statement != null ? statement.getSourceLocation() : null;
         final boolean isExplainOnly = isQuery && query.isExplain();
 
         SessionConfig conf = output.config();
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 8e86b9c..0c18ed3 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
@@ -412,8 +412,8 @@
                                 resultSetIdCounter, ctx);
                         break;
                     default:
-                        throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, stmt.getSourceLocation(),
-                                "Unexpected statement: " + stmt.getKind());
+                        throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE,
+                                stmt.getStartSourceLocation(), "Unexpected statement: " + stmt.getKind());
                 }
             }
         } finally {
@@ -446,7 +446,7 @@
     protected Dataverse handleUseDataverseStatement(MetadataProvider metadataProvider, Statement stmt)
             throws Exception {
         DataverseDecl dvd = (DataverseDecl) stmt;
-        SourceLocation sourceLoc = dvd.getSourceLocation();
+        SourceLocation sourceLoc = dvd.getStartSourceLocation();
         String dvName = dvd.getDataverseName().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
@@ -492,7 +492,7 @@
                 MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
                 return false;
             } else {
-                throw new CompilationException(ErrorCode.DATAVERSE_EXISTS, stmtCreateDataverse.getSourceLocation(),
+                throw new CompilationException(ErrorCode.DATAVERSE_EXISTS, stmtCreateDataverse.getStartSourceLocation(),
                         dvName);
             }
         }
@@ -543,7 +543,7 @@
             IHyracksClientConnection hcc, IRequestParameters requestParameters) throws CompilationException, Exception {
         MutableObject<ProgressState> progress = new MutableObject<>(ProgressState.NO_PROGRESS);
         DatasetDecl dd = (DatasetDecl) stmt;
-        SourceLocation sourceLoc = dd.getSourceLocation();
+        SourceLocation sourceLoc = dd.getStartSourceLocation();
         String dataverseName = getActiveDataverse(dd.getDataverse());
         String datasetName = dd.getName().getValue();
         DatasetType dsType = dd.getDatasetType();
@@ -653,7 +653,7 @@
             dataset = new Dataset(dataverseName, datasetName, itemTypeDataverseName, itemTypeName,
                     metaItemTypeDataverseName, metaItemTypeName, ngName, compactionPolicy, compactionPolicyProperties,
                     datasetDetails, dd.getHints(), dsType, DatasetIdFactory.generateDatasetId(),
-                    MetadataUtil.PENDING_ADD_OP);
+                    MetadataUtil.PENDING_ADD_OP, 0L);
             MetadataManager.INSTANCE.addDataset(metadataProvider.getMetadataTxnContext(), dataset);
             if (dd.getDatasetType() == DatasetType.INTERNAL) {
                 JobSpecification jobSpec = DatasetUtil.createDatasetJobSpec(dataset, metadataProvider);
@@ -778,7 +778,7 @@
     public void handleCreateIndexStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc, IRequestParameters requestParameters) throws Exception {
         CreateIndexStatement stmtCreateIndex = (CreateIndexStatement) stmt;
-        SourceLocation sourceLoc = stmtCreateIndex.getSourceLocation();
+        SourceLocation sourceLoc = stmtCreateIndex.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtCreateIndex.getDataverseName());
         String datasetName = stmtCreateIndex.getDatasetName().getValue();
         String indexName = stmtCreateIndex.getIndexName().getValue();
@@ -1188,7 +1188,7 @@
 
     protected void handleCreateTypeStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         TypeDecl stmtCreateType = (TypeDecl) stmt;
-        SourceLocation sourceLoc = stmtCreateType.getSourceLocation();
+        SourceLocation sourceLoc = stmtCreateType.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtCreateType.getDataverseName());
         String typeName = stmtCreateType.getIdent().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -1229,7 +1229,7 @@
     protected void handleDataverseDropStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc) throws Exception {
         DataverseDropStatement stmtDelete = (DataverseDropStatement) stmt;
-        SourceLocation sourceLoc = stmtDelete.getSourceLocation();
+        SourceLocation sourceLoc = stmtDelete.getStartSourceLocation();
         String dataverseName = stmtDelete.getDataverseName().getValue();
         if (dataverseName.equals(MetadataBuiltinEntities.DEFAULT_DATAVERSE_NAME)) {
             throw new CompilationException(ErrorCode.COMPILATION_ERROR, sourceLoc,
@@ -1402,7 +1402,7 @@
     public void handleDatasetDropStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc, IRequestParameters requestParameters) throws Exception {
         DropDatasetStatement stmtDelete = (DropDatasetStatement) stmt;
-        SourceLocation sourceLoc = stmtDelete.getSourceLocation();
+        SourceLocation sourceLoc = stmtDelete.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtDelete.getDataverseName());
         String datasetName = stmtDelete.getDatasetName().getValue();
         MetadataLockUtil.dropDatasetBegin(lockManager, metadataProvider.getLocks(), dataverseName,
@@ -1478,7 +1478,7 @@
             IHyracksClientConnection hcc, IRequestParameters requestParameters) throws Exception {
 
         IndexDropStatement stmtIndexDrop = (IndexDropStatement) stmt;
-        SourceLocation sourceLoc = stmtIndexDrop.getSourceLocation();
+        SourceLocation sourceLoc = stmtIndexDrop.getStartSourceLocation();
         String datasetName = stmtIndexDrop.getDatasetName().getValue();
         String dataverseName = getActiveDataverse(stmtIndexDrop.getDataverseName());
         String indexName = stmtIndexDrop.getIndexName().getValue();
@@ -1672,7 +1672,7 @@
 
     protected void handleTypeDropStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         TypeDropStatement stmtTypeDrop = (TypeDropStatement) stmt;
-        SourceLocation sourceLoc = stmtTypeDrop.getSourceLocation();
+        SourceLocation sourceLoc = stmtTypeDrop.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtTypeDrop.getDataverseName());
         String typeName = stmtTypeDrop.getTypeName().getValue();
 
@@ -1700,7 +1700,7 @@
 
     protected void handleNodegroupDropStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         NodeGroupDropStatement stmtDelete = (NodeGroupDropStatement) stmt;
-        SourceLocation sourceLoc = stmtDelete.getSourceLocation();
+        SourceLocation sourceLoc = stmtDelete.getStartSourceLocation();
         String nodegroupName = stmtDelete.getNodeGroupName().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
@@ -1726,7 +1726,7 @@
 
     protected void handleCreateFunctionStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         CreateFunctionStatement cfs = (CreateFunctionStatement) stmt;
-        SourceLocation sourceLoc = cfs.getSourceLocation();
+        SourceLocation sourceLoc = cfs.getStartSourceLocation();
         FunctionSignature signature = cfs.getFunctionSignature();
         String dataverse = getActiveDataverseName(signature.getNamespace());
         signature.setNamespace(dataverse);
@@ -1744,7 +1744,7 @@
             //Check whether the function is use-able
             metadataProvider.setDefaultDataverse(dv);
             Query wrappedQuery = new Query(false);
-            wrappedQuery.setSourceLocation(sourceLoc);
+            wrappedQuery.setStartSourceLocation(sourceLoc);
             wrappedQuery.setBody(cfs.getFunctionBodyExpression());
             wrappedQuery.setTopLevel(false);
             List<VarIdentifier> paramVars = new ArrayList<>();
@@ -1805,7 +1805,7 @@
 
     protected void handleFunctionDropStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         FunctionDropStatement stmtDropFunction = (FunctionDropStatement) stmt;
-        SourceLocation sourceLoc = stmtDropFunction.getSourceLocation();
+        SourceLocation sourceLoc = stmtDropFunction.getStartSourceLocation();
         FunctionSignature signature = stmtDropFunction.getFunctionSignature();
         signature.setNamespace(getActiveDataverseName(signature.getNamespace()));
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -1847,7 +1847,7 @@
             CompiledLoadFromFileStatement cls =
                     new CompiledLoadFromFileStatement(dataverseName, loadStmt.getDatasetName().getValue(),
                             loadStmt.getAdapter(), loadStmt.getProperties(), loadStmt.dataIsAlreadySorted());
-            cls.setSourceLocation(stmt.getSourceLocation());
+            cls.setSourceLocation(stmt.getStartSourceLocation());
             JobSpecification spec =
                     apiFramework.compileQuery(hcc, metadataProvider, null, 0, null, sessionOutput, cls, null);
             afterCompile();
@@ -1944,7 +1944,7 @@
             CompiledDeleteStatement clfrqs = new CompiledDeleteStatement(stmtDelete.getVariableExpr(), dataverseName,
                     stmtDelete.getDatasetName().getValue(), stmtDelete.getCondition(), stmtDelete.getVarCounter(),
                     stmtDelete.getQuery());
-            clfrqs.setSourceLocation(stmt.getSourceLocation());
+            clfrqs.setSourceLocation(stmt.getStartSourceLocation());
             JobSpecification jobSpec =
                     rewriteCompileQuery(hcc, metadataProvider, clfrqs.getQuery(), clfrqs, stmtParams, stmtRewriter);
             afterCompile();
@@ -1986,7 +1986,7 @@
     private JobSpecification rewriteCompileInsertUpsert(IClusterInfoCollector clusterInfoCollector,
             MetadataProvider metadataProvider, InsertStatement insertUpsert, Map<String, IAObject> stmtParams,
             IStatementRewriter stmtRewriter) throws AlgebricksException, ACIDException {
-        SourceLocation sourceLoc = insertUpsert.getSourceLocation();
+        SourceLocation sourceLoc = insertUpsert.getStartSourceLocation();
 
         Map<VarIdentifier, IAObject> externalVars = createExternalVariables(stmtParams, stmtRewriter);
 
@@ -2003,13 +2003,13 @@
                 clfrqs = new CompiledInsertStatement(dataverseName, datasetName, rewrittenInsertUpsert.getQuery(),
                         rewrittenInsertUpsert.getVarCounter(), rewrittenInsertUpsert.getVar(),
                         rewrittenInsertUpsert.getReturnExpression());
-                clfrqs.setSourceLocation(insertUpsert.getSourceLocation());
+                clfrqs.setSourceLocation(insertUpsert.getStartSourceLocation());
                 break;
             case UPSERT:
                 clfrqs = new CompiledUpsertStatement(dataverseName, datasetName, rewrittenInsertUpsert.getQuery(),
                         rewrittenInsertUpsert.getVarCounter(), rewrittenInsertUpsert.getVar(),
                         rewrittenInsertUpsert.getReturnExpression());
-                clfrqs.setSourceLocation(insertUpsert.getSourceLocation());
+                clfrqs.setSourceLocation(insertUpsert.getStartSourceLocation());
                 break;
             default:
                 throw new CompilationException(ErrorCode.COMPILATION_ERROR, sourceLoc,
@@ -2023,7 +2023,7 @@
 
     protected void handleCreateFeedStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         CreateFeedStatement cfs = (CreateFeedStatement) stmt;
-        SourceLocation sourceLoc = cfs.getSourceLocation();
+        SourceLocation sourceLoc = cfs.getStartSourceLocation();
         String dataverseName = getActiveDataverse(cfs.getDataverseName());
         String feedName = cfs.getFeedName().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -2061,7 +2061,7 @@
         FeedPolicyEntity newPolicy = null;
         MetadataTransactionContext mdTxnCtx = null;
         CreateFeedPolicyStatement cfps = (CreateFeedPolicyStatement) stmt;
-        SourceLocation sourceLoc = cfps.getSourceLocation();
+        SourceLocation sourceLoc = cfps.getStartSourceLocation();
         dataverse = getActiveDataverse(null);
         policy = cfps.getPolicyName();
         MetadataLockUtil.createFeedPolicyBegin(lockManager, metadataProvider.getLocks(), dataverse,
@@ -2122,7 +2122,7 @@
     protected void handleDropFeedStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc) throws Exception {
         FeedDropStatement stmtFeedDrop = (FeedDropStatement) stmt;
-        SourceLocation sourceLoc = stmtFeedDrop.getSourceLocation();
+        SourceLocation sourceLoc = stmtFeedDrop.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtFeedDrop.getDataverseName());
         String feedName = stmtFeedDrop.getFeedName().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -2176,7 +2176,7 @@
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(mdTxnCtx);
         FeedPolicyDropStatement stmtFeedPolicyDrop = (FeedPolicyDropStatement) stmt;
-        SourceLocation sourceLoc = stmtFeedPolicyDrop.getSourceLocation();
+        SourceLocation sourceLoc = stmtFeedPolicyDrop.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtFeedPolicyDrop.getDataverseName());
         String policyName = stmtFeedPolicyDrop.getPolicyName().getValue();
         MetadataLockUtil.dropFeedPolicyBegin(lockManager, metadataProvider.getLocks(), dataverseName,
@@ -2204,7 +2204,7 @@
     private void handleStartFeedStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc) throws Exception {
         StartFeedStatement sfs = (StartFeedStatement) stmt;
-        SourceLocation sourceLoc = sfs.getSourceLocation();
+        SourceLocation sourceLoc = sfs.getStartSourceLocation();
         String dataverseName = getActiveDataverse(sfs.getDataverseName());
         String feedName = sfs.getFeedName().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -2258,7 +2258,7 @@
 
     private void handleStopFeedStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         StopFeedStatement sfst = (StopFeedStatement) stmt;
-        SourceLocation sourceLoc = sfst.getSourceLocation();
+        SourceLocation sourceLoc = sfst.getStartSourceLocation();
         String dataverseName = getActiveDataverse(sfst.getDataverseName());
         String feedName = sfst.getFeedName().getValue();
         EntityId entityId = new EntityId(Feed.EXTENSION_NAME, dataverseName, feedName);
@@ -2282,7 +2282,7 @@
     private void handleConnectFeedStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         FeedConnection fc;
         ConnectFeedStatement cfs = (ConnectFeedStatement) stmt;
-        SourceLocation sourceLoc = cfs.getSourceLocation();
+        SourceLocation sourceLoc = cfs.getStartSourceLocation();
         String dataverseName = getActiveDataverse(cfs.getDataverseName());
         String feedName = cfs.getFeedName();
         String datasetName = cfs.getDatasetName().getValue();
@@ -2340,7 +2340,7 @@
 
     protected void handleDisconnectFeedStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         DisconnectFeedStatement cfs = (DisconnectFeedStatement) stmt;
-        SourceLocation sourceLoc = cfs.getSourceLocation();
+        SourceLocation sourceLoc = cfs.getStartSourceLocation();
         String dataverseName = getActiveDataverse(cfs.getDataverseName());
         String datasetName = cfs.getDatasetName().getValue();
         String feedName = cfs.getFeedName().getValue();
@@ -2387,7 +2387,7 @@
     protected void handleCompactStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc) throws Exception {
         CompactStatement compactStatement = (CompactStatement) stmt;
-        SourceLocation sourceLoc = compactStatement.getSourceLocation();
+        SourceLocation sourceLoc = compactStatement.getStartSourceLocation();
         String dataverseName = getActiveDataverse(compactStatement.getDataverseName());
         String datasetName = compactStatement.getDatasetName().getValue();
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -2641,7 +2641,7 @@
 
     protected void handleCreateNodeGroupStatement(MetadataProvider metadataProvider, Statement stmt) throws Exception {
         NodegroupDecl stmtCreateNodegroup = (NodegroupDecl) stmt;
-        SourceLocation sourceLoc = stmtCreateNodegroup.getSourceLocation();
+        SourceLocation sourceLoc = stmtCreateNodegroup.getStartSourceLocation();
         String ngName = stmtCreateNodegroup.getNodegroupName().getValue();
 
         MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
@@ -2674,7 +2674,7 @@
     protected void handleExternalDatasetRefreshStatement(MetadataProvider metadataProvider, Statement stmt,
             IHyracksClientConnection hcc) throws Exception {
         RefreshExternalDatasetStatement stmtRefresh = (RefreshExternalDatasetStatement) stmt;
-        SourceLocation sourceLoc = stmtRefresh.getSourceLocation();
+        SourceLocation sourceLoc = stmtRefresh.getStartSourceLocation();
         String dataverseName = getActiveDataverse(stmtRefresh.getDataverseName());
         String datasetName = stmtRefresh.getDatasetName().getValue();
         TransactionState transactionState = TransactionState.COMMIT;
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
index 64520a4..a12838c 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
@@ -103,9 +103,10 @@
         jobIdFactory = new JobIdFactory(CcId.valueOf((short) 0));
         handler = new ActiveNotificationHandler();
         allDatasets = new ArrayList<>();
-        firstDataset = new Dataset(dataverseName, "firstDataset", null, null, null, null, null, null, null, null, 0, 0);
-        secondDataset =
-                new Dataset(dataverseName, "secondDataset", null, null, null, null, null, null, null, null, 0, 0);
+        firstDataset = new Dataset(dataverseName, "firstDataset", null, null, null, null, null, null, null, null, null,
+                null, 0, 0, 0L);
+        secondDataset = new Dataset(dataverseName, "secondDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         allDatasets.add(firstDataset);
         allDatasets.add(secondDataset);
         AtomicInteger threadCounter = new AtomicInteger(0);
@@ -981,8 +982,8 @@
         WaitForStateSubscriber recoveringSubscriber =
                 new WaitForStateSubscriber(listener, EnumSet.of(ActivityState.RECOVERING));
         recoveringSubscriber.sync();
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action add = users[1].addDataset(newDataset, listener);
         listener.allowStep();
         runningSubscriber.sync();
@@ -1008,8 +1009,8 @@
                 new WaitForStateSubscriber(listener, EnumSet.of(ActivityState.RECOVERING));
         recoveringSubscriber.sync();
         tempFailSubscriber = new WaitForStateSubscriber(listener, EnumSet.of(ActivityState.TEMPORARILY_FAILED));
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action add = users[1].addDataset(newDataset, listener);
         listener.allowStep();
         tempFailSubscriber.sync();
@@ -1035,8 +1036,8 @@
                 new WaitForStateSubscriber(listener, EnumSet.of(ActivityState.RECOVERING));
         recoveringSubscriber.sync();
         tempFailSubscriber = new WaitForStateSubscriber(listener, EnumSet.of(ActivityState.TEMPORARILY_FAILED));
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action add = users[1].addDataset(newDataset, listener);
         listener.allowStep();
         tempFailSubscriber.sync();
@@ -1054,8 +1055,8 @@
         WaitForStateSubscriber subscriber =
                 new WaitForStateSubscriber(listener, Collections.singleton(ActivityState.STARTING));
         subscriber.sync();
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action createDatasetAction = users[1].addDataset(newDataset, listener);
         listener.allowStep();
         startAction.sync();
@@ -1070,8 +1071,8 @@
     @Test
     public void testCreateNewDatasetWhileRunning() throws Exception {
         testStartWhenStartSucceed();
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action createDatasetAction = users[1].addDataset(newDataset, listener);
         createDatasetAction.sync();
         assertFailure(createDatasetAction, ErrorCode.CANNOT_ADD_DATASET_TO_ACTIVE_ENTITY);
@@ -1090,8 +1091,8 @@
         WaitForStateSubscriber subscriber =
                 new WaitForStateSubscriber(listener, EnumSet.of(ActivityState.SUSPENDING, ActivityState.SUSPENDED));
         subscriber.sync();
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action createDatasetAction = users[0].addDataset(newDataset, listener);
         listener.allowStep();
         listener.allowStep();
@@ -1109,8 +1110,8 @@
     public void testCreateNewDatasetWhilePermanentFailure() throws Exception {
         testRecoveryFailureAfterOneAttemptCompilationFailure();
         Assert.assertEquals(ActivityState.STOPPED, listener.getState());
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action createDatasetAction = users[0].addDataset(newDataset, listener);
         createDatasetAction.sync();
         assertSuccess(createDatasetAction);
@@ -1542,8 +1543,8 @@
         Action query = users[1].query(firstDataset, new Semaphore(1));
         query.sync();
         assertSuccess(query);
-        Dataset newDataset =
-                new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null, 0, 0);
+        Dataset newDataset = new Dataset(dataverseName, "newDataset", null, null, null, null, null, null, null, null,
+                null, null, 0, 0, 0L);
         Action addDataset = users[1].addDataset(newDataset, listener);
         // blocked by suspension
         Assert.assertFalse(addDataset.isDone());
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
index bcf68b5..cff3c1e 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
@@ -49,8 +49,9 @@
             String nodeGroupName, String compactionPolicy, Map<String, String> compactionPolicyProperties,
             IDatasetDetails datasetDetails, Map<String, String> hints, DatasetType datasetType, int datasetId,
             int pendingOp) {
-        super(dataverseName, datasetName, recordTypeDataverseName, recordTypeName, nodeGroupName, compactionPolicy,
-                compactionPolicyProperties, datasetDetails, hints, datasetType, datasetId, pendingOp);
+        super(dataverseName, datasetName, recordTypeDataverseName, recordTypeName, null, null, nodeGroupName,
+                compactionPolicy, compactionPolicyProperties, datasetDetails, hints, datasetType, datasetId, pendingOp,
+                0L);
     }
 
     @Override
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
index d5985b5..8a0386a 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
@@ -320,8 +320,9 @@
     private void addDataset(ICcApplicationContext appCtx, Dataset source, int datasetPostfix, boolean abort)
             throws Exception {
         Dataset dataset = new Dataset(source.getDataverseName(), "ds_" + datasetPostfix, source.getDataverseName(),
-                source.getDatasetType().name(), source.getNodeGroupName(), NoMergePolicyFactory.NAME, null,
-                source.getDatasetDetails(), source.getHints(), DatasetConfig.DatasetType.INTERNAL, datasetPostfix, 0);
+                source.getDatasetType().name(), source.getMetaItemTypeDataverseName(), source.getMetaItemTypeName(),
+                source.getNodeGroupName(), NoMergePolicyFactory.NAME, null, source.getDatasetDetails(),
+                source.getHints(), DatasetConfig.DatasetType.INTERNAL, datasetPostfix, 0, source.getRebalanceCount());
         MetadataProvider metadataProvider = new MetadataProvider(appCtx, null);
         final MetadataTransactionContext writeTxn = MetadataManager.INSTANCE.beginTransaction();
         metadataProvider.setMetadataTxnContext(writeTxn);
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
index 31a6004..638a302 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
@@ -103,11 +103,11 @@
             StorageComponentProvider storageManager = new StorageComponentProvider();
             List<List<String>> partitioningKeys = new ArrayList<>();
             partitioningKeys.add(Collections.singletonList("key"));
-            Dataset dataset = new Dataset(DATAVERSE_NAME, DATASET_NAME, DATAVERSE_NAME, DATA_TYPE_NAME, NODE_GROUP_NAME,
-                    NoMergePolicyFactory.NAME,
-                    null, new InternalDatasetDetails(null, InternalDatasetDetails.PartitioningStrategy.HASH,
-                            partitioningKeys, null, null, null, false, null),
-                    null, DatasetConfig.DatasetType.INTERNAL, DATASET_ID, 0);
+            Dataset dataset = new Dataset(DATAVERSE_NAME, DATASET_NAME, DATAVERSE_NAME, DATA_TYPE_NAME, null, null,
+                    NODE_GROUP_NAME, NoMergePolicyFactory.NAME, null,
+                    new InternalDatasetDetails(null, InternalDatasetDetails.PartitioningStrategy.HASH, partitioningKeys,
+                            null, null, null, false, null),
+                    null, DatasetConfig.DatasetType.INTERNAL, DATASET_ID, 0, 0L);
             // create dataset
             TestNodeController.PrimaryIndexInfo indexInfo = nc.createPrimaryIndex(dataset, KEY_TYPES, RECORD_TYPE,
                     META_TYPE, null, storageManager, KEY_INDEXES, KEY_INDICATORS_LIST, 0);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 0127896..1a2474f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -107,7 +107,7 @@
         <expected-error>ASX0013: Duplicate field name "b" (in line 27, at column 20)</expected-error>
         <expected-error>ASX0013: Duplicate field name "c" (in line 27, at column 11)</expected-error>
         <expected-error>ASX0013: Duplicate field name "d" (in line 27, at column 11)</expected-error>
-        <expected-error>ASX0013: Duplicate field name "e" (in line 27, at column 14)</expected-error>
+        <expected-error>ASX0013: Duplicate field name "e" (in line 27, at column 11)</expected-error>
         <expected-error>ASX0013: Duplicate field name "f" (in line 27, at column 11)</expected-error>
         <expected-error>ASX0013: Duplicate field name "g" (in line 27, at column 11)</expected-error>
       </compilation-unit>
@@ -2446,7 +2446,8 @@
     <test-case FilePath="dml">
       <compilation-unit name="upsert-dataset-with-meta">
         <output-dir compare="Text">upsert-dataset-with-meta</output-dir>
-        <expected-error>upsert into dataset is not supported on Datasets with Meta records</expected-error>
+        <expected-error>Meta field not found in input data</expected-error>
+        <source-location>false</source-location>
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
@@ -10227,8 +10228,8 @@
     <test-case FilePath="limit">
       <compilation-unit name="limit_type_02">
         <output-dir compare="Text">limit_type_01</output-dir>
-        <expected-error>ASX0039: Expected integer value, got 2.75 (in line 28, at column 10)</expected-error>
-        <expected-error>ASX0039: Expected integer value, got 1.75 (in line 28, at column 19)</expected-error>
+        <expected-error>ASX0039: Expected integer value, got 2.75 (in line 28, at column 7)</expected-error>
+        <expected-error>ASX0039: Expected integer value, got 1.75 (in line 28, at column 16)</expected-error>
         <expected-error>ASX1091: Type mismatch: expected value of type integer, but got the value of type string (in line 28, at column 7)</expected-error>
         <expected-error>ASX1091: Type mismatch: expected value of type integer, but got the value of type boolean (in line 28, at column 16)</expected-error>
         <expected-error>ASX0021: Source value 9999999999 is out of range that integer can hold - integer.MAX_VALUE: 2147483647, integer.MIN_VALUE: -2147483648</expected-error>
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
index 3a784e3..0acca53 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
@@ -22,14 +22,35 @@
 import org.apache.hyracks.api.exceptions.SourceLocation;
 
 public abstract class AbstractLangExpression implements ILangExpression {
-    private SourceLocation sourceLoc;
+    private SourceLocation startSourceLoc;
+    private SourceLocation endSourceLoc;
+    private String rawExpression;
 
-    public void setSourceLocation(SourceLocation sourceLoc) {
-        this.sourceLoc = sourceLoc;
+    @Override
+    public void setStartSourceLocation(SourceLocation sourceLoc) {
+        this.startSourceLoc = sourceLoc;
     }
 
     @Override
-    public SourceLocation getSourceLocation() {
-        return sourceLoc;
+    public SourceLocation getStartSourceLocation() {
+        return startSourceLoc;
+    }
+
+    @Override
+    public void setEndSourceLocation(SourceLocation sourceLoc) {
+        this.endSourceLoc = sourceLoc;
+    }
+
+    @Override
+    public SourceLocation getEndSourceLocation() {
+        return endSourceLoc;
+    }
+
+    public void setRawExpression(String rawExpression) {
+        this.rawExpression = rawExpression;
+    }
+
+    public String getRawExpression() {
+        return rawExpression;
     }
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
index 3afff76..40fe013 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
@@ -40,4 +40,8 @@
         PRIMARY_EXPRESSION,
         CASE_EXPRESSION
     }
+
+    void setRawExpression(String rawExpression);
+
+    String getRawExpression();
 }
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 e80d7bb..a3839e1 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
@@ -25,5 +25,12 @@
 public interface ILangExpression {
     <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws CompilationException;
 
-    SourceLocation getSourceLocation();
+    SourceLocation getStartSourceLocation();
+
+    SourceLocation getEndSourceLocation();
+
+    void setStartSourceLocation(SourceLocation sourceLoc);
+
+    void setEndSourceLocation(SourceLocation sourceLoc);
+
 }
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 ab6b3f1..163990c 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
@@ -70,4 +70,9 @@
         LiteralExpr target = (LiteralExpr) object;
         return Objects.equals(value, target.value);
     }
+
+    @Override
+    public String toString() {
+        return value.toString();
+    }
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
index f332b0a..ea87bbb 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
@@ -21,6 +21,7 @@
 import java.util.Stack;
 
 import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.lang.common.base.ILangExpression;
 import org.apache.asterix.lang.common.context.RootScopeFactory;
 import org.apache.asterix.lang.common.context.Scope;
 import org.apache.asterix.lang.common.struct.Identifier;
@@ -110,6 +111,7 @@
 
     /**
      * get scope preceding the current scope
+     * 
      * @return preceding scope or {@code null} if current scope is the top one
      */
     public final Scope getPrecedingScope() {
@@ -307,19 +309,32 @@
         return idx >= 0 && idx < inputLines.length ? inputLines[idx] : "";
     }
 
+    protected String extractFragment(ILangExpression expr) {
+        try {
+            return extractFragment(expr.getStartSourceLocation().getLine(), expr.getStartSourceLocation().getColumn(),
+                    expr.getEndSourceLocation().getLine(), expr.getEndSourceLocation().getColumn());
+        } catch (Throwable th) {
+            throw th;
+        }
+    }
+
     protected String extractFragment(int beginLine, int beginColumn, int endLine, int endColumn) {
-        StringBuilder extract = new StringBuilder();
-        if (beginLine == endLine) {
-            // special case that we need to handle separately
-            return inputLines[beginLine - 1].substring(beginColumn, endColumn - 1).trim();
-        }
-        extract.append(inputLines[beginLine - 1].substring(beginColumn));
-        for (int i = beginLine + 1; i < endLine; i++) {
+        try {
+            StringBuilder extract = new StringBuilder();
+            if (beginLine == endLine) {
+                // special case that we need to handle separately
+                return inputLines[beginLine - 1].substring(beginColumn - 1, endColumn).trim();
+            }
+            extract.append(inputLines[beginLine - 1].substring(beginColumn - 1));
+            for (int i = beginLine + 1; i < endLine; i++) {
+                extract.append("\n");
+                extract.append(inputLines[i - 1]);
+            }
             extract.append("\n");
-            extract.append(inputLines[i - 1]);
+            extract.append(inputLines[endLine - 1].substring(0, endColumn));
+            return extract.toString().trim();
+        } catch (Throwable th) {
+            throw th;
         }
-        extract.append("\n");
-        extract.append(inputLines[endLine - 1].substring(0, endColumn - 1));
-        return extract.toString().trim();
     }
 }
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 6752f77..a4595c1 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
@@ -119,7 +119,7 @@
                 if (!namespace.equals(FunctionConstants.ASTERIX_NS)
                         && !namespace.equals(AlgebricksBuiltinFunctions.ALGEBRICKS_NS)
                         && metadataProvider.findDataverse(namespace) == null) {
-                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, functionCall.getSourceLocation(),
+                    throw new CompilationException(ErrorCode.COMPILATION_ERROR, functionCall.getStartSourceLocation(),
                             "In function call \"" + namespace + "." + signature.getName() + "(...)\", the dataverse \""
                                     + namespace + "\" cannot be found!");
                 }
@@ -135,7 +135,7 @@
             if (function == null) {
                 FunctionSignature normalizedSignature = functionNormalizer == null ? signature
                         : functionNormalizer.normalizeBuiltinFunctionSignature(signature,
-                                functionCall.getSourceLocation());
+                                functionCall.getStartSourceLocation());
                 if (BuiltinFunctions.isBuiltinCompilerFunction(normalizedSignature, includePrivateFunctions)) {
                     continue;
                 }
@@ -146,7 +146,7 @@
                 } else {
                     messageBuilder.append("function " + signature + " is not defined");
                 }
-                throw new CompilationException(ErrorCode.COMPILATION_ERROR, functionCall.getSourceLocation(),
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, functionCall.getStartSourceLocation(),
                         messageBuilder.toString());
             }
 
@@ -155,7 +155,8 @@
                 FunctionDecl functionDecl = functionParser.getFunctionDecl(function);
                 if (functionDecl != null) {
                     if (functionDecls.contains(functionDecl)) {
-                        throw new CompilationException(ErrorCode.COMPILATION_ERROR, functionCall.getSourceLocation(),
+                        throw new CompilationException(ErrorCode.COMPILATION_ERROR,
+                                functionCall.getStartSourceLocation(),
                                 "Recursive invocation " + functionDecls.get(functionDecls.size() - 1).getSignature()
                                         + " <==> " + functionDecl.getSignature());
                     }
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 bf9cf89..d127999 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
@@ -290,17 +290,17 @@
                 if (e.getKind() == Kind.VARIABLE_EXPRESSION) {
                     subts.addSubstituion(new VariableExpr(param), e);
                 } else {
-                    SourceLocation sourceLoc = e.getSourceLocation();
+                    SourceLocation sourceLoc = e.getStartSourceLocation();
                     VarIdentifier newV = context.newVariable();
                     Pair<ILangExpression, VariableSubstitutionEnvironment> p1 =
                             e.accept(cloneVisitor, new VariableSubstitutionEnvironment());
                     VariableExpr newVRef1 = new VariableExpr(newV);
-                    newVRef1.setSourceLocation(sourceLoc);
+                    newVRef1.setStartSourceLocation(sourceLoc);
                     LetClause c = new LetClause(newVRef1, (Expression) p1.first);
-                    c.setSourceLocation(sourceLoc);
+                    c.setStartSourceLocation(sourceLoc);
                     clauses.add(c);
                     VariableExpr newVRef2 = new VariableExpr(newV);
-                    newVRef2.setSourceLocation(sourceLoc);
+                    newVRef2.setStartSourceLocation(sourceLoc);
                     subts.addSubstituion(new VariableExpr(param), newVRef2);
                 }
             }
@@ -332,9 +332,9 @@
     }
 
     private Expression rewriteFunctionBody(FunctionDecl fnDecl) throws CompilationException {
-        SourceLocation sourceLoc = fnDecl.getSourceLocation();
+        SourceLocation sourceLoc = fnDecl.getStartSourceLocation();
         Query wrappedQuery = new Query(false);
-        wrappedQuery.setSourceLocation(sourceLoc);
+        wrappedQuery.setStartSourceLocation(sourceLoc);
         wrappedQuery.setBody(fnDecl.getFuncBody());
         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 e415a63..b01dc12 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
@@ -74,7 +74,7 @@
         VariableExpr varExpr = lc.getVarExpr();
         VariableExpr newVe = generateNewVariable(context, varExpr);
         LetClause newLet = new LetClause(newVe, (Expression) p1.first);
-        newLet.setSourceLocation(lc.getSourceLocation());
+        newLet.setStartSourceLocation(lc.getStartSourceLocation());
         return new Pair<>(newLet, VariableCloneAndSubstitutionUtil.eliminateSubstFromList(lc.getVarExpr(), env));
     }
 
@@ -109,7 +109,7 @@
         }
         GroupbyClause newGroup = new GroupbyClause(newGbyList, newDecorList, newWithMap, newGroupVar, newGroupFieldList,
                 gc.hasHashGroupByHint(), gc.isGroupAll());
-        newGroup.setSourceLocation(gc.getSourceLocation());
+        newGroup.setStartSourceLocation(gc.getStartSourceLocation());
         return new Pair<>(newGroup, newSubs);
     }
 
@@ -129,7 +129,7 @@
         }
         Pair<ILangExpression, VariableSubstitutionEnvironment> p2 = qe.getSatisfiesExpr().accept(this, newSubs);
         QuantifiedExpression qe2 = new QuantifiedExpression(qe.getQuantifier(), newPairs, (Expression) p2.first);
-        qe2.setSourceLocation(qe.getSourceLocation());
+        qe2.setStartSourceLocation(qe.getStartSourceLocation());
         qe2.addHints(qe.getHints());
         return new Pair<>(qe2, newSubs);
     }
@@ -139,7 +139,7 @@
             VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = wc.getWhereExpr().accept(this, env);
         WhereClause newW = new WhereClause((Expression) p1.first);
-        newW.setSourceLocation(wc.getSourceLocation());
+        newW.setStartSourceLocation(wc.getStartSourceLocation());
         return new Pair<>(newW, p1.second);
     }
 
@@ -148,7 +148,7 @@
             VariableSubstitutionEnvironment env) throws CompilationException {
         List<Expression> exprList = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(pf.getExprList(), env, this);
         CallExpr f = new CallExpr(pf.getFunctionSignature(), exprList);
-        f.setSourceLocation(pf.getSourceLocation());
+        f.setStartSourceLocation(pf.getStartSourceLocation());
         f.addHints(pf.getHints());
         return new Pair<>(f, env);
     }
@@ -160,12 +160,12 @@
         for (VarIdentifier vi : fd.getParamList()) {
             VariableExpr varExpr = new VariableExpr(vi);
             if (!env.constainsOldVar(varExpr)) {
-                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fd.getSourceLocation(),
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fd.getStartSourceLocation(),
                         "Parameter " + vi + " does not appear in the substitution list.");
             }
             Expression newExpr = env.findSubstitution(varExpr);
             if (newExpr.getKind() != Kind.VARIABLE_EXPRESSION) {
-                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fd.getSourceLocation(),
+                throw new CompilationException(ErrorCode.COMPILATION_ERROR, fd.getStartSourceLocation(),
                         "Parameter " + vi + " cannot be substituted by a non-variable expression.");
             }
             newList.add(((VariableExpr) newExpr).getVar());
@@ -173,7 +173,7 @@
 
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = fd.getFuncBody().accept(this, env);
         FunctionDecl newF = new FunctionDecl(fd.getSignature(), newList, (Expression) p1.first);
-        newF.setSourceLocation(fd.getSourceLocation());
+        newF.setStartSourceLocation(fd.getStartSourceLocation());
         return new Pair<>(newF, env);
     }
 
@@ -184,7 +184,7 @@
         Pair<ILangExpression, VariableSubstitutionEnvironment> p2 = ifexpr.getThenExpr().accept(this, env);
         Pair<ILangExpression, VariableSubstitutionEnvironment> p3 = ifexpr.getElseExpr().accept(this, env);
         IfExpr i = new IfExpr((Expression) p1.first, (Expression) p2.first, (Expression) p3.first);
-        i.setSourceLocation(ifexpr.getSourceLocation());
+        i.setStartSourceLocation(ifexpr.getStartSourceLocation());
         i.addHints(ifexpr.getHints());
         return new Pair<>(i, env);
     }
@@ -201,7 +201,7 @@
             p2 = new Pair<>(null, null);
         }
         LimitClause c = new LimitClause((Expression) p1.first, (Expression) p2.first);
-        c.setSourceLocation(lc.getSourceLocation());
+        c.setStartSourceLocation(lc.getStartSourceLocation());
         return new Pair<>(c, env);
     }
 
@@ -211,7 +211,7 @@
         List<Expression> oldExprList = lc.getExprList();
         List<Expression> exprs = VariableCloneAndSubstitutionUtil.visitAndCloneExprList(oldExprList, env, this);
         ListConstructor c = new ListConstructor(lc.getType(), exprs);
-        c.setSourceLocation(lc.getSourceLocation());
+        c.setStartSourceLocation(lc.getStartSourceLocation());
         c.addHints(lc.getHints());
         return new Pair<>(c, env);
     }
@@ -232,7 +232,7 @@
             exprs.add((Expression) p1.first);
         }
         OperatorExpr oe = new OperatorExpr(exprs, op.getExprBroadcastIdx(), op.getOpList(), op.isCurrentop());
-        oe.setSourceLocation(op.getSourceLocation());
+        oe.setStartSourceLocation(op.getStartSourceLocation());
         oe.addHints(op.getHints());
         return new Pair<>(oe, env);
     }
@@ -246,7 +246,7 @@
         oc2.setNumFrames(oc.getNumFrames());
         oc2.setNumTuples(oc.getNumTuples());
         oc2.setRangeMap(oc.getRangeMap());
-        oc2.setSourceLocation(oc.getSourceLocation());
+        oc2.setStartSourceLocation(oc.getStartSourceLocation());
         return new Pair<>(oc2, env);
     }
 
@@ -256,7 +256,7 @@
         Query newQ = new Query(q.isExplain());
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = q.getBody().accept(this, env);
         newQ.setBody((Expression) p1.first);
-        newQ.setSourceLocation(q.getSourceLocation());
+        newQ.setStartSourceLocation(q.getStartSourceLocation());
         return new Pair<>(newQ, p1.second);
     }
 
@@ -272,7 +272,7 @@
             newFbs.add(fb2);
         }
         RecordConstructor newRc = new RecordConstructor(newFbs);
-        newRc.setSourceLocation(rc.getSourceLocation());
+        newRc.setStartSourceLocation(rc.getStartSourceLocation());
         newRc.addHints(rc.getHints());
         return new Pair<>(newRc, env);
     }
@@ -282,7 +282,7 @@
             VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = u.getExpr().accept(this, env);
         UnaryExpr newU = new UnaryExpr(u.getExprType(), (Expression) p1.first);
-        newU.setSourceLocation(u.getSourceLocation());
+        newU.setStartSourceLocation(u.getStartSourceLocation());
         newU.addHints(u.getHints());
         return new Pair<>(newU, env);
     }
@@ -298,7 +298,7 @@
         }
         IndexAccessor i = new IndexAccessor((Expression) p1.first, indexExpr);
         i.setAny(ia.isAny());
-        i.setSourceLocation(ia.getSourceLocation());
+        i.setStartSourceLocation(ia.getStartSourceLocation());
         i.addHints(ia.getHints());
         return new Pair<>(i, env);
     }
@@ -308,7 +308,7 @@
             VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p = fa.getExpr().accept(this, env);
         FieldAccessor newF = new FieldAccessor((Expression) p.first, fa.getIdent());
-        newF.setSourceLocation(fa.getSourceLocation());
+        newF.setStartSourceLocation(fa.getStartSourceLocation());
         newF.addHints(fa.getHints());
         return new Pair<>(newF, p.second);
     }
@@ -329,7 +329,7 @@
             VarIdentifier var = context.getRewrittenVar(expr.getVar().getId());
             if (var != null) {
                 VariableExpr newVarExpr = new VariableExpr(var);
-                newVarExpr.setSourceLocation(expr.getSourceLocation());
+                newVarExpr.setStartSourceLocation(expr.getStartSourceLocation());
                 newVarExpr.addHints(expr.getHints());
                 return newVarExpr;
             }
@@ -350,7 +350,7 @@
         VarIdentifier vi = varExpr.getVar();
         VarIdentifier newVar = context.mapOldId(vi.getId(), vi.getValue());
         VariableExpr newVarExpr = new VariableExpr(newVar);
-        newVarExpr.setSourceLocation(varExpr.getSourceLocation());
+        newVarExpr.setStartSourceLocation(varExpr.getStartSourceLocation());
         return newVarExpr;
     }
 
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 999aa7a..db52467 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
@@ -19,7 +19,6 @@
 
 package org.apache.asterix.lang.sqlpp.parser;
 
-import java.io.StringReader;
 import java.util.List;
 
 import org.apache.asterix.common.exceptions.CompilationException;
@@ -67,7 +66,7 @@
         builder.append("\n");
         builder.append("};");
 
-        IParser parser = parserFactory.createParser(new StringReader(new String(builder)));
+        IParser parser = parserFactory.createParser(new String(builder));
         List<Statement> statements = parser.parse();
         FunctionDecl decl = (FunctionDecl) statements.get(1);
         return decl;
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 14a7ec0..7d03809 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
@@ -58,7 +58,7 @@
         for (GbyVariableExpressionPair gbyKeyPair : groupbyClause.getGbyPairList()) {
             if (gbyKeyPair.getVar() == null) {
                 VariableExpr varExpr = new VariableExpr(context.newVariable());
-                varExpr.setSourceLocation(gbyKeyPair.getExpr().getSourceLocation());
+                varExpr.setStartSourceLocation(gbyKeyPair.getExpr().getStartSourceLocation());
                 gbyKeyPair.setVar(varExpr);
             }
         }
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 a270530..4d04db8 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
@@ -168,7 +168,7 @@
 
         for (Map.Entry<Expression, VarIdentifier> me : letVarMap.entrySet()) {
             Expression columnAliasVarExpr = me.getKey();
-            SourceLocation sourceLoc = columnAliasVarExpr.getSourceLocation();
+            SourceLocation sourceLoc = columnAliasVarExpr.getStartSourceLocation();
             ColumnAliasBinding columnAliasBinding = aliasBindingMap.get(columnAliasVarExpr);
             if (columnAliasBinding == null) {
                 throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, sourceLoc);
@@ -177,14 +177,14 @@
 
             // add a let clause defining the new variable
             VariableExpr letVarDefExpr = new VariableExpr(letVarId);
-            letVarDefExpr.setSourceLocation(sourceLoc);
+            letVarDefExpr.setStartSourceLocation(sourceLoc);
             LetClause newLetClause = new LetClause(letVarDefExpr, columnAliasBinding.getExpression());
-            newLetClause.setSourceLocation(sourceLoc);
+            newLetClause.setStartSourceLocation(sourceLoc);
             targetLetClauses.add(newLetClause);
 
             // replace original column alias expression with variable reference
             VariableExpr letVarRefExpr = new VariableExpr(letVarId);
-            letVarRefExpr.setSourceLocation(sourceLoc);
+            letVarRefExpr.setStartSourceLocation(sourceLoc);
             columnAliasBinding.setExpression(letVarRefExpr);
 
             context.addExcludedForFieldAccessVar(letVarId);
@@ -276,7 +276,7 @@
                         letVarMap.put(expr, var);
                     }
                     VariableExpr varExpr = new VariableExpr(var);
-                    varExpr.setSourceLocation(expr.getSourceLocation());
+                    varExpr.setStartSourceLocation(expr.getStartSourceLocation());
                     return varExpr;
             }
         }
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 23b4d60..64e8496 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
@@ -80,14 +80,14 @@
     private Expression processLikeOperator(OperatorExpr operatorExpr, OperatorType opType) {
         CallExpr likeExpr =
                 new CallExpr(new FunctionSignature(BuiltinFunctions.STRING_LIKE), operatorExpr.getExprList());
-        likeExpr.setSourceLocation(operatorExpr.getSourceLocation());
+        likeExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
         switch (opType) {
             case LIKE:
                 return likeExpr;
             case NOT_LIKE:
                 CallExpr notLikeExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.NOT),
                         new ArrayList<>(Collections.singletonList(likeExpr)));
-                notLikeExpr.setSourceLocation(operatorExpr.getSourceLocation());
+                notLikeExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
                 return notLikeExpr;
             default:
                 throw new IllegalArgumentException(String.valueOf(opType));
@@ -96,27 +96,27 @@
 
     private Expression processInOperator(OperatorExpr operatorExpr, OperatorType opType) throws CompilationException {
         VariableExpr bindingVar = new VariableExpr(context.newVariable());
-        bindingVar.setSourceLocation(operatorExpr.getSourceLocation());
+        bindingVar.setStartSourceLocation(operatorExpr.getStartSourceLocation());
         Expression itemExpr = operatorExpr.getExprList().get(0);
         Expression collectionExpr = operatorExpr.getExprList().get(1);
         OperatorExpr comparison = new OperatorExpr();
         comparison.addOperand(itemExpr);
         comparison.addOperand(bindingVar);
         comparison.setCurrentop(true);
-        comparison.setSourceLocation(operatorExpr.getSourceLocation());
+        comparison.setStartSourceLocation(operatorExpr.getStartSourceLocation());
         if (opType == OperatorType.IN) {
             comparison.addOperator(OperatorType.EQ);
             QuantifiedExpression quantExpr = new QuantifiedExpression(Quantifier.SOME,
                     new ArrayList<>(Collections.singletonList(new QuantifiedPair(bindingVar, collectionExpr))),
                     comparison);
-            quantExpr.setSourceLocation(operatorExpr.getSourceLocation());
+            quantExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
             return quantExpr;
         } else {
             comparison.addOperator(OperatorType.NEQ);
             QuantifiedExpression quantExpr = new QuantifiedExpression(Quantifier.EVERY,
                     new ArrayList<>(Collections.singletonList(new QuantifiedPair(bindingVar, collectionExpr))),
                     comparison);
-            quantExpr.setSourceLocation(operatorExpr.getSourceLocation());
+            quantExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
             return quantExpr;
         }
     }
@@ -125,7 +125,7 @@
         // All operators have to be "||"s (according to the grammar).
         CallExpr callExpr = new CallExpr(new FunctionSignature(FunctionConstants.ASTERIX_NS, FunctionMapUtil.CONCAT, 1),
                 operatorExpr.getExprList());
-        callExpr.setSourceLocation(operatorExpr.getSourceLocation());
+        callExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
         return callExpr;
     }
 
@@ -138,22 +138,22 @@
 
         // Creates the expression target >= left.
         Expression leftComparison = createOperatorExpression(OperatorType.GE, target, left, operatorExpr.getHints(),
-                operatorExpr.getSourceLocation());
+                operatorExpr.getStartSourceLocation());
         // Creates the expression target <= right.
         Expression targetCopy = (Expression) SqlppRewriteUtil.deepCopy(target);
         Expression rightComparison = createOperatorExpression(OperatorType.LE, targetCopy, right,
-                operatorExpr.getHints(), operatorExpr.getSourceLocation());
+                operatorExpr.getHints(), operatorExpr.getStartSourceLocation());
         OperatorExpr andExpr = new OperatorExpr();
         andExpr.addOperand(leftComparison);
         andExpr.addOperand(rightComparison);
         andExpr.addOperator(OperatorType.AND);
-        andExpr.setSourceLocation(operatorExpr.getSourceLocation());
+        andExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
         if (opType == OperatorType.BETWEEN) {
             return andExpr;
         } else {
             CallExpr callExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.NOT),
                     new ArrayList<>(Collections.singletonList(andExpr)));
-            callExpr.setSourceLocation(operatorExpr.getSourceLocation());
+            callExpr.setStartSourceLocation(operatorExpr.getStartSourceLocation());
             return callExpr;
         }
     }
@@ -164,7 +164,7 @@
         comparison.addOperand(lhs);
         comparison.addOperand(rhs);
         comparison.addOperator(opType);
-        comparison.setSourceLocation(sourceLoc);
+        comparison.setStartSourceLocation(sourceLoc);
         if (hints != null) {
             for (IExpressionAnnotation hint : hints) {
                 comparison.addHint(hint);
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 f0a0f87..c1fa9b0 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
@@ -82,28 +82,28 @@
         OrderbyClause orderBy = selectExpression.getOrderbyClause();
         LimitClause limit = selectExpression.getLimitClause();
 
-        SourceLocation sourceLoc = selectExpression.getSourceLocation();
+        SourceLocation sourceLoc = selectExpression.getStartSourceLocation();
 
         // Wraps the set operation part with a subquery.
         SelectExpression nestedSelectExpression = new SelectExpression(null, selectSetOperation, null, null, true);
-        nestedSelectExpression.setSourceLocation(sourceLoc);
+        nestedSelectExpression.setStartSourceLocation(sourceLoc);
         VariableExpr newBindingVar = new VariableExpr(context.newVariable()); // Binding variable for the subquery.
-        newBindingVar.setSourceLocation(sourceLoc);
+        newBindingVar.setStartSourceLocation(sourceLoc);
         FromTerm newFromTerm = new FromTerm(nestedSelectExpression, newBindingVar, null, null);
-        newFromTerm.setSourceLocation(sourceLoc);
+        newFromTerm.setStartSourceLocation(sourceLoc);
         FromClause newFromClause = new FromClause(new ArrayList<>(Collections.singletonList(newFromTerm)));
-        newFromClause.setSourceLocation(sourceLoc);
+        newFromClause.setStartSourceLocation(sourceLoc);
         SelectClause selectClause = new SelectClause(new SelectElement(newBindingVar), null, false);
-        selectClause.setSourceLocation(sourceLoc);
+        selectClause.setStartSourceLocation(sourceLoc);
         SelectBlock selectBlock = new SelectBlock(selectClause, newFromClause, null, null, null, null, null);
-        selectBlock.setSourceLocation(sourceLoc);
+        selectBlock.setStartSourceLocation(sourceLoc);
         SelectSetOperation newSelectSetOperation =
                 new SelectSetOperation(new SetOperationInput(selectBlock, null), null);
-        newSelectSetOperation.setSourceLocation(sourceLoc);
+        newSelectSetOperation.setStartSourceLocation(sourceLoc);
         // Puts together the generated select-from-where query and order by/limit.
         SelectExpression newSelectExpression = new SelectExpression(selectExpression.getLetList(),
                 newSelectSetOperation, orderBy, limit, selectExpression.isSubquery());
-        newSelectExpression.setSourceLocation(sourceLoc);
+        newSelectExpression.setStartSourceLocation(sourceLoc);
         return super.visit(newSelectExpression, arg);
     }
 
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 abfa14e..057844e 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
@@ -43,7 +43,7 @@
         //TODO(buyingyi): rewrite SQL temporal functions
         FunctionSignature functionSignature = callExpr.getFunctionSignature();
         callExpr.setFunctionSignature(FunctionMapUtil.normalizeBuiltinFunctionSignature(functionSignature, true,
-                callExpr.getSourceLocation()));
+                callExpr.getStartSourceLocation()));
         List<Expression> newExprList = new ArrayList<>();
         for (Expression expr : callExpr.getExprList()) {
             newExprList.add(expr.accept(this, arg));
@@ -75,7 +75,7 @@
         }
         newExprList.add(newCaseExpr.getElseExpr());
         CallExpr callExpr = new CallExpr(functionSignature, newExprList);
-        callExpr.setSourceLocation(caseExpr.getSourceLocation());
+        callExpr.setStartSourceLocation(caseExpr.getStartSourceLocation());
         return callExpr;
     }
 
@@ -83,7 +83,7 @@
     // as type promotion semantics.
     private CaseExpression normalizeCaseExpr(CaseExpression caseExpr) throws CompilationException {
         LiteralExpr trueLiteral = new LiteralExpr(TrueLiteral.INSTANCE);
-        trueLiteral.setSourceLocation(caseExpr.getSourceLocation());
+        trueLiteral.setStartSourceLocation(caseExpr.getStartSourceLocation());
         Expression conditionExpr = caseExpr.getConditionExpr();
         if (trueLiteral.equals(conditionExpr)) {
             return caseExpr;
@@ -94,12 +94,12 @@
             operatorExpr.addOperand((Expression) SqlppRewriteUtil.deepCopy(expr));
             operatorExpr.addOperand(caseExpr.getConditionExpr());
             operatorExpr.addOperator(OperatorType.EQ);
-            operatorExpr.setSourceLocation(expr.getSourceLocation());
+            operatorExpr.setStartSourceLocation(expr.getStartSourceLocation());
             normalizedWhenExprs.add(operatorExpr);
         }
         CaseExpression newCaseExpr =
                 new CaseExpression(trueLiteral, normalizedWhenExprs, caseExpr.getThenExprs(), caseExpr.getElseExpr());
-        newCaseExpr.setSourceLocation(caseExpr.getSourceLocation());
+        newCaseExpr.setStartSourceLocation(caseExpr.getStartSourceLocation());
         return newCaseExpr;
     }
 
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
index 80844ab..fee2e62 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
@@ -82,28 +82,28 @@
      * rewrites {@code expr -> FROM expr AS i SELECT DISTINCT VALUE i}
      */
     private Expression rewriteArgument(Expression argExpr) throws CompilationException {
-        SourceLocation sourceLoc = argExpr.getSourceLocation();
+        SourceLocation sourceLoc = argExpr.getStartSourceLocation();
         // From clause
         VariableExpr fromBindingVar = new VariableExpr(context.newVariable());
-        fromBindingVar.setSourceLocation(sourceLoc);
+        fromBindingVar.setStartSourceLocation(sourceLoc);
         FromTerm fromTerm = new FromTerm(argExpr, fromBindingVar, null, null);
-        fromTerm.setSourceLocation(sourceLoc);
+        fromTerm.setStartSourceLocation(sourceLoc);
         FromClause fromClause = new FromClause(Collections.singletonList(fromTerm));
-        fromClause.setSourceLocation(sourceLoc);
+        fromClause.setStartSourceLocation(sourceLoc);
 
         // Select clause.
         SelectElement selectElement = new SelectElement(fromBindingVar);
-        selectElement.setSourceLocation(sourceLoc);
+        selectElement.setStartSourceLocation(sourceLoc);
         SelectClause selectClause = new SelectClause(selectElement, null, true);
-        selectClause.setSourceLocation(sourceLoc);
+        selectClause.setStartSourceLocation(sourceLoc);
 
         // Construct the select expression.
         SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, null, null, null, null, null);
-        selectBlock.setSourceLocation(sourceLoc);
+        selectBlock.setStartSourceLocation(sourceLoc);
         SelectSetOperation selectSetOperation = new SelectSetOperation(new SetOperationInput(selectBlock, null), null);
-        selectSetOperation.setSourceLocation(sourceLoc);
+        selectSetOperation.setStartSourceLocation(sourceLoc);
         SelectExpression selectExpr = new SelectExpression(null, selectSetOperation, null, null, true);
-        selectExpr.setSourceLocation(sourceLoc);
+        selectExpr.setStartSourceLocation(sourceLoc);
         return selectExpr;
     }
 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
index a73d44e..890b5fd 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
@@ -262,16 +262,16 @@
         }
 
         private Expression wrapAggregationArgument(Expression argExpr) throws CompilationException {
-            SourceLocation sourceLoc = argExpr.getSourceLocation();
+            SourceLocation sourceLoc = argExpr.getStartSourceLocation();
             Expression expr = argExpr;
             Set<VariableExpr> freeVars = SqlppRewriteUtil.getFreeVariable(expr);
 
             VariableExpr fromBindingVar = new VariableExpr(context.newVariable());
-            fromBindingVar.setSourceLocation(sourceLoc);
+            fromBindingVar.setStartSourceLocation(sourceLoc);
             FromTerm fromTerm = new FromTerm(groupVar, fromBindingVar, null, null);
-            fromTerm.setSourceLocation(sourceLoc);
+            fromTerm.setStartSourceLocation(sourceLoc);
             FromClause fromClause = new FromClause(Collections.singletonList(fromTerm));
-            fromClause.setSourceLocation(sourceLoc);
+            fromClause.setStartSourceLocation(sourceLoc);
 
             // Maps field variable expressions to field accesses.
             Map<Expression, Expression> varExprMap = new HashMap<>();
@@ -281,20 +281,20 @@
                     // Rewrites to a reference to a field in the group variable.
                     FieldAccessor fa =
                             new FieldAccessor(fromBindingVar, new VarIdentifier(fieldVars.get(usedVar).getValue()));
-                    fa.setSourceLocation(usedVar.getSourceLocation());
+                    fa.setStartSourceLocation(usedVar.getStartSourceLocation());
                     varExprMap.put(usedVar, fa);
                 } else if (outerVars.contains(usedVar)) {
                     // Do nothing
                 } else if (fieldVars.size() == 1) {
                     // Rewrites to a reference to a single field in the group variable.
                     FieldAccessor faInner = new FieldAccessor(fromBindingVar, fieldVars.values().iterator().next());
-                    faInner.setSourceLocation(usedVar.getSourceLocation());
+                    faInner.setStartSourceLocation(usedVar.getStartSourceLocation());
                     FieldAccessor faOuter =
                             new FieldAccessor(faInner, SqlppVariableUtil.toUserDefinedVariableName(usedVar.getVar()));
-                    faOuter.setSourceLocation(usedVar.getSourceLocation());
+                    faOuter.setStartSourceLocation(usedVar.getStartSourceLocation());
                     varExprMap.put(usedVar, faOuter);
                 } else {
-                    throw new CompilationException(ErrorCode.AMBIGUOUS_IDENTIFIER, usedVar.getSourceLocation(),
+                    throw new CompilationException(ErrorCode.AMBIGUOUS_IDENTIFIER, usedVar.getStartSourceLocation(),
                             SqlppVariableUtil.toUserDefinedVariableName(usedVar.getVar().getValue()).getValue());
                 }
             }
@@ -302,18 +302,18 @@
             // Select clause.
             SelectElement selectElement =
                     new SelectElement(SqlppRewriteUtil.substituteExpression(expr, varExprMap, context));
-            selectElement.setSourceLocation(sourceLoc);
+            selectElement.setStartSourceLocation(sourceLoc);
             SelectClause selectClause = new SelectClause(selectElement, null, false);
-            selectClause.setSourceLocation(sourceLoc);
+            selectClause.setStartSourceLocation(sourceLoc);
 
             // Construct the select expression.
             SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, null, null, null, null, null);
-            selectBlock.setSourceLocation(sourceLoc);
+            selectBlock.setStartSourceLocation(sourceLoc);
             SelectSetOperation selectSetOperation =
                     new SelectSetOperation(new SetOperationInput(selectBlock, null), null);
-            selectSetOperation.setSourceLocation(sourceLoc);
+            selectSetOperation.setStartSourceLocation(sourceLoc);
             SelectExpression selectExpr = new SelectExpression(null, selectSetOperation, null, null, true);
-            selectExpr.setSourceLocation(sourceLoc);
+            selectExpr.setStartSourceLocation(sourceLoc);
             return selectExpr;
         }
     }
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 faca85e..148d6f9 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
@@ -72,7 +72,7 @@
         // Sets the group variable.
         if (!gbyClause.hasGroupVar()) {
             VariableExpr groupVar = new VariableExpr(context.newVariable());
-            groupVar.setSourceLocation(gbyClause.getSourceLocation());
+            groupVar.setStartSourceLocation(gbyClause.getStartSourceLocation());
             gbyClause.setGroupVar(groupVar);
         }
 
@@ -96,11 +96,11 @@
             List<GbyVariableExpressionPair> gbyPairList = new ArrayList<>();
             List<GbyVariableExpressionPair> decorPairList = new ArrayList<>();
             VariableExpr groupVar = new VariableExpr(context.newVariable());
-            groupVar.setSourceLocation(selectBlock.getSourceLocation());
+            groupVar.setStartSourceLocation(selectBlock.getStartSourceLocation());
             List<Pair<Expression, Identifier>> groupFieldList = createGroupFieldList(selectBlock);
             GroupbyClause gbyClause = new GroupbyClause(gbyPairList, decorPairList, new HashMap<>(), groupVar,
                     groupFieldList, false, true);
-            gbyClause.setSourceLocation(selectBlock.getSourceLocation());
+            gbyClause.setStartSourceLocation(selectBlock.getStartSourceLocation());
             selectBlock.setGroupbyClause(gbyClause);
         }
     }
@@ -132,7 +132,7 @@
             Collection<VariableExpr> fromBindingVars) {
         for (VariableExpr varExpr : fromBindingVars) {
             VariableExpr newVarExpr = new VariableExpr(varExpr.getVar());
-            newVarExpr.setSourceLocation(varExpr.getSourceLocation());
+            newVarExpr.setStartSourceLocation(varExpr.getStartSourceLocation());
             Pair<Expression, Identifier> varIdPair =
                     new Pair<>(newVarExpr, SqlppVariableUtil.toUserDefinedVariableName(varExpr.getVar()));
             groupFieldList.add(varIdPair);
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 8bac4ad..c5f2c92 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
@@ -99,7 +99,7 @@
 
         VarIdentifier varId = varExpr.getVar();
         String varName = varId.getValue();
-        SourceLocation sourceLoc = varExpr.getSourceLocation();
+        SourceLocation sourceLoc = varExpr.getStartSourceLocation();
         VarIdentifier var = lookupVariable(varName, sourceLoc);
         if (var != null) {
             // Exists such an identifier
@@ -150,7 +150,7 @@
         List<Expression> argList = new ArrayList<>(1);
         argList.add(new LiteralExpr(new StringLiteral(fullyQualifiedName)));
         CallExpr callExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.DATASET), argList);
-        callExpr.setSourceLocation(sourceLoc);
+        callExpr.setStartSourceLocation(sourceLoc);
         return callExpr;
     }
 
@@ -160,7 +160,7 @@
         argList.add(var);
         argList.add(new LiteralExpr(new StringLiteral(fieldName)));
         CallExpr callExpr = new CallExpr(new FunctionSignature(BuiltinFunctions.FIELD_ACCESS_BY_NAME), argList);
-        callExpr.setSourceLocation(sourceLoc);
+        callExpr.setStartSourceLocation(sourceLoc);
         return callExpr;
     }
 
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 4842026..a360e46 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
@@ -51,9 +51,9 @@
                 exprText = SqlppFormatPrintUtil.toString(expr);
             } catch (CompilationException e) {
                 LOGGER.error(e.getLocalizedMessage(), e);
-                throw new SqlppParseException(expr.getSourceLocation(), e.getLocalizedMessage());
+                throw new SqlppParseException(expr.getStartSourceLocation(), e.getLocalizedMessage());
             }
-            throw new SqlppParseException(expr.getSourceLocation(),
+            throw new SqlppParseException(expr.getStartSourceLocation(),
                     "Need an alias for the enclosed expression:\n" + exprText);
         }
     }
@@ -97,7 +97,7 @@
             VarIdentifier var = new VarIdentifier(varName);
             VariableExpr varExpr = new VariableExpr();
             varExpr.setVar(var);
-            varExpr.setSourceLocation(expr.getSourceLocation());
+            varExpr.setStartSourceLocation(expr.getStartSourceLocation());
             return varExpr;
         } catch (ParseException e) {
             if (raiseError) {
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 7773072..c104a7e 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
@@ -136,7 +136,7 @@
         callExpr.setFunctionSignature(new FunctionSignature(FunctionConstants.ASTERIX_NS, internalFuncName, 1));
         ListConstructor listConstr =
                 new ListConstructor(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR, callExpr.getExprList());
-        listConstr.setSourceLocation(callExpr.getSourceLocation());
+        listConstr.setStartSourceLocation(callExpr.getStartSourceLocation());
         callExpr.setExprList(new ArrayList<>(Collections.singletonList(listConstr)));
         return callExpr;
     }
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 5a30b42..6a863c8 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
@@ -83,7 +83,7 @@
         // Creates a wrapper query for the expression so that if the expression itself
         // is the key, it can also be replaced.
         Query wrapper = new Query(false);
-        wrapper.setSourceLocation(expression.getSourceLocation());
+        wrapper.setStartSourceLocation(expression.getStartSourceLocation());
         wrapper.setBody(expression);
         // Creates a substitution visitor.
         SqlppSubstituteExpressionVisitor visitor = new SqlppSubstituteExpressionVisitor(context, exprMap);
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 766540e..9732d6b 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
@@ -79,7 +79,7 @@
             fromTerms.add((FromTerm) fromTerm.accept(this, arg));
         }
         FromClause copy = new FromClause(fromTerms);
-        copy.setSourceLocation(fromClause.getSourceLocation());
+        copy.setStartSourceLocation(fromClause.getStartSourceLocation());
         return copy;
     }
 
@@ -97,7 +97,7 @@
             correlateClauses.add((AbstractBinaryCorrelateClause) correlateClause.accept(this, arg));
         }
         FromTerm copy = new FromTerm(fromExpr, fromVar, positionVar, correlateClauses);
-        copy.setSourceLocation(fromTerm.getSourceLocation());
+        copy.setStartSourceLocation(fromTerm.getStartSourceLocation());
         return copy;
     }
 
@@ -110,7 +110,7 @@
         Expression conditionExpresion = (Expression) joinClause.getConditionExpression().accept(this, arg);
         JoinClause copy = new JoinClause(joinClause.getJoinType(), rightExpression, rightVar, rightPositionVar,
                 conditionExpresion);
-        copy.setSourceLocation(joinClause.getSourceLocation());
+        copy.setStartSourceLocation(joinClause.getStartSourceLocation());
         return copy;
     }
 
@@ -123,7 +123,7 @@
         Expression conditionExpresion = (Expression) nestClause.getConditionExpression().accept(this, arg);
         NestClause copy = new NestClause(nestClause.getJoinType(), rightExpression, rightVar, rightPositionVar,
                 conditionExpresion);
-        copy.setSourceLocation(nestClause.getSourceLocation());
+        copy.setStartSourceLocation(nestClause.getStartSourceLocation());
         return copy;
     }
 
@@ -134,7 +134,7 @@
         VariableExpr rightPositionVar = unnestClause.getPositionalVariable() == null ? null
                 : (VariableExpr) unnestClause.getPositionalVariable().accept(this, arg);
         UnnestClause copy = new UnnestClause(unnestClause.getJoinType(), rightExpression, rightVar, rightPositionVar);
-        copy.setSourceLocation(unnestClause.getSourceLocation());
+        copy.setStartSourceLocation(unnestClause.getStartSourceLocation());
         return copy;
     }
 
@@ -143,7 +143,7 @@
         Projection copy =
                 new Projection(projection.star() ? null : (Expression) projection.getExpression().accept(this, arg),
                         projection.getName(), projection.star(), projection.varStar());
-        copy.setSourceLocation(projection.getSourceLocation());
+        copy.setStartSourceLocation(projection.getStartSourceLocation());
         return copy;
     }
 
@@ -185,7 +185,7 @@
         selectCluase = (SelectClause) selectBlock.getSelectClause().accept(this, arg);
         SelectBlock copy = new SelectBlock(selectCluase, fromClause, letClauses, whereClause, gbyClause, gbyLetClauses,
                 havingClause);
-        copy.setSourceLocation(selectBlock.getSourceLocation());
+        copy.setStartSourceLocation(selectBlock.getStartSourceLocation());
         return copy;
     }
 
@@ -200,14 +200,14 @@
             selectRegular = (SelectRegular) selectClause.getSelectRegular().accept(this, arg);
         }
         SelectClause copy = new SelectClause(selectElement, selectRegular, selectClause.distinct());
-        copy.setSourceLocation(selectClause.getSourceLocation());
+        copy.setStartSourceLocation(selectClause.getStartSourceLocation());
         return copy;
     }
 
     @Override
     public SelectElement visit(SelectElement selectElement, Void arg) throws CompilationException {
         SelectElement copy = new SelectElement((Expression) selectElement.getExpression().accept(this, arg));
-        copy.setSourceLocation(selectElement.getSourceLocation());
+        copy.setStartSourceLocation(selectElement.getStartSourceLocation());
         return copy;
     }
 
@@ -218,7 +218,7 @@
             projections.add((Projection) projection.accept(this, arg));
         }
         SelectRegular copy = new SelectRegular(projections);
-        copy.setSourceLocation(selectRegular.getSourceLocation());
+        copy.setStartSourceLocation(selectRegular.getStartSourceLocation());
         return copy;
     }
 
@@ -243,14 +243,14 @@
             rightInputs.add(new SetOperationRight(right.getSetOpType(), right.isSetSemantics(), newRightInput));
         }
         SelectSetOperation copy = new SelectSetOperation(newLeftInput, rightInputs);
-        copy.setSourceLocation(selectSetOperation.getSourceLocation());
+        copy.setStartSourceLocation(selectSetOperation.getStartSourceLocation());
         return copy;
     }
 
     @Override
     public HavingClause visit(HavingClause havingClause, Void arg) throws CompilationException {
         HavingClause copy = new HavingClause((Expression) havingClause.getFilterExpression().accept(this, arg));
-        copy.setSourceLocation(havingClause.getSourceLocation());
+        copy.setStartSourceLocation(havingClause.getStartSourceLocation());
         return copy;
     }
 
@@ -258,7 +258,7 @@
     public Query visit(Query q, Void arg) throws CompilationException {
         Query copy =
                 new Query(q.isExplain(), q.isTopLevel(), (Expression) q.getBody().accept(this, arg), q.getVarCounter());
-        copy.setSourceLocation(q.getSourceLocation());
+        copy.setStartSourceLocation(q.getStartSourceLocation());
         return copy;
     }
 
@@ -266,14 +266,14 @@
     public FunctionDecl visit(FunctionDecl fd, Void arg) throws CompilationException {
         FunctionDecl copy =
                 new FunctionDecl(fd.getSignature(), fd.getParamList(), (Expression) fd.getFuncBody().accept(this, arg));
-        copy.setSourceLocation(fd.getSourceLocation());
+        copy.setStartSourceLocation(fd.getStartSourceLocation());
         return copy;
     }
 
     @Override
     public WhereClause visit(WhereClause whereClause, Void arg) throws CompilationException {
         WhereClause copy = new WhereClause((Expression) whereClause.getWhereExpr().accept(this, arg));
-        copy.setSourceLocation(whereClause.getSourceLocation());
+        copy.setStartSourceLocation(whereClause.getStartSourceLocation());
         return copy;
     }
 
@@ -284,7 +284,7 @@
             newOrderbyList.add((Expression) orderExpr.accept(this, arg));
         }
         OrderbyClause copy = new OrderbyClause(newOrderbyList, oc.getModifierList());
-        copy.setSourceLocation(oc.getSourceLocation());
+        copy.setStartSourceLocation(oc.getStartSourceLocation());
         return copy;
     }
 
@@ -317,7 +317,7 @@
         }
         GroupbyClause copy = new GroupbyClause(gbyPairList, decorPairList, withVarMap, groupVarExpr, groupFieldList,
                 gc.hasHashGroupByHint(), gc.isGroupAll());
-        copy.setSourceLocation(gc.getSourceLocation());
+        copy.setStartSourceLocation(gc.getStartSourceLocation());
         return copy;
     }
 
@@ -326,7 +326,7 @@
         Expression limitExpr = (Expression) limitClause.getLimitExpr().accept(this, arg);
         Expression offsetExpr = limitClause.hasOffset() ? (Expression) limitClause.getOffset().accept(this, arg) : null;
         LimitClause copy = new LimitClause(limitExpr, offsetExpr);
-        copy.setSourceLocation(limitClause.getSourceLocation());
+        copy.setStartSourceLocation(limitClause.getStartSourceLocation());
         return copy;
     }
 
@@ -334,7 +334,7 @@
     public LetClause visit(LetClause letClause, Void arg) throws CompilationException {
         LetClause copy = new LetClause((VariableExpr) letClause.getVarExpr().accept(this, arg),
                 (Expression) letClause.getBindingExpr().accept(this, arg));
-        copy.setSourceLocation(letClause.getSourceLocation());
+        copy.setStartSourceLocation(letClause.getStartSourceLocation());
         return copy;
     }
 
@@ -379,7 +379,7 @@
     @Override
     public ListConstructor visit(ListConstructor lc, Void arg) throws CompilationException {
         ListConstructor copy = new ListConstructor(lc.getType(), copyExprList(lc.getExprList(), arg));
-        copy.setSourceLocation(lc.getSourceLocation());
+        copy.setStartSourceLocation(lc.getStartSourceLocation());
         copy.addHints(lc.getHints());
         return copy;
     }
@@ -393,7 +393,7 @@
             bindings.add(fb);
         }
         RecordConstructor copy = new RecordConstructor(bindings);
-        copy.setSourceLocation(rc.getSourceLocation());
+        copy.setStartSourceLocation(rc.getStartSourceLocation());
         copy.addHints(rc.getHints());
         return copy;
     }
@@ -402,7 +402,7 @@
     public OperatorExpr visit(OperatorExpr operatorExpr, Void arg) throws CompilationException {
         OperatorExpr copy = new OperatorExpr(copyExprList(operatorExpr.getExprList(), arg),
                 operatorExpr.getExprBroadcastIdx(), operatorExpr.getOpList(), operatorExpr.isCurrentop());
-        copy.setSourceLocation(operatorExpr.getSourceLocation());
+        copy.setStartSourceLocation(operatorExpr.getStartSourceLocation());
         copy.addHints(operatorExpr.getHints());
         return copy;
     }
@@ -413,7 +413,7 @@
         Expression thenExpr = (Expression) ifExpr.getThenExpr().accept(this, arg);
         Expression elseExpr = (Expression) ifExpr.getElseExpr().accept(this, arg);
         IfExpr copy = new IfExpr(conditionExpr, thenExpr, elseExpr);
-        copy.setSourceLocation(ifExpr.getSourceLocation());
+        copy.setStartSourceLocation(ifExpr.getStartSourceLocation());
         copy.addHints(ifExpr.getHints());
         return copy;
     }
@@ -428,7 +428,7 @@
         }
         Expression condition = (Expression) qe.getSatisfiesExpr().accept(this, arg);
         QuantifiedExpression copy = new QuantifiedExpression(qe.getQuantifier(), quantifiedPairs, condition);
-        copy.setSourceLocation(qe.getSourceLocation());
+        copy.setStartSourceLocation(qe.getStartSourceLocation());
         copy.addHints(qe.getHints());
         return copy;
     }
@@ -440,7 +440,7 @@
             newExprList.add((Expression) expr.accept(this, arg));
         }
         CallExpr copy = new CallExpr(callExpr.getFunctionSignature(), newExprList);
-        copy.setSourceLocation(callExpr.getSourceLocation());
+        copy.setStartSourceLocation(callExpr.getStartSourceLocation());
         copy.addHints(callExpr.getHints());
         return copy;
     }
@@ -448,7 +448,7 @@
     @Override
     public VariableExpr visit(VariableExpr varExpr, Void arg) throws CompilationException {
         VariableExpr clonedVar = new VariableExpr(new VarIdentifier(varExpr.getVar()));
-        clonedVar.setSourceLocation(varExpr.getSourceLocation());
+        clonedVar.setStartSourceLocation(varExpr.getStartSourceLocation());
         clonedVar.setIsNewVar(varExpr.getIsNewVar());
         clonedVar.addHints(varExpr.getHints());
         return clonedVar;
@@ -457,7 +457,7 @@
     @Override
     public UnaryExpr visit(UnaryExpr u, Void arg) throws CompilationException {
         UnaryExpr copy = new UnaryExpr(u.getExprType(), (Expression) u.getExpr().accept(this, arg));
-        copy.setSourceLocation(u.getSourceLocation());
+        copy.setStartSourceLocation(u.getStartSourceLocation());
         copy.addHints(u.getHints());
         return copy;
     }
@@ -465,7 +465,7 @@
     @Override
     public FieldAccessor visit(FieldAccessor fa, Void arg) throws CompilationException {
         FieldAccessor copy = new FieldAccessor((Expression) fa.getExpr().accept(this, arg), fa.getIdent());
-        copy.setSourceLocation(fa.getSourceLocation());
+        copy.setStartSourceLocation(fa.getStartSourceLocation());
         copy.addHints(fa.getHints());
         return copy;
     }
@@ -478,7 +478,7 @@
             indexExpr = (Expression) ia.getIndexExpr().accept(this, arg);
         }
         IndexAccessor copy = new IndexAccessor(expr, indexExpr);
-        copy.setSourceLocation(ia.getSourceLocation());
+        copy.setStartSourceLocation(ia.getStartSourceLocation());
         copy.addHints(ia.getHints());
         return copy;
     }
@@ -490,7 +490,7 @@
         List<Expression> thenExprList = copyExprList(caseExpr.getThenExprs(), arg);
         Expression elseExpr = (Expression) caseExpr.getElseExpr().accept(this, arg);
         CaseExpression copy = new CaseExpression(conditionExpr, whenExprList, thenExprList, elseExpr);
-        copy.setSourceLocation(caseExpr.getSourceLocation());
+        copy.setStartSourceLocation(caseExpr.getStartSourceLocation());
         copy.addHints(caseExpr.getHints());
         return copy;
     }
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 0973bec..839cc6e 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
@@ -249,8 +249,8 @@
     @Override
     public Void visit(CallExpr pf, Integer step) throws CompilationException {
         FunctionSignature functionSignature = pf.getFunctionSignature();
-        FunctionSignature normalizedFunctionSignature =
-                FunctionMapUtil.normalizeBuiltinFunctionSignature(functionSignature, false, pf.getSourceLocation());
+        FunctionSignature normalizedFunctionSignature = FunctionMapUtil
+                .normalizeBuiltinFunctionSignature(functionSignature, false, pf.getStartSourceLocation());
         if (BuiltinFunctions.isBuiltinCompilerFunction(normalizedFunctionSignature, true)) {
             functionSignature = normalizedFunctionSignature;
         }
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 e00a3bd..fedeae9 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
@@ -78,7 +78,7 @@
             currentEnv = p.second;
         }
         FromClause newFromClause = new FromClause(newFromTerms);
-        newFromClause.setSourceLocation(fromClause.getSourceLocation());
+        newFromClause.setStartSourceLocation(fromClause.getStartSourceLocation());
         return new Pair<>(newFromClause, currentEnv);
     }
 
@@ -117,7 +117,7 @@
             }
         }
         FromTerm newFromTerm = new FromTerm(newLeftExpr, newLeftVar, newLeftPosVar, newCorrelateClauses);
-        newFromTerm.setSourceLocation(fromTerm.getSourceLocation());
+        newFromTerm.setStartSourceLocation(fromTerm.getStartSourceLocation());
         return new Pair<>(newFromTerm, currentEnv);
     }
 
@@ -143,7 +143,7 @@
 
         JoinClause newJoinClause =
                 new JoinClause(joinClause.getJoinType(), newRightExpr, newRightVar, newRightPosVar, conditionExpr);
-        newJoinClause.setSourceLocation(joinClause.getSourceLocation());
+        newJoinClause.setStartSourceLocation(joinClause.getStartSourceLocation());
         return new Pair<>(newJoinClause, currentEnv);
     }
 
@@ -169,7 +169,7 @@
 
         NestClause newNestClause =
                 new NestClause(nestClause.getJoinType(), rightExpr, newRightVar, newRightPosVar, conditionExpr);
-        newNestClause.setSourceLocation(nestClause.getSourceLocation());
+        newNestClause.setStartSourceLocation(nestClause.getStartSourceLocation());
         return new Pair<>(newNestClause, currentEnv);
     }
 
@@ -193,7 +193,7 @@
         // The condition can refer to the newRightVar and newRightPosVar.
         UnnestClause newUnnestClause =
                 new UnnestClause(unnestClause.getJoinType(), rightExpr, newRightVar, newRightPosVar);
-        newUnnestClause.setSourceLocation(unnestClause.getSourceLocation());
+        newUnnestClause.setStartSourceLocation(unnestClause.getStartSourceLocation());
         return new Pair<>(newUnnestClause, currentEnv);
     }
 
@@ -205,7 +205,7 @@
         }
         Projection newProjection = new Projection((Expression) projection.getExpression().accept(this, env).first,
                 projection.getName(), projection.star(), projection.varStar());
-        newProjection.setSourceLocation(projection.getSourceLocation());
+        newProjection.setStartSourceLocation(projection.getStartSourceLocation());
         return new Pair<>(newProjection, env);
     }
 
@@ -265,7 +265,7 @@
         HavingClause havingClause = newHaving == null ? null : (HavingClause) newHaving.first;
         SelectBlock newSelectBlock = new SelectBlock((SelectClause) newSelect.first, fromClause, newLetClauses,
                 whereClause, groupbyClause, newLetClausesAfterGby, havingClause);
-        newSelectBlock.setSourceLocation(selectBlock.getSourceLocation());
+        newSelectBlock.setStartSourceLocation(selectBlock.getStartSourceLocation());
         return new Pair<>(newSelectBlock, currentEnv);
     }
 
@@ -277,13 +277,13 @@
             Pair<ILangExpression, VariableSubstitutionEnvironment> newSelectElement =
                     selectClause.getSelectElement().accept(this, env);
             SelectClause newSelectClause = new SelectClause((SelectElement) newSelectElement.first, null, distinct);
-            newSelectClause.setSourceLocation(selectClause.getSourceLocation());
+            newSelectClause.setStartSourceLocation(selectClause.getStartSourceLocation());
             return new Pair<>(newSelectClause, newSelectElement.second);
         } else {
             Pair<ILangExpression, VariableSubstitutionEnvironment> newSelectRegular =
                     selectClause.getSelectRegular().accept(this, env);
             SelectClause newSelectClause = new SelectClause(null, (SelectRegular) newSelectRegular.first, distinct);
-            newSelectClause.setSourceLocation(selectClause.getSourceLocation());
+            newSelectClause.setStartSourceLocation(selectClause.getStartSourceLocation());
             return new Pair<>(newSelectClause, newSelectRegular.second);
         }
     }
@@ -294,7 +294,7 @@
         Pair<ILangExpression, VariableSubstitutionEnvironment> newExpr =
                 selectElement.getExpression().accept(this, env);
         SelectElement newSelectElement = new SelectElement((Expression) newExpr.first);
-        newSelectElement.setSourceLocation(selectElement.getSourceLocation());
+        newSelectElement.setStartSourceLocation(selectElement.getStartSourceLocation());
         return new Pair<>(newSelectElement, newExpr.second);
     }
 
@@ -306,7 +306,7 @@
             newProjections.add((Projection) projection.accept(this, env).first);
         }
         SelectRegular newSelectRegular = new SelectRegular(newProjections);
-        newSelectRegular.setSourceLocation(selectRegular.getSourceLocation());
+        newSelectRegular.setStartSourceLocation(selectRegular.getStartSourceLocation());
         return new Pair<>(newSelectRegular, env);
     }
 
@@ -345,7 +345,7 @@
             }
         }
         SelectSetOperation newSelectSetOperation = new SelectSetOperation(newLeftInput, newRightInputs);
-        newSelectSetOperation.setSourceLocation(selectSetOperation.getSourceLocation());
+        newSelectSetOperation.setStartSourceLocation(selectSetOperation.getStartSourceLocation());
         return new Pair<>(newSelectSetOperation, selectSetOperation.hasRightInputs() ? env : leftResult.second);
     }
 
@@ -385,7 +385,7 @@
         }
         SelectExpression newSelectExpression =
                 new SelectExpression(newLetList, newSelectSetOperation, newOrderbyClause, newLimitClause, subquery);
-        newSelectExpression.setSourceLocation(selectExpression.getSourceLocation());
+        newSelectExpression.setStartSourceLocation(selectExpression.getStartSourceLocation());
         return new Pair<>(newSelectExpression, currentEnv);
     }
 
@@ -394,7 +394,7 @@
             VariableSubstitutionEnvironment env) throws CompilationException {
         Pair<ILangExpression, VariableSubstitutionEnvironment> p = havingClause.getFilterExpression().accept(this, env);
         HavingClause newHavingClause = new HavingClause((Expression) p.first);
-        newHavingClause.setSourceLocation(havingClause.getSourceLocation());
+        newHavingClause.setStartSourceLocation(havingClause.getStartSourceLocation());
         return new Pair<>(newHavingClause, p.second);
     }
 
@@ -408,7 +408,7 @@
                 VariableCloneAndSubstitutionUtil.visitAndCloneExprList(caseExpr.getThenExprs(), env, this);
         Expression elseExpr = (Expression) caseExpr.getElseExpr().accept(this, env).first;
         CaseExpression newCaseExpr = new CaseExpression(conditionExpr, whenExprList, thenExprList, elseExpr);
-        newCaseExpr.setSourceLocation(caseExpr.getSourceLocation());
+        newCaseExpr.setStartSourceLocation(caseExpr.getStartSourceLocation());
         return new Pair<>(newCaseExpr, env);
     }
 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
index bf57184..81b3585 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
@@ -59,42 +59,42 @@
         LiteralExpr argumentLiteral = new LiteralExpr(new StringLiteral(arg));
         arguments.add(argumentLiteral);
         CallExpr callExpression = new CallExpr(new FunctionSignature(BuiltinFunctions.DATASET), arguments);
-        callExpression.setSourceLocation(deleteStmt.getSourceLocation());
+        callExpression.setStartSourceLocation(deleteStmt.getStartSourceLocation());
 
         // From clause.
         VariableExpr var = deleteStmt.getVariableExpr();
         FromTerm fromTerm = new FromTerm(callExpression, var, null, null);
-        fromTerm.setSourceLocation(var.getSourceLocation());
+        fromTerm.setStartSourceLocation(var.getStartSourceLocation());
         FromClause fromClause = new FromClause(Collections.singletonList(fromTerm));
-        fromClause.setSourceLocation(var.getSourceLocation());
+        fromClause.setStartSourceLocation(var.getStartSourceLocation());
 
         // Where clause.
         WhereClause whereClause = null;
         Expression condition = deleteStmt.getCondition();
         if (condition != null) {
             whereClause = new WhereClause(condition);
-            whereClause.setSourceLocation(condition.getSourceLocation());
+            whereClause.setStartSourceLocation(condition.getStartSourceLocation());
         }
 
         // Select clause.
         VariableExpr returnExpr = new VariableExpr(var.getVar());
         returnExpr.setIsNewVar(false);
-        returnExpr.setSourceLocation(var.getSourceLocation());
+        returnExpr.setStartSourceLocation(var.getStartSourceLocation());
         SelectElement selectElement = new SelectElement(returnExpr);
-        selectElement.setSourceLocation(deleteStmt.getSourceLocation());
+        selectElement.setStartSourceLocation(deleteStmt.getStartSourceLocation());
         SelectClause selectClause = new SelectClause(selectElement, null, false);
-        selectClause.setSourceLocation(deleteStmt.getSourceLocation());
+        selectClause.setStartSourceLocation(deleteStmt.getStartSourceLocation());
 
         // Construct the select expression.
         SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, null, whereClause, null, null, null);
-        selectBlock.setSourceLocation(var.getSourceLocation());
+        selectBlock.setStartSourceLocation(var.getStartSourceLocation());
         SelectSetOperation selectSetOperation = new SelectSetOperation(new SetOperationInput(selectBlock, null), null);
-        selectSetOperation.setSourceLocation(var.getSourceLocation());
+        selectSetOperation.setStartSourceLocation(var.getStartSourceLocation());
         SelectExpression selectExpression = new SelectExpression(null, selectSetOperation, null, null, false);
-        selectExpression.setSourceLocation(var.getSourceLocation());
+        selectExpression.setStartSourceLocation(var.getStartSourceLocation());
         Query query = new Query(false, false, selectExpression, 0);
         query.setBody(selectExpression);
-        query.setSourceLocation(deleteStmt.getSourceLocation());
+        query.setStartSourceLocation(deleteStmt.getStartSourceLocation());
 
         // return the delete statement.
         deleteStmt.setQuery(query);
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 df165c0..b9aabe8 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
@@ -93,7 +93,7 @@
 
             // Merges the variables defined in the current from term into the scope of the current from clause.
             Scope scopeForFromTerm = scopeChecker.removeCurrentScope();
-            mergeScopes(scopeForFromClause, scopeForFromTerm, fromTerm.getSourceLocation());
+            mergeScopes(scopeForFromClause, scopeForFromTerm, fromTerm.getStartSourceLocation());
         }
         return null;
     }
@@ -106,12 +106,12 @@
 
         // Registers the data item variable.
         VariableExpr leftVar = fromTerm.getLeftVariable();
-        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), leftVar.getVar(), leftVar.getSourceLocation());
+        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), leftVar.getVar(), leftVar.getStartSourceLocation());
 
         // Registers the positional variable
         if (fromTerm.hasPositionalVariable()) {
             VariableExpr posVar = fromTerm.getPositionalVariable();
-            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getSourceLocation());
+            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getStartSourceLocation());
         }
         // Visits join/unnest/nest clauses.
         for (AbstractBinaryCorrelateClause correlateClause : fromTerm.getCorrelateClauses()) {
@@ -131,16 +131,16 @@
 
         // Registers the data item variable.
         VariableExpr rightVar = joinClause.getRightVariable();
-        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), rightVar.getVar(), rightVar.getSourceLocation());
+        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), rightVar.getVar(), rightVar.getStartSourceLocation());
 
         if (joinClause.hasPositionalVariable()) {
             // Registers the positional variable.
             VariableExpr posVar = joinClause.getPositionalVariable();
-            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getSourceLocation());
+            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getStartSourceLocation());
         }
 
         Scope rightScope = scopeChecker.removeCurrentScope();
-        mergeScopes(leftScope, rightScope, joinClause.getRightExpression().getSourceLocation());
+        mergeScopes(leftScope, rightScope, joinClause.getRightExpression().getStartSourceLocation());
         scopeChecker.pushExistingScope(leftScope);
         // The condition expression can refer to the just registered variables
         // for the right branch.
@@ -157,12 +157,12 @@
 
         // Registers the data item variable.
         VariableExpr rightVar = nestClause.getRightVariable();
-        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), rightVar.getVar(), rightVar.getSourceLocation());
+        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), rightVar.getVar(), rightVar.getStartSourceLocation());
 
         if (nestClause.hasPositionalVariable()) {
             // Registers the positional variable.
             VariableExpr posVar = nestClause.getPositionalVariable();
-            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getSourceLocation());
+            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getStartSourceLocation());
         }
 
         // The condition expression can refer to the just registered variables
@@ -177,12 +177,12 @@
 
         // register the data item variable
         VariableExpr rightVar = unnestClause.getRightVariable();
-        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), rightVar.getVar(), rightVar.getSourceLocation());
+        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), rightVar.getVar(), rightVar.getStartSourceLocation());
 
         if (unnestClause.hasPositionalVariable()) {
             // register the positional variable
             VariableExpr posVar = unnestClause.getPositionalVariable();
-            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getSourceLocation());
+            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), posVar.getVar(), posVar.getStartSourceLocation());
         }
         return null;
     }
@@ -234,7 +234,7 @@
             gbyKeyVarExpr.setExpr(visit(gbyKeyVarExpr.getExpr(), gc));
             VariableExpr gbyKeyVar = gbyKeyVarExpr.getVar();
             if (gbyKeyVar != null) {
-                addNewVarSymbolToScope(newScope, gbyKeyVar.getVar(), gbyKeyVar.getSourceLocation());
+                addNewVarSymbolToScope(newScope, gbyKeyVar.getVar(), gbyKeyVar.getStartSourceLocation());
             }
         }
         if (gc.hasGroupFieldList()) {
@@ -247,13 +247,13 @@
                 decorVarExpr.setExpr(visit(decorVarExpr.getExpr(), gc));
                 VariableExpr decorVar = decorVarExpr.getVar();
                 if (decorVar != null) {
-                    addNewVarSymbolToScope(newScope, decorVar.getVar(), decorVar.getSourceLocation());
+                    addNewVarSymbolToScope(newScope, decorVar.getVar(), decorVar.getStartSourceLocation());
                 }
             }
         }
         if (gc.hasGroupVar()) {
             VariableExpr groupVar = gc.getGroupVar();
-            addNewVarSymbolToScope(newScope, groupVar.getVar(), groupVar.getSourceLocation());
+            addNewVarSymbolToScope(newScope, groupVar.getVar(), groupVar.getStartSourceLocation());
         }
         if (gc.hasWithMap()) {
             Map<Expression, VariableExpr> newWithMap = new HashMap<>();
@@ -261,7 +261,7 @@
                 Expression expr = visit(entry.getKey(), arg);
                 Expression newKey = expr;
                 VariableExpr value = entry.getValue();
-                addNewVarSymbolToScope(newScope, value.getVar(), value.getSourceLocation());
+                addNewVarSymbolToScope(newScope, value.getVar(), value.getStartSourceLocation());
                 newWithMap.put(newKey, value);
             }
             gc.setWithVarMap(newWithMap);
@@ -287,7 +287,7 @@
         scopeChecker.extendCurrentScope();
         letClause.setBindingExpr(visit(letClause.getBindingExpr(), letClause));
         VariableExpr varExpr = letClause.getVarExpr();
-        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), varExpr.getVar(), varExpr.getSourceLocation());
+        addNewVarSymbolToScope(scopeChecker.getCurrentScope(), varExpr.getVar(), varExpr.getStartSourceLocation());
         return null;
     }
 
@@ -330,7 +330,7 @@
         for (QuantifiedPair pair : qe.getQuantifiedList()) {
             pair.setExpr(visit(pair.getExpr(), qe));
             VariableExpr varExpr = pair.getVarExpr();
-            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), varExpr.getVar(), varExpr.getSourceLocation());
+            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), varExpr.getVar(), varExpr.getStartSourceLocation());
         }
         qe.setSatisfiesExpr(visit(qe.getSatisfiesExpr(), qe));
         scopeChecker.removeCurrentScope();
@@ -341,7 +341,7 @@
     public Expression visit(VariableExpr varExpr, ILangExpression arg) throws CompilationException {
         String varName = varExpr.getVar().getValue();
         if (scopeChecker.isInForbiddenScopes(varName)) {
-            throw new CompilationException(ErrorCode.COMPILATION_ERROR, varExpr.getSourceLocation(),
+            throw new CompilationException(ErrorCode.COMPILATION_ERROR, varExpr.getStartSourceLocation(),
                     "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);
@@ -364,7 +364,8 @@
         // Registers the (inserted) data item variable.
         VariableExpr bindingVar = insertStatement.getVar();
         if (bindingVar != null) {
-            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), bindingVar.getVar(), bindingVar.getSourceLocation());
+            addNewVarSymbolToScope(scopeChecker.getCurrentScope(), bindingVar.getVar(),
+                    bindingVar.getStartSourceLocation());
         }
 
         // Visits the expression for the returning expression.
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index e2a8759..96cf4b6 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -271,7 +271,7 @@
         } else if (splits[1].equals("double")) {
           vt = FieldIntervalDataGen.ValueType.DOUBLE;
         } else {
-          throw new SqlppParseException(getSourceLocation(hintToken), "Unknown type for interval data gen: " + splits[1]);
+          throw new SqlppParseException(getTokenStartSourceLocation(hintToken), "Unknown type for interval data gen: " + splits[1]);
         }
         rfdg = new FieldIntervalDataGen(vt, splits[2], splits[3]);
       } else if (splits[0].equals(INSERT_RAND_INT_HINT)) {
@@ -357,12 +357,16 @@
         return message.toString();
     }
 
-    protected static SourceLocation getSourceLocation(Token token) {
+    protected static SourceLocation getTokenStartSourceLocation(Token token) {
         return token != null ? new SourceLocation(token.beginLine, token.beginColumn) : null;
+    }
+    
+    protected static SourceLocation getTokenEndSourceLocation(Token token) {
+        return token != null ? new SourceLocation(token.endLine, token.endColumn) : null;
     }
 
     protected static <T extends AbstractLangExpression> T addSourceLocation(T expr, Token token) {
-        expr.setSourceLocation(getSourceLocation(token));
+        expr.setStartSourceLocation(getTokenStartSourceLocation(token));
         return expr;
     }
 }
@@ -480,7 +484,7 @@
       if (dgen) {
         String splits[] = hint.split(" +");
         if (splits.length != 3) {
-          throw new SqlppParseException(getSourceLocation(hintToken), "Expecting /*+ dgen <filename> <numberOfItems> */");
+          throw new SqlppParseException(getTokenStartSourceLocation(hintToken), "Expecting /*+ dgen <filename> <numberOfItems> */");
         }
         filename = splits[1];
         numValues = Long.parseLong(splits[2]);
@@ -560,7 +564,7 @@
                                    withRecord,
                                    ifNotExists);
         } catch (CompilationException e){
-           throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
+           throw new SqlppParseException(getTokenStartSourceLocation(startStmtToken), e.getMessage());
         }
       }
 
@@ -573,7 +577,7 @@
         name = Identifier()
         {
             if (!name.equalsIgnoreCase("meta")){
-                throw new SqlppParseException(getSourceLocation(startStmtToken),
+                throw new SqlppParseException(getTokenStartSourceLocation(startStmtToken),
                     "We can only support one additional associated field called \"meta\".");
             }
         }
@@ -588,7 +592,7 @@
     ( <WITH> withRecord = RecordConstructor() )?
       {
         if(filterField!=null && filterField.first!=0){
-          throw new SqlppParseException(getSourceLocation(startStmtToken),
+          throw new SqlppParseException(getTokenStartSourceLocation(startStmtToken),
             "A filter field can only be a field in the main record of the dataset.");
         }
         InternalDetailsDecl idd = new InternalDetailsDecl(primaryKeyFields.second,
@@ -609,7 +613,7 @@
                                    withRecord,
                                    ifNotExists);
         } catch (CompilationException e){
-           throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
+           throw new SqlppParseException(getTokenStartSourceLocation(startStmtToken), e.getMessage());
         }
       }
   )
@@ -785,7 +789,7 @@
   <RIGHTBRACE>
     {
       endPos = token;
-      functionBody = extractFragment(beginPos.beginLine, beginPos.beginColumn, endPos.beginLine, endPos.beginColumn);
+      functionBody = extractFragment(functionBodyExpr);
       // TODO use fctName.library
       signature = new FunctionSignature(fctName.dataverse, fctName.function, paramList.size());
       getCurrentScope().addFunctionDescriptor(signature, false);
@@ -814,7 +818,7 @@
       stmt = new CreateFeedStatement(nameComponents, withRecord, ifNotExists);
       return addSourceLocation(stmt, startStmtToken);
     } catch (AlgebricksException e) {
-      throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
+      throw new SqlppParseException(getTokenStartSourceLocation(startStmtToken), e.getMessage());
     }
   }
 }
@@ -927,7 +931,7 @@
     {
       arity = new Integer(token.image);
       if (arity < 0 && arity != FunctionIdentifier.VARARGS) {
-        throw new SqlppParseException(getSourceLocation(token), "Invalid arity:" + arity);
+        throw new SqlppParseException(getTokenStartSourceLocation(token), "Invalid arity:" + arity);
       }
 
       // TODO use fctName.library
@@ -1325,18 +1329,13 @@
       whereExpr = Expression()
       {
         whereClause.setWhereExpr(whereExpr);
+        whereClauseBody = extractFragment(whereExpr);
       }
     )?
     {
-      if (whereClause != null) {
-        endPos = token;
-        whereClauseBody = extractFragment(beginPos.endLine, beginPos.endColumn, endPos.endLine, endPos.endColumn + 1);
-      }
+      stmt = new ConnectFeedStatement(feedNameComponents, datasetNameComponents, appliedFunctions,
+       policy, whereClauseBody, getVarCounter());
     }
-      {
-        stmt = new ConnectFeedStatement(feedNameComponents, datasetNameComponents, appliedFunctions,
-         policy, whereClauseBody, getVarCounter());
-      }
   )
   {
     return addSourceLocation(stmt, startStmtToken);
@@ -1408,7 +1407,7 @@
       try {
         value = String.valueOf(Long.parseLong(token.image));
       } catch (NumberFormatException nfe) {
-        throw new SqlppParseException(getSourceLocation(token), "inapproriate value: " + token.image);
+        throw new SqlppParseException(getTokenStartSourceLocation(token), "inapproriate value: " + token.image);
       }
     }
   )
@@ -1467,11 +1466,11 @@
         String splits[] = hint.split(" +");
         if (splits[0].equals(GEN_FIELDS_HINT)) {
           if (splits.length != 5) {
-            throw new SqlppParseException(getSourceLocation(getHintToken(token)),
+            throw new SqlppParseException(getTokenStartSourceLocation(getHintToken(token)),
                 "Expecting: /*+ gen-fields <type> <min> <max> <prefix>*/");
           }
           if (!splits[1].equals("int")) {
-            throw new SqlppParseException(getSourceLocation(getHintToken(token)),
+            throw new SqlppParseException(getTokenStartSourceLocation(getHintToken(token)),
                 "The only supported type for gen-fields is int.");
           }
           UndeclaredFieldsDataGen ufdg = new UndeclaredFieldsDataGen(UndeclaredFieldsDataGen.Type.INT,
@@ -1571,7 +1570,7 @@
   {
     FunctionName result = new FunctionName();
     result.hint = getHint(token);
-    result.sourceLoc = getSourceLocation(token);
+    result.sourceLoc = getTokenStartSourceLocation(token);
   }
   ( <DOT> second = Identifier()
     {
@@ -1675,7 +1674,7 @@
     <LEFTPAREN><RIGHTPAREN>
     {
         if(!lit.equalsIgnoreCase("meta")){
-            throw new SqlppParseException(getSourceLocation(litToken), "The string before () has to be \"meta\".");
+            throw new SqlppParseException(getTokenStartSourceLocation(litToken), "The string before () has to be \"meta\".");
         }
         meetParens = true;
         source = 1;
@@ -1821,7 +1820,7 @@
   )
   {
     query.setBody(expr);
-    query.setSourceLocation(expr.getSourceLocation());
+    query.setStartSourceLocation(expr.getStartSourceLocation());
     return query;
   }
 }
@@ -1830,7 +1829,7 @@
 Expression Expression():
 {
   Expression expr = null;
-  Expression exprP = null;
+  SourceLocation startLocation = getTokenStartSourceLocation(getToken(1));
 }
 {
 (
@@ -1839,7 +1838,10 @@
     | expr = QuantifiedExpression()
 )
     {
-      return (exprP==null) ? expr : exprP;
+      expr.setStartSourceLocation(startLocation);
+      expr.setEndSourceLocation(getTokenEndSourceLocation(token));
+      expr.setRawExpression(extractFragment(expr));
+      return expr;
     }
 }
 
@@ -1862,7 +1864,7 @@
         try{
             op.addOperator(token.image.toLowerCase());
         } catch (Exception e){
-            throw new SqlppParseException(getSourceLocation(token), e.getMessage());
+            throw new SqlppParseException(getTokenStartSourceLocation(token), e.getMessage());
         }
       }
 
@@ -1897,7 +1899,7 @@
         try{
            op.addOperator(token.image.toLowerCase());
         } catch (CompilationException e){
-           throw new SqlppParseException(getSourceLocation(token), e.getMessage());
+           throw new SqlppParseException(getTokenStartSourceLocation(token), e.getMessage());
         }
     }
 
@@ -1973,7 +1975,7 @@
           try{
             op.addOperator(operator);
           } catch (CompilationException e){
-            throw new SqlppParseException(getSourceLocation(token), e.getMessage());
+            throw new SqlppParseException(getTokenStartSourceLocation(token), e.getMessage());
           }
         }
 
@@ -2025,7 +2027,7 @@
           try{
             op.addOperator(operator);
           } catch (CompilationException e){
-            throw new SqlppParseException(getSourceLocation(token), e.getMessage());
+            throw new SqlppParseException(getTokenStartSourceLocation(token), e.getMessage());
           }
         }
 
@@ -2108,7 +2110,7 @@
           try {
             op.addOperator(operator);
           } catch (CompilationException e){
-            throw new SqlppParseException(getSourceLocation(token), e.getMessage());
+            throw new SqlppParseException(getTokenStartSourceLocation(token), e.getMessage());
           }
         }
 
@@ -2265,7 +2267,7 @@
         try {
             uexpr.setExprType(exprType);
         } catch (CompilationException e){
-            throw new SqlppParseException(getSourceLocation(token), e.getMessage());
+            throw new SqlppParseException(getTokenStartSourceLocation(token), e.getMessage());
         }
     }
     )?
@@ -2323,7 +2325,7 @@
             Literal lit = ((LiteralExpr)expr).getValue();
             if (lit.getLiteralType() != Literal.Type.INTEGER &&
                 lit.getLiteralType() != Literal.Type.LONG) {
-                throw new SqlppParseException(expr.getSourceLocation(), "Index should be an INTEGER");
+                throw new SqlppParseException(expr.getStartSourceLocation(), "Index should be an INTEGER");
             }
         }
     }
@@ -2371,7 +2373,7 @@
         try {
             lit.setValue(new LongIntegerLiteral(Long.valueOf(token.image)));
         } catch (NumberFormatException e) {
-            throw new SqlppParseException(getSourceLocation(token), "Could not parse numeric literal \"" + token.image +'"');
+            throw new SqlppParseException(getTokenStartSourceLocation(token), "Could not parse numeric literal \"" + token.image +'"');
         }
     }
   | <FLOAT_LITERAL>
@@ -2379,7 +2381,7 @@
         try {
             lit.setValue(new FloatLiteral(Float.valueOf(token.image)));
         } catch (NumberFormatException e) {
-            throw new SqlppParseException(getSourceLocation(token), "Could not parse numeric literal \"" + token.image +'"');
+            throw new SqlppParseException(getTokenStartSourceLocation(token), "Could not parse numeric literal \"" + token.image +'"');
         }
     }
   | <DOUBLE_LITERAL>
@@ -2387,7 +2389,7 @@
         try {
             lit.setValue(new DoubleLiteral(Double.valueOf(token.image)));
         } catch (NumberFormatException e) {
-            throw new SqlppParseException(getSourceLocation(token), "Could not parse numeric literal \"" + token.image +'"');
+            throw new SqlppParseException(getTokenStartSourceLocation(token), "Could not parse numeric literal \"" + token.image +'"');
         }
     }
   | <MISSING>
@@ -2423,7 +2425,7 @@
      id = SqlppVariableUtil.toInternalVariableName(id); // Prefix user-defined variables with "$"
      Identifier ident = lookupSymbol(id);
      if (isInForbiddenScopes(id)) {
-       throw new SqlppParseException(getSourceLocation(token),
+       throw new SqlppParseException(getTokenStartSourceLocation(token),
         "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.");
      }
      VariableExpr varExp = new VariableExpr();
@@ -2603,7 +2605,7 @@
     {
       if(star){
         if(!funcName.function.equalsIgnoreCase("count")){
-           throw new SqlppParseException(getSourceLocation(token), "The parameter * can only be used in COUNT().");
+           throw new SqlppParseException(getTokenStartSourceLocation(token), "The parameter * can only be used in COUNT().");
         }
         argList.add(new LiteralExpr(new LongIntegerLiteral(1L)));
       } else {
@@ -2637,7 +2639,7 @@
           callExpr.addHint(SkipSecondaryIndexSearchExpressionAnnotation.INSTANCE);
         }
       }
-      callExpr.setSourceLocation(funcName.sourceLoc);
+      callExpr.setStartSourceLocation(funcName.sourceLoc);
       return callExpr;
     }
 }
@@ -2700,6 +2702,7 @@
   OrderbyClause orderbyClause = null;
   LimitClause limitClause = null;
   createNewScope();
+  SourceLocation startLocation = getTokenStartSourceLocation(getToken(1));
 }
 {
     ( letClauses = LetClause() )?
@@ -2709,7 +2712,9 @@
     {
       SelectExpression selectExpr =
         new SelectExpression(letClauses, selectSetOperation, orderbyClause, limitClause, subquery);
-      selectExpr.setSourceLocation((!letClauses.isEmpty() ? letClauses.get(0) : selectSetOperation).getSourceLocation());
+      selectExpr.setStartSourceLocation(startLocation);
+      selectExpr.setEndSourceLocation(getTokenEndSourceLocation(token));
+      selectExpr.setRawExpression(extractFragment(selectExpr));
       return selectExpr;
     }
 }
@@ -2744,7 +2749,7 @@
   )*
   {
     SelectSetOperation selectSetOp = new SelectSetOperation(setOperationInputLeft, setOperationRights);
-    selectSetOp.setSourceLocation(selectBlockLeft.getSourceLocation());
+    selectSetOp.setStartSourceLocation(selectBlockLeft.getStartSourceLocation());
     return selectSetOp;
   }
 }
@@ -2773,7 +2778,7 @@
 }
 {
   (
-     selectClause = SelectClause() { startSrcLoc = selectClause.getSourceLocation(); }
+     selectClause = SelectClause() { startSrcLoc = selectClause.getStartSourceLocation(); }
      (
         LOOKAHEAD(1)
         fromClause = FromClause()
@@ -2792,7 +2797,7 @@
         (havingClause = HavingClause())?
      )?
     |
-     fromClause = FromClause() { startSrcLoc = fromClause.getSourceLocation(); }
+     fromClause = FromClause() { startSrcLoc = fromClause.getStartSourceLocation(); }
      (
         LOOKAHEAD(1)
         fromLetClauses = LetClause()
@@ -2810,7 +2815,7 @@
   {
     SelectBlock selectBlock = new SelectBlock(selectClause, fromClause, fromLetClauses, whereClause, groupbyClause,
       gbyLetClauses, havingClause);
-    selectBlock.setSourceLocation(startSrcLoc);
+    selectBlock.setStartSourceLocation(startSrcLoc);
     return selectBlock;
   }
 }
@@ -2830,17 +2835,17 @@
     selectElement = SelectElement()
   )?
   {
-    SourceLocation sourceLoc = getSourceLocation(startToken);
+    SourceLocation sourceLoc = getTokenStartSourceLocation(startToken);
     if (selectRegular == null && selectElement == null){
         Projection projection = new Projection(null, null, true, false);
-        projection.setSourceLocation(sourceLoc);
+        projection.setStartSourceLocation(sourceLoc);
         List<Projection> projections = new ArrayList<Projection>();
         projections.add(projection);
         selectRegular = new SelectRegular(projections);
-        selectRegular.setSourceLocation(sourceLoc);
+        selectRegular.setStartSourceLocation(sourceLoc);
     }
     SelectClause selectClause = new SelectClause(selectElement, selectRegular, distinct);
-    selectClause.setSourceLocation(sourceLoc);
+    selectClause.setStartSourceLocation(sourceLoc);
     return selectClause;
   }
 }
@@ -2855,7 +2860,7 @@
   projection = Projection()
   {
     projections.add(projection);
-    startSrcLoc = projection.getSourceLocation();
+    startSrcLoc = projection.getStartSourceLocation();
   }
   ( LOOKAHEAD(2) <COMMA> projection = Projection()
     {
@@ -2864,7 +2869,7 @@
   )*
   {
     SelectRegular selectRegular = new SelectRegular(projections);
-    selectRegular.setSourceLocation(startSrcLoc);
+    selectRegular.setStartSourceLocation(startSrcLoc);
     return selectRegular;
   }
 }
@@ -2894,7 +2899,7 @@
 }
 {
   (
-    <MUL> { star = true; startSrcLoc = getSourceLocation(token); }
+    <MUL> { star = true; startSrcLoc = getTokenStartSourceLocation(token); }
     | LOOKAHEAD(3) expr = VariableRef() <DOT> <MUL> { varStar = true; }
     | expr = Expression() ((<AS>)? name = Identifier())?
       {
@@ -2908,7 +2913,7 @@
   )
   {
     Projection projection = new Projection(expr, name, star, varStar);
-    projection.setSourceLocation(expr != null ? expr.getSourceLocation() : startSrcLoc);
+    projection.setStartSourceLocation(expr != null ? expr.getStartSourceLocation() : startSrcLoc);
     return projection;
   }
 }
@@ -2958,7 +2963,7 @@
         leftVar = ExpressionToVariableUtil.getGeneratedVariable(leftExpr, true);
     }
     FromTerm fromTerm = new FromTerm(leftExpr, leftVar, posVar, correlateClauses);
-    fromTerm.setSourceLocation(leftExpr.getSourceLocation());
+    fromTerm.setStartSourceLocation(leftExpr.getStartSourceLocation());
     return fromTerm;
   }
 }
@@ -3258,7 +3263,7 @@
     varExp = Variable() <EQ> beExp = Expression()
     {
       LetClause lc = new LetClause(varExp, beExp);
-      lc.setSourceLocation(varExp.getSourceLocation());
+      lc.setStartSourceLocation(varExp.getStartSourceLocation());
       return lc;
     }
 }
@@ -3273,7 +3278,7 @@
     varExp = Variable() <AS> beExp = Expression()
     {
       LetClause lc = new LetClause(varExp, beExp);
-      lc.setSourceLocation(varExp.getSourceLocation());
+      lc.setStartSourceLocation(varExp.getStartSourceLocation());
       return lc;
     }
 }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
index 367f568..f071c18 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
@@ -120,8 +120,8 @@
     }
 
     public void dropDataset(String dataverseName, String datasetName) {
-        Dataset dataset = new Dataset(dataverseName, datasetName, null, null, null, null, null, null, null, null, -1,
-                MetadataUtil.PENDING_NO_OP);
+        Dataset dataset = new Dataset(dataverseName, datasetName, null, null, null, null, null, null, null, null, null,
+                null, -1, MetadataUtil.PENDING_NO_OP, 0L);
         droppedCache.addDatasetIfNotExists(dataset);
         logAndApply(new MetadataLogicalOperation(dataset, false));
     }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
index 95526f4..2bd716f 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
@@ -205,10 +205,10 @@
                     indexes[i].getPartitioningExprType(), false, null);
             MetadataManager.INSTANCE.addDataset(mdTxnCtx,
                     new Dataset(indexes[i].getDataverseName(), indexes[i].getIndexedDatasetName(),
-                            indexes[i].getDataverseName(), indexes[i].getPayloadRecordType().getTypeName(),
+                            indexes[i].getDataverseName(), indexes[i].getPayloadRecordType().getTypeName(), null, null,
                             indexes[i].getNodeGroupName(), GlobalConfig.DEFAULT_COMPACTION_POLICY_NAME,
                             GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES, id, new HashMap<String, String>(),
-                            DatasetType.INTERNAL, indexes[i].getDatasetId().getId(), MetadataUtil.PENDING_NO_OP));
+                            DatasetType.INTERNAL, indexes[i].getDatasetId().getId(), MetadataUtil.PENDING_NO_OP, 0L));
         }
         if (LOGGER.isInfoEnabled()) {
             LOGGER.info("Finished inserting initial datasets.");
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
index 8471d45..3b7be95 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
@@ -150,31 +150,6 @@
     private final long rebalanceCount;
     private int pendingOp;
 
-    public Dataset(String dataverseName, String datasetName, String recordTypeDataverseName, String recordTypeName,
-            String nodeGroupName, String compactionPolicy, Map<String, String> compactionPolicyProperties,
-            IDatasetDetails datasetDetails, Map<String, String> hints, DatasetType datasetType, int datasetId,
-            int pendingOp) {
-        this(dataverseName, datasetName, recordTypeDataverseName, recordTypeName, /*metaTypeDataverseName*/null,
-                /*metaTypeName*/null, nodeGroupName, compactionPolicy, compactionPolicyProperties, datasetDetails,
-                hints, datasetType, datasetId, pendingOp);
-    }
-
-    public Dataset(String dataverseName, String datasetName, String itemTypeDataverseName, String itemTypeName,
-            String metaItemTypeDataverseName, String metaItemTypeName, String nodeGroupName, String compactionPolicy,
-            Map<String, String> compactionPolicyProperties, IDatasetDetails datasetDetails, Map<String, String> hints,
-            DatasetType datasetType, int datasetId, int pendingOp) {
-        this(dataverseName, datasetName, itemTypeDataverseName, itemTypeName, metaItemTypeDataverseName,
-                metaItemTypeName, nodeGroupName, compactionPolicy, compactionPolicyProperties, datasetDetails, hints,
-                datasetType, datasetId, pendingOp, 0L);
-    }
-
-    public Dataset(Dataset dataset) {
-        this(dataset.dataverseName, dataset.datasetName, dataset.recordTypeDataverseName, dataset.recordTypeName,
-                dataset.metaTypeDataverseName, dataset.metaTypeName, dataset.nodeGroupName,
-                dataset.compactionPolicyFactory, dataset.compactionPolicyProperties, dataset.datasetDetails,
-                dataset.hints, dataset.datasetType, dataset.datasetId, dataset.pendingOp, dataset.rebalanceCount);
-    }
-
     public Dataset(String dataverseName, String datasetName, String itemTypeDataverseName, String itemTypeName,
             String metaItemTypeDataverseName, String metaItemTypeName, String nodeGroupName, String compactionPolicy,
             Map<String, String> compactionPolicyProperties, IDatasetDetails datasetDetails, Map<String, String> hints,
@@ -368,7 +343,7 @@
                     new Dataset(dataverseName, datasetName, getItemTypeDataverseName(), getItemTypeName(),
                             getMetaItemTypeDataverseName(), getMetaItemTypeName(), getNodeGroupName(),
                             getCompactionPolicy(), getCompactionPolicyProperties(), getDatasetDetails(), getHints(),
-                            getDatasetType(), getDatasetId(), MetadataUtil.PENDING_DROP_OP));
+                            getDatasetType(), getDatasetId(), MetadataUtil.PENDING_DROP_OP, getRebalanceCount()));
 
             MetadataManager.INSTANCE.commitTransaction(mdTxnCtx.getValue());
             bActiveTxn.setValue(false);
@@ -405,10 +380,10 @@
             // #. mark the existing dataset as PendingDropOp
             MetadataManager.INSTANCE.dropDataset(mdTxnCtx.getValue(), dataverseName, datasetName);
             MetadataManager.INSTANCE.addDataset(mdTxnCtx.getValue(),
-                    new Dataset(dataverseName, datasetName, getItemTypeDataverseName(), getItemTypeName(),
+                    new Dataset(dataverseName, datasetName, getItemTypeDataverseName(), getItemTypeName(), null, null,
                             getNodeGroupName(), getCompactionPolicy(), getCompactionPolicyProperties(),
                             getDatasetDetails(), getHints(), getDatasetType(), getDatasetId(),
-                            MetadataUtil.PENDING_DROP_OP));
+                            MetadataUtil.PENDING_DROP_OP, getRebalanceCount()));
 
             MetadataManager.INSTANCE.commitTransaction(mdTxnCtx.getValue());
             bActiveTxn.setValue(false);
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
index 418bc50..771ff0d 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
@@ -69,8 +69,8 @@
 import org.apache.hyracks.storage.am.common.api.IIndexBuilderFactory;
 import org.apache.hyracks.storage.am.common.build.IndexBuilderFactory;
 import org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory;
-import org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor;
 import org.apache.hyracks.storage.am.common.dataflow.IndexDataflowHelperFactory;
+import org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
 import org.apache.hyracks.storage.common.IResourceFactory;
 import org.apache.hyracks.storage.common.IStorageManager;
@@ -380,9 +380,10 @@
         ExternalDatasetDetails dsd = new ExternalDatasetDetails(originalDsd.getAdapter(), originalDsd.getProperties(),
                 originalDsd.getTimestamp(), TransactionState.BEGIN);
         return new Dataset(dataset.getDataverseName(), dataset.getDatasetName(), dataset.getItemTypeDataverseName(),
-                dataset.getItemTypeName(), dataset.getNodeGroupName(), dataset.getCompactionPolicy(),
-                dataset.getCompactionPolicyProperties(), dsd, dataset.getHints(), DatasetType.EXTERNAL,
-                dataset.getDatasetId(), dataset.getPendingOp());
+                dataset.getItemTypeName(), dataset.getMetaItemTypeDataverseName(), dataset.getMetaItemTypeName(),
+                dataset.getNodeGroupName(), dataset.getCompactionPolicy(), dataset.getCompactionPolicyProperties(), dsd,
+                dataset.getHints(), DatasetType.EXTERNAL, dataset.getDatasetId(), dataset.getPendingOp(),
+                dataset.getRebalanceCount());
     }
 
     public static JobSpecification buildDropFilesIndexJobSpec(MetadataProvider metadataProvider, Dataset dataset)
diff --git a/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java b/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
index b87ef2a..8eb28b4 100644
--- a/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
+++ b/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
@@ -24,7 +24,6 @@
 import java.util.Map;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.exceptions.MetadataException;
 import org.apache.asterix.metadata.entities.Dataset;
 import org.apache.asterix.metadata.entities.InternalDatasetDetails;
 import org.apache.asterix.metadata.entities.InternalDatasetDetails.FileStructure;
@@ -51,9 +50,9 @@
                     indicator == null ? null : Collections.singletonList(indicator),
                     Collections.singletonList(BuiltinType.AINT64), false, Collections.emptyList());
 
-            Dataset dataset =
-                    new Dataset("test", "log", "foo", "LogType", "CB", "MetaType", "DEFAULT_NG_ALL_NODES", "prefix",
-                            compactionPolicyProperties, details, Collections.emptyMap(), DatasetType.INTERNAL, 115, 0);
+            Dataset dataset = new Dataset("test", "log", "foo", "LogType", "CB", "MetaType", "DEFAULT_NG_ALL_NODES",
+                    "prefix", compactionPolicyProperties, details, Collections.emptyMap(), DatasetType.INTERNAL, 115, 0,
+                    0L);
             DatasetTupleTranslator dtTranslator = new DatasetTupleTranslator(true);
             ITupleReference tuple = dtTranslator.getTupleFromMetadataEntity(dataset);
             Dataset deserializedDataset = dtTranslator.getMetadataEntityFromTuple(tuple);
diff --git a/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java b/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
index ab4229c..31e4233 100644
--- a/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
+++ b/asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
@@ -30,7 +30,6 @@
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.MetadataException;
 import org.apache.asterix.metadata.MetadataNode;
 import org.apache.asterix.metadata.entities.Dataset;
 import org.apache.asterix.metadata.entities.Datatype;
@@ -62,9 +61,9 @@
                     indicator == null ? null : Collections.singletonList(indicator),
                     Collections.singletonList(BuiltinType.AINT64), false, Collections.emptyList());
 
-            Dataset dataset =
-                    new Dataset("test", "d1", "foo", "LogType", "CB", "MetaType", "DEFAULT_NG_ALL_NODES", "prefix",
-                            compactionPolicyProperties, details, Collections.emptyMap(), DatasetType.INTERNAL, 115, 0);
+            Dataset dataset = new Dataset("test", "d1", "foo", "LogType", "CB", "MetaType", "DEFAULT_NG_ALL_NODES",
+                    "prefix", compactionPolicyProperties, details, Collections.emptyMap(), DatasetType.INTERNAL, 115, 0,
+                    0L);
 
             Index index = new Index("test", "d1", "i1", IndexType.BTREE,
                     Collections.singletonList(Collections.singletonList("row_id")),
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
index 59bfddf..55ee1f1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
@@ -55,8 +55,7 @@
         // Collects different branches' return types.
         // The last return expression is from the ELSE branch and it is optional.
         for (int argIndex = 2; argIndex < argSize; argIndex += (argIndex + 2 == argSize) ? 1 : 2) {
-            IAType type = (IAType) env.getType(fce.getArguments().get(argIndex).getValue());
-            types.add(type);
+            types.add((IAType) env.getType(fce.getArguments().get(argIndex).getValue()));
         }
         return TypeResolverUtil.resolve(types);
     }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
index 806235c..448ab4c 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
@@ -169,8 +169,7 @@
         IAType resultType = type;
         if ((category & NULLABLE) != 0 || (category & NULL) != 0) {
             resultType = AUnionType.createUnknownableType(resultType);
-        }
-        if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
+        } else if ((category & MISSABLE) != 0 || (category & MISSING) != 0) {
             resultType = AUnionType.createMissableType(resultType);
         }
         return resultType;
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
index 7f2d3c8..b57960d 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
@@ -39,4 +39,9 @@
     public void set(int newStart) {
         counter = newStart;
     }
+
+    @Override
+    public String toString() {
+        return Integer.toString(counter);
+    }
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
index 1dbf15e..e080e9c 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
@@ -32,6 +32,8 @@
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
 import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
 import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
+import org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor;
+import org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter;
 import org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector;
 import org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements;
 import org.apache.hyracks.algebricks.core.algebra.properties.TypePropagationPolicy;
@@ -207,4 +209,15 @@
     public void setSourceLocation(SourceLocation sourceLoc) {
         this.sourceLoc = sourceLoc;
     }
+
+    @Override
+    public String toString() {
+        LogicalOperatorPrettyPrintVisitor pvisitor = new LogicalOperatorPrettyPrintVisitor();
+        try {
+            PlanPrettyPrinter.printOperator(this, pvisitor, 0);
+        } catch (Throwable th) {
+            return "Failed to Stringify: " + th.getClass().getSimpleName();
+        }
+        return pvisitor.toString();
+    }
 }
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
index 370ec6d..406bfbd 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
@@ -77,9 +77,9 @@
     private void printRuleApplication(IAlgebraicRewriteRule rule, String beforePlan, String afterPlan)
             throws AlgebricksException {
         if (AlgebricksConfig.ALGEBRICKS_LOGGER.isTraceEnabled()) {
-            AlgebricksConfig.ALGEBRICKS_LOGGER.trace(">>>> Rule " + rule.getClass() + " fired.\n");
-            AlgebricksConfig.ALGEBRICKS_LOGGER.trace(">>>> Before plan\n" + beforePlan + "\n");
-            AlgebricksConfig.ALGEBRICKS_LOGGER.trace(">>>> After plan\n" + afterPlan + "\n");
+            AlgebricksConfig.ALGEBRICKS_LOGGER.info(">>>> Rule " + rule.getClass() + " fired.\n");
+            AlgebricksConfig.ALGEBRICKS_LOGGER.info(">>>> Before plan\n" + beforePlan + "\n");
+            AlgebricksConfig.ALGEBRICKS_LOGGER.info(">>>> After plan\n" + afterPlan + "\n");
         }
     }
 
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
index 8eb9b90..3214479 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
@@ -86,11 +86,11 @@
     }
 
     private void logPlanAt(String name, Level lvl) throws AlgebricksException {
-        if (AlgebricksConfig.ALGEBRICKS_LOGGER.isEnabled(lvl)) {
+        if (AlgebricksConfig.ALGEBRICKS_LOGGER.isEnabled(Level.TRACE)) {
             final LogicalOperatorPrettyPrintVisitor pvisitor = context.getPrettyPrintVisitor();
             pvisitor.reset(new AlgebricksAppendable());
             PlanPrettyPrinter.printPlan(plan, pvisitor, 0);
-            AlgebricksConfig.ALGEBRICKS_LOGGER.log(lvl, name + ":\n" + pvisitor.get().toString());
+            AlgebricksConfig.ALGEBRICKS_LOGGER.log(Level.TRACE, name + ":\n" + pvisitor.get().toString());
         }
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Analytics Compatibility Compilation Successful
https://goo.gl/si2G1B : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "abdullah alamoudi (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/2960

to look at the new patch set (#4).

Change subject: WIP: Start and End of Expressions
......................................................................

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/single-line-definition/single-line-definition.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf28/udf28.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
54 files changed, 543 insertions(+), 466 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/60/2960/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/4395/ (6/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2: -Contrib

Analytics Compatibility Compilation Successful
https://goo.gl/gecqSt : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-sonar/8429/ (2/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-assemblies/4701/ (4/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7307/ : UNSTABLE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7312/ : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "abdullah alamoudi (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/2960

to look at the new patch set (#3).

Change subject: WIP: Start and End of Expressions
......................................................................

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/single-line-definition/single-line-definition.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf28/udf28.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M asterixdb/asterix-lang-aql/src/main/java/org/apache/asterix/lang/aql/parser/FunctionParser.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
54 files changed, 541 insertions(+), 462 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/60/2960/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-no-installer-app/4836/ (3/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2: Contrib+1

Analytics Compatibility Tests Successful
https://goo.gl/HP7Y6k : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-asterix-app-sql-execution/4485/ (1/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-cancellation-test/4488/ (4/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-assemblies/4709/ (11/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7311/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4: Contrib-2

Analytics Compatibility Tests Failed
https://goo.gl/Azfw4T : UNSTABLE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-ensure-ancestor/2501/ (3/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-format/4455/ (11/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/9958/ (9/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/4392/ (8/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-format/4447/ (10/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3: Contrib+1

Analytics Compatibility Tests Successful
https://goo.gl/S4Pjdd : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-no-installer-app/4837/ (5/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1: Contrib-2

Analytics Compatibility Compilation Failed
https://goo.gl/fKe7Xm : UNSTABLE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7304/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7307/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2: Contrib-2

Analytics Compatibility Compilation Failed
https://goo.gl/oLGspo : UNSTABLE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-no-installer-app/4832/ (11/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-asterix-app/4875/ (6/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/9965/ (7/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

WARNING: THIS CHANGE CONTAINS CROSS-PRODUCT CHANGES IN:
* asterixdb
* hyracks-fullstack

PLEASE REVIEW CAREFULLY AND LOOK FOR API CHANGES!

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

WARNING: THIS CHANGE CONTAINS CROSS-PRODUCT CHANGES IN:
* asterixdb
* hyracks-fullstack

PLEASE REVIEW CAREFULLY AND LOOK FOR API CHANGES!

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-cancellation-test/4484/ (7/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/4400/ (10/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

WARNING: THIS CHANGE CONTAINS CROSS-PRODUCT CHANGES IN:
* asterixdb
* hyracks-fullstack

PLEASE REVIEW CAREFULLY AND LOOK FOR API CHANGES!

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7311/ : UNSTABLE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-asterix-app/4876/ (9/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-asterix-app-sql-execution/4489/ (9/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-sonar/8430/ (2/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/4399/ (5/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-verify-storage/5056/ (1/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/9966/ (7/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-assemblies/4704/ (9/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-cancellation-test/4481/ (6/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-verify-storage/5057/ (4/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Anon. E. Moose (Code Review)" <do...@asterixdb.incubator.apache.org>.
Anon. E. Moose #1000171 has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Analytics Compatibility Compilation Successful
https://goo.gl/D6HntD : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-format/4450/ (5/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-ensure-ancestor/2493/ (2/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-assemblies/4710/ (8/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-no-installer-app/4829/ (11/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-ensure-ancestor/2496/ (8/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-sonar/8422/ (2/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-verify-storage/5052/ (3/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-asterix-app/4869/ (7/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-asterix-app/4871/ (10/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-asterix-app-sql-execution/4482/ (1/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

WARNING: THIS CHANGE CONTAINS CROSS-PRODUCT CHANGES IN:
* asterixdb
* hyracks-fullstack

PLEASE REVIEW CAREFULLY AND LOOK FOR API CHANGES!

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-ensure-ancestor/2500/ (10/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-format/4454/ (8/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-cancellation-test/4489/ (6/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-sonar/8419/ (3/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-asterix-app-sql-execution/4490/ (1/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 4:

Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/7312/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dm...@couchbase.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-verify-storage/5049/ (5/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "abdullah alamoudi (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/2960

to look at the new patch set (#2).

Change subject: WIP: Start and End of Expressions
......................................................................

WIP: Start and End of Expressions

Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
---
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/typecast/StaticTypeCastUtil.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/LangExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/PlanTranslationUtil.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/active/ActiveEventsListenerTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestDataset.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/metadata/MetadataTxnTest.java
M asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/IndexDropOperatorNodePushableTest.java
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/AbstractLangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Expression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/ILangExpression.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/expression/LiteralExpr.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/parser/ScopeChecker.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/AbstractInlineUdfsVisitor.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/visitor/CloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/FunctionParser.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/GenerateColumnNameVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/InlineColumnAliasVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/OperatorExpressionVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SetOperationVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppBuiltinFunctionRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppDistinctAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByAggregationSugarVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppGroupByVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VariableCheckAndRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/ExpressionToVariableUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/SqlppRewriteUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/DeepCopyVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppCloneAndSubstituteVariablesVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppDeleteRewriteVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/MetadataTransactionContext.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Dataset.java
M asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/ExternalIndexingOperations.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/DatasetTupleTranslatorTest.java
M asterixdb/asterix-metadata/src/test/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslatorTest.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SwitchCaseComputer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/base/Counter.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractLogicalOperator.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java
50 files changed, 535 insertions(+), 456 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/60/2960/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>

Change in asterixdb[stabilization-f69489]: WIP: Start and End of Expressions

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: WIP: Start and End of Expressions
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/9961/ (4/11)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2960
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I12f81d5908abeefcaaa23f4d8541e16618ea3c1f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: stabilization-f69489
Gerrit-Owner: abdullah alamoudi <ba...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No