phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject phoenix git commit: PHOENIX-3195 Addendum. (James Taylor)
Date Tue, 23 Aug 2016 03:25:28 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.2 da974259d -> 2da8d9d69


PHOENIX-3195 Addendum. (James Taylor)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2da8d9d6
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2da8d9d6
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2da8d9d6

Branch: refs/heads/4.8-HBase-1.2
Commit: 2da8d9d693569db75e39e302e0e0abb58a10c465
Parents: da97425
Author: Lars Hofhansl <larsh@apache.org>
Authored: Mon Aug 22 20:21:54 2016 -0700
Committer: Lars Hofhansl <larsh@apache.org>
Committed: Mon Aug 22 20:27:23 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/phoenix/compile/ExpressionCompiler.java    | 6 +++++-
 .../main/java/org/apache/phoenix/compile/OrderByCompiler.java  | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2da8d9d6/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
b/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
index 1278494..0fd1876 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/ExpressionCompiler.java
@@ -393,6 +393,10 @@ public class ExpressionCompiler extends UnsupportedAllParseNodeVisitor<Expressio
         return ref;
     }
 
+    protected void addColumn(PColumn column) {
+        context.getScan().addColumn(column.getFamilyName().getBytes(), column.getName().getBytes());
+    }
+
     @Override
     public Expression visit(ColumnParseNode node) throws SQLException {
         ColumnRef ref = resolveColumn(node);
@@ -407,7 +411,7 @@ public class ExpressionCompiler extends UnsupportedAllParseNodeVisitor<Expressio
             return LiteralExpression.newConstant(column.getDataType().toObject(ptr), column.getDataType());
         }
         if (tableRef.equals(context.getCurrentTable()) && !SchemaUtil.isPKColumn(column))
{ // project only kv columns
-            context.getScan().addColumn(column.getFamilyName().getBytes(), column.getName().getBytes());
+            addColumn(column);
         }
         Expression expression = ref.newColumnExpression(node.isTableNameCaseSensitive(),
node.isCaseSensitive());
         Expression wrappedExpression = wrapGroupByExpression(expression);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2da8d9d6/phoenix-core/src/main/java/org/apache/phoenix/compile/OrderByCompiler.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/OrderByCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/OrderByCompiler.java
index 6804375..9bc0c31 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/OrderByCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/OrderByCompiler.java
@@ -36,6 +36,7 @@ import org.apache.phoenix.parse.ParseNode;
 import org.apache.phoenix.parse.SelectStatement;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.query.QueryServicesOptions;
+import org.apache.phoenix.schema.PColumn;
 import org.apache.phoenix.schema.PTableType;
 import org.apache.phoenix.schema.SortOrder;
 import org.apache.phoenix.schema.types.PInteger;
@@ -97,6 +98,8 @@ public class OrderByCompiler {
             compiler = new ExpressionCompiler(context, GroupBy.EMPTY_GROUP_BY) {
                 @Override
                 protected Expression addExpression(Expression expression) {return expression;}
+                @Override
+                protected void addColumn(PColumn column) {}
             };
         } else {
             compiler = new ExpressionCompiler(context, groupBy);


Mime
View raw message