stoty commented on code in PR #1729:
URL: https://github.com/apache/phoenix/pull/1729#discussion_r1393720720
##########
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:
Addressed both concerns.
--
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]