You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by la...@apache.org on 2019/05/25 01:54:56 UTC
[phoenix] branch 4.x-HBase-1.3 updated: PHOENIX-5112 Simplify
QueryPlan selection in Phoenix.
This is an automated email from the ASF dual-hosted git repository.
larsh pushed a commit to branch 4.x-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.x-HBase-1.3 by this push:
new a425c72 PHOENIX-5112 Simplify QueryPlan selection in Phoenix.
a425c72 is described below
commit a425c7200b8cb9f17a1081284f688db48cedcfdf
Author: Lars Hofhansl <la...@apache.org>
AuthorDate: Fri May 24 18:55:09 2019 -0700
PHOENIX-5112 Simplify QueryPlan selection in Phoenix.
---
.../org/apache/phoenix/optimize/QueryOptimizer.java | 18 ------------------
1 file changed, 18 deletions(-)
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 43a5950..4f0dfeb 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
@@ -324,24 +324,6 @@ public class QueryOptimizer {
QueryPlan plan = compiler.compile();
- boolean optimizedSort =
- plan.getOrderBy().getOrderByExpressions().isEmpty()
- && !dataPlan.getOrderBy().getOrderByExpressions().isEmpty()
- || plan.getGroupBy().isOrderPreserving()
- && !dataPlan.getGroupBy().isOrderPreserving();
-
- // If query doesn't have where clause, or the planner didn't add any (bound) scan ranges, and some of
- // columns to project/filter are missing in the index then we need to get missing columns from main table
- // for each row in local index. It's like full scan of both local index and data table which is inefficient.
- // Then we don't use the index. If all the columns to project are present in the index
- // then we can use the index even the query doesn't have where clause.
- // We'll use the index anyway if it allowed us to avoid a sort operation.
- if (index.getIndexType() == IndexType.LOCAL
- && (indexSelect.getWhere() == null
- || plan.getContext().getScanRanges().getBoundRanges().size() == 1)
- && !plan.getContext().getDataColumns().isEmpty() && !optimizedSort) {
- return null;
- }
indexTableRef = plan.getTableRef();
indexTable = indexTableRef.getTable();
indexState = indexTable.getIndexState();