You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2014/02/12 23:00:11 UTC
[1/2] git commit: Fix broken QueryCompilerTest
Updated Branches:
refs/heads/master 88c8b997d -> 91b7f6d45
Fix broken QueryCompilerTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/commit/9b0a1128
Tree: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/tree/9b0a1128
Diff: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/diff/9b0a1128
Branch: refs/heads/master
Commit: 9b0a1128ea4be0211b4229c0c8724dabf6995acd
Parents: b925d4c
Author: James Taylor <ja...@apache.org>
Authored: Wed Feb 12 13:59:25 2014 -0800
Committer: James Taylor <ja...@apache.org>
Committed: Wed Feb 12 13:59:25 2014 -0800
----------------------------------------------------------------------
.../java/org/apache/phoenix/compile/QueryCompiler.java | 13 +++++++++----
.../org/apache/phoenix/execute/BasicQueryPlan.java | 5 -----
2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/9b0a1128/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java
index d0674f4..1895ecb 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java
@@ -46,6 +46,7 @@ import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
import org.apache.phoenix.jdbc.PhoenixStatement;
import org.apache.phoenix.join.HashJoinInfo;
import org.apache.phoenix.join.ScanProjector;
+import org.apache.phoenix.parse.HintNode.Hint;
import org.apache.phoenix.parse.JoinTableNode.JoinType;
import org.apache.phoenix.parse.ParseNode;
import org.apache.phoenix.parse.SQLParser;
@@ -79,7 +80,7 @@ public class QueryCompiler {
private static final String LOAD_COLUMN_FAMILIES_ON_DEMAND_ATTR = "_ondemand_";
private final PhoenixStatement statement;
private final Scan scan;
- private final Scan scanCopy;
+ private final Scan originalScan;
private final ColumnResolver resolver;
private final SelectStatement select;
private final List<? extends PDatum> targetColumns;
@@ -99,7 +100,11 @@ public class QueryCompiler {
if (statement.getConnection().getQueryServices().getLowestClusterHBaseVersion() >= PhoenixDatabaseMetaData.ESSENTIAL_FAMILY_VERSION_THRESHOLD) {
this.scan.setAttribute(LOAD_COLUMN_FAMILIES_ON_DEMAND_ATTR, QueryConstants.TRUE);
}
- this.scanCopy = ScanUtil.newScan(scan);
+ if (select.getHint().hasHint(Hint.NO_CACHE)) {
+ scan.setCacheBlocks(false);
+ }
+
+ this.originalScan = ScanUtil.newScan(scan);
}
/**
@@ -163,7 +168,7 @@ public class QueryCompiler {
throw new SQLFeatureNotSupportedException("Sub queries not supported.");
ProjectedPTableWrapper subProjTable = join.createProjectedTable(joinTable.getTable(), false);
ColumnResolver resolver = join.getColumnResolver(subProjTable);
- Scan subScan = ScanUtil.newScan(scanCopy);
+ Scan subScan = ScanUtil.newScan(originalScan);
ScanProjector.serializeProjectorIntoScan(subScan, JoinCompiler.getScanProjector(subProjTable));
StatementContext subContext = new StatementContext(statement, resolver, binds, subScan);
subContext.setCurrentTable(joinTable.getTable());
@@ -211,7 +216,7 @@ public class QueryCompiler {
SelectStatement lhs = JoinCompiler.getSubQueryWithoutLastJoin(select, join);
SelectStatement rhs = JoinCompiler.getSubqueryForLastJoinTable(select, join);
JoinSpec lhsJoin = JoinCompiler.getSubJoinSpecWithoutPostFilters(join);
- Scan subScan = ScanUtil.newScan(scanCopy);
+ Scan subScan = ScanUtil.newScan(originalScan);
StatementContext lhsCtx = new StatementContext(statement, context.getResolver(), binds, subScan);
QueryPlan lhsPlan = compileJoinQuery(lhsCtx, lhs, binds, lhsJoin, true);
ColumnResolver lhsResolver = lhsCtx.getResolver();
http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/9b0a1128/phoenix-core/src/main/java/org/apache/phoenix/execute/BasicQueryPlan.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/execute/BasicQueryPlan.java b/phoenix-core/src/main/java/org/apache/phoenix/execute/BasicQueryPlan.java
index 2740035..e44ec90 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/BasicQueryPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/BasicQueryPlan.java
@@ -38,7 +38,6 @@ import org.apache.phoenix.iterate.ParallelIterators.ParallelIteratorFactory;
import org.apache.phoenix.iterate.ResultIterator;
import org.apache.phoenix.jdbc.PhoenixConnection;
import org.apache.phoenix.parse.FilterableStatement;
-import org.apache.phoenix.parse.HintNode.Hint;
import org.apache.phoenix.query.ConnectionQueryServices;
import org.apache.phoenix.schema.TableRef;
import org.apache.phoenix.util.SQLCloseable;
@@ -138,10 +137,6 @@ public abstract class BasicQueryPlan implements QueryPlan {
}
Scan scan = context.getScan();
- if (statement.getHint().hasHint(Hint.NO_CACHE)) {
- scan.setCacheBlocks(false);
- }
-
// Set producer on scan so HBase server does round robin processing
//setProducer(scan);
// Set the time range on the scan so we don't get back rows newer than when the statement was compiled
[2/2] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-phoenix
Posted by ja...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-phoenix
Project: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/commit/91b7f6d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/tree/91b7f6d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/diff/91b7f6d4
Branch: refs/heads/master
Commit: 91b7f6d45f9b2a2a92ca2d43b58fc71a0feceaa4
Parents: 9b0a112 88c8b99
Author: James Taylor <ja...@apache.org>
Authored: Wed Feb 12 13:59:52 2014 -0800
Committer: James Taylor <ja...@apache.org>
Committed: Wed Feb 12 13:59:52 2014 -0800
----------------------------------------------------------------------
.../phoenix/parse/CreateIndexStatement.java | 2 +-
.../apache/phoenix/end2end/HashJoinTest.java | 30 ++++++++++----------
.../java/org/apache/phoenix/util/TestUtil.java | 2 +-
3 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------