asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: fix typo
Date Tue, 17 May 2016 16:38:27 GMT
Till Westmann has submitted this change and it was merged.

Change subject: fix typo
......................................................................


fix typo

Change-Id: Iabd78359ae7cdb924a87444dd03968e6f428ab8e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/786
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
---
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/rewrites/VariableSubstitutionEnvironment.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/rewrites/visitor/InlineColumnAliasVisitor.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteVariablesVisitor.java
4 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Yingyi Bu: Looks good to me, approved
  Jenkins: Verified



diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/rewrites/VariableSubstitutionEnvironment.java
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/rewrites/VariableSubstitutionEnvironment.java
index b99b3b3..4c4767e 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/rewrites/VariableSubstitutionEnvironment.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/rewrites/VariableSubstitutionEnvironment.java
@@ -46,7 +46,7 @@
         oldVarToNewExpressionMap.putAll(varExprMap);
     }
 
-    public Expression findSubstituion(VariableExpr oldVar) {
+    public Expression findSubstitution(VariableExpr oldVar) {
         return oldVarToNewExpressionMap.get(oldVar.getVar().getValue());
     }
 
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 db55c0e..d380862 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
@@ -156,7 +156,7 @@
             if (!env.constainsOldVar(varExpr)) {
                 throw new AsterixException("Parameter " + vi + " does not appear in the substitution
list.");
             }
-            Expression newExpr = env.findSubstituion(varExpr);
+            Expression newExpr = env.findSubstitution(varExpr);
             if (newExpr.getKind() != Kind.VARIABLE_EXPRESSION) {
                 throw new AsterixException("Parameter " + vi + " cannot be substituted by
a non-variable expression.");
             }
@@ -297,7 +297,7 @@
     protected Expression rewriteVariableExpr(VariableExpr expr, VariableSubstitutionEnvironment
env)
             throws AsterixException {
         if (env.constainsOldVar(expr)) {
-            return env.findSubstituion(expr);
+            return env.findSubstitution(expr);
         } else {
             // it is a variable from the context
             VarIdentifier var = context.getRewrittenVar(expr.getVar().getId());
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 f5f2fe5..ea78c9b 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
@@ -139,7 +139,7 @@
         VariableExpr columnAlias = new VariableExpr(
                 SqlppVariableUtil.toInternalVariableIdentifier(projection.getName()));
         VariableSubstitutionEnvironment env = scopeChecker.getCurrentScope().getVarSubstitutionEnvironment();
-        Expression gbyKey = (Expression) SqlppRewriteUtil.deepCopy(env.findSubstituion(columnAlias));
+        Expression gbyKey = (Expression) SqlppRewriteUtil.deepCopy(env.findSubstitution(columnAlias));
         if (overwriteWithGbyKeyVarRefs) {
             if (gbyKey != null) {
                 projection.setExpression(gbyKey);
@@ -233,7 +233,7 @@
                     if (overwriteWithGbyKeyVarRefs) {
                         // Rewrites the field value expression by the mapped grouping key
                         // (for the column alias) if there exists such a mapping.
-                        Expression gbyKey = (Expression) SqlppRewriteUtil.deepCopy(env.findSubstituion(columnAlias));
+                        Expression gbyKey = (Expression) SqlppRewriteUtil.deepCopy(env.findSubstitution(columnAlias));
                         if (gbyKey != null) {
                             binding.setRightExpr(gbyKey);
                         }
@@ -335,7 +335,7 @@
             }
             if (oldGbyExpr.getKind() == Kind.VARIABLE_EXPRESSION) {
                 VariableExpr oldGbyVarExpr = (VariableExpr) oldGbyExpr;
-                if (env.findSubstituion(oldGbyVarExpr) != null) {
+                if (env.findSubstitution(oldGbyVarExpr) != null) {
                     // Re-mapping that needs to be added.
                     oldGbyExprsToNewGbyVarMap.put(oldGbyVarExpr, gbyVarExpr.getVar());
                 }
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteVariablesVisitor.java
b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteVariablesVisitor.java
index f737eb7..923f86d 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteVariablesVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppSubstituteVariablesVisitor.java
@@ -35,7 +35,7 @@
     protected Expression rewriteVariableExpr(VariableExpr expr, VariableSubstitutionEnvironment
env)
             throws AsterixException {
         if (env.constainsOldVar(expr)) {
-            return (Expression) SqlppRewriteUtil.deepCopy(env.findSubstituion(expr));
+            return (Expression) SqlppRewriteUtil.deepCopy(env.findSubstitution(expr));
         }
         return expr;
     }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iabd78359ae7cdb924a87444dd03968e6f428ab8e
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>

Mime
View raw message