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/24 19:08:01 UTC

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

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



##########
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:
       why do we want to handle the exception, shouldn't we just propogate?

##########
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) {
+            e.printStackTrace();

Review comment:
       Please use logger here.




-- 
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