virajjasani commented on code in PR #1851:
URL: https://github.com/apache/phoenix/pull/1851#discussion_r1517163722


##########
phoenix-core-client/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java:
##########
@@ -247,6 +248,10 @@ private List<QueryPlan> 
getApplicablePlansForSingleFlatQuery(QueryPlan dataPlan,
             }
             plans.add(0, hintedPlan);
         }
+        if (dataPlan.getContext().getScanRanges().isPointLookup()
+                && stopAtBestPlan && dataPlan.isApplicable()) {
+            return Collections.<QueryPlan> singletonList(dataPlan);
+        }

Review Comment:
   I was thinking about the same.
   
   It seems that we might have more plans in the list of plans than just data 
plan, so if we return single plan here as data plan, it would help cover this 
case: Even if the hinted index is not applicable, and the data table has point 
lookup, we return best plan as point lookup on data table.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to