You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/08/25 09:17:33 UTC

[GitHub] [phoenix] richardantal commented on a change in pull request #1287: PHOENIX-5072 Cursor Query Loops Eternally with Local Index, Returns F…

richardantal commented on a change in pull request #1287:
URL: https://github.com/apache/phoenix/pull/1287#discussion_r695564457



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/compile/DeclareCursorCompiler.java
##########
@@ -48,7 +48,13 @@
     public DeclareCursorCompiler(PhoenixStatement statement, Operation operation, QueryPlan queryPlan) {
         this.statement = statement;
         this.operation = operation;
-        this.queryPlan = queryPlan;
+        QueryPlan compilePlan = queryPlan;
+        try {
+            compilePlan = statement.getConnection().getQueryServices().getOptimizer().optimize(statement, queryPlan);
+        } catch (SQLException e) {

Review comment:
       I wanted to handle the exception to minimise the effect of this change in case the optimize() throws an Exception.
   Even if we handle the exception here (in the DeclareCursorCompiler) later optimize() will be called on the CursorFetchPlan and the Exception would be thrown there so it doesn't really makes sense to handle it here probably.




-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org