[ 
https://issues.apache.org/jira/browse/PHOENIX-7095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17786183#comment-17786183
 ] 

ASF GitHub Bot commented on PHOENIX-7095:
-----------------------------------------

stoty commented on code in PR #1729:
URL: https://github.com/apache/phoenix/pull/1729#discussion_r1393697723


##########
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java:
##########
@@ -330,161 +333,162 @@ protected PhoenixResultSet executeQuery(final 
CompilableStatement stmt, final Qu
     }
 
     private PhoenixResultSet executeQuery(final CompilableStatement stmt,
-                                          final boolean 
doRetryOnMetaNotFoundError, final QueryLogger queryLogger, final boolean 
noCommit) throws SQLException {
+            final boolean doRetryOnMetaNotFoundError, final QueryLogger 
queryLogger,
+            final boolean noCommit) throws SQLException {
         GLOBAL_SELECT_SQL_COUNTER.increment();
 
         try {
-            return CallRunner
-                    .run(new CallRunner.CallableThrowable<PhoenixResultSet, 
SQLException>() {
-                        @Override public PhoenixResultSet call() throws 
SQLException {
-                            final long startTime = 
EnvironmentEdgeManager.currentTimeMillis();
-                            boolean success = false;
-                            boolean pointLookup = false;
-                            String tableName = null;
-                            PhoenixResultSet rs = null;
-                            try {
-                                PhoenixConnection conn = getConnection();
-                                conn.checkOpen();
-
-                                if 
(conn.getQueryServices().isUpgradeRequired() && !conn
-                                        .isRunningUpgrade()
-                                        && stmt.getOperation() != 
Operation.UPGRADE) {
-                                    throw new UpgradeRequiredException();
-                                }
-                                QueryPlan
-                                        plan =
-                                        stmt.compilePlan(PhoenixStatement.this,
-                                                
Sequence.ValueOp.VALIDATE_SEQUENCE);
-                                // Send mutations to hbase, so they are 
visible to subsequent reads.
-                                // Use original plan for data table so that 
data and immutable indexes will be sent
-                                // TODO: for joins, we need to iterate through 
all tables, but we need the original table,
-                                // not the projected table, so 
plan.getContext().getResolver().getTables() won't work.
-                                if (plan.getTableRef() != null
-                                        && plan.getTableRef().getTable() != 
null && !Strings
-                                        .isNullOrEmpty(
-                                                
plan.getTableRef().getTable().getPhysicalName()
-                                                        .toString())) {
-                                    tableName = 
plan.getTableRef().getTable().getPhysicalName()
-                                            .toString();
-                                }
-                                if 
(plan.getContext().getScanRanges().isPointLookup()) {
-                                    pointLookup = true;
-                                }
-                                Iterator<TableRef> tableRefs = 
plan.getSourceRefs().iterator();
-                                
connection.getMutationState().sendUncommitted(tableRefs);
-                                plan =
-                                        
connection.getQueryServices().getOptimizer()
-                                                
.optimize(PhoenixStatement.this, plan);
-                                // this will create its own trace internally, 
so we don't wrap this
-                                // whole thing in tracing
-                                ResultIterator resultIterator = 
plan.iterator();
+            return CallRunner.run(

Review Comment:
   It's the usual fight with the usless 120 character line width limit.
   Since the code was already not well formatted, I may as well revert it.





> Implement Statement.closeOnCompletion() and fix related close() bugs
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-7095
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7095
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.2.0, 5.1.3
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>
> Umbrella ticket, so that the three dependent tickets can be fixed in a single 
> commit.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to