phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maryann...@apache.org
Subject phoenix git commit: PHOENIX-4616 Move join query optimization out from QueryCompiler into QueryOptimizer (addendum)
Date Fri, 06 Apr 2018 04:06:10 GMT
Repository: phoenix
Updated Branches:
  refs/heads/master 49fca494b -> 0b1b219ef


PHOENIX-4616 Move join query optimization out from QueryCompiler into QueryOptimizer (addendum)


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

Branch: refs/heads/master
Commit: 0b1b219ef0e803d7ff254408c24b4bb67a5d88f9
Parents: 49fca49
Author: maryannxue <maryann.xue@gmail.com>
Authored: Thu Apr 5 19:33:53 2018 -0700
Committer: maryannxue <maryann.xue@gmail.com>
Committed: Thu Apr 5 19:33:53 2018 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/phoenix/optimize/QueryOptimizer.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0b1b219e/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index 3a2d11e..6d668cc 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -126,7 +126,10 @@ public class QueryOptimizer {
         }
 
         SelectStatement select = (SelectStatement) dataPlan.getStatement();
-        if (!select.isUnion() && !select.isJoin() && select.getInnerSelectStatement()
== null) {
+        if (!select.isUnion()
+                && !select.isJoin()
+                && select.getInnerSelectStatement() == null
+                && (select.getWhere() == null || !select.getWhere().hasSubquery()))
{
             return getApplicablePlansForSingleFlatQuery(dataPlan, statement, targetColumns,
parallelIteratorFactory, stopAtBestPlan);
         }
 


Mime
View raw message