pvary commented on a change in pull request #2865:
URL: https://github.com/apache/hive/pull/2865#discussion_r768598009
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/reexec/ReExecDriver.java
##########
@@ -190,52 +229,21 @@ public CommandProcessorResponse run() throws
CommandProcessorException {
}
PlanMapper newPlanMapper = coreDriver.getPlanMapper();
- if (!explainReOptimization &&
!shouldReExecuteAfterCompile(oldPlanMapper, newPlanMapper)) {
+ if (!explainReOptimization &&
+ !plugins.stream().anyMatch(p -> p.shouldReExecute(executionIndex,
oldPlanMapper, newPlanMapper))) {
LOG.info("re-running the query would probably not yield better
results; returning with last error");
// FIXME: retain old error; or create a new one?
return cpr;
}
}
}
- private void afterExecute(PlanMapper planMapper, boolean success) {
- for (IReExecutionPlugin p : plugins) {
- p.afterExecute(planMapper, success);
- }
- }
-
- private boolean shouldReExecuteAfterCompile(PlanMapper oldPlanMapper,
PlanMapper newPlanMapper) {
- boolean ret = false;
- for (IReExecutionPlugin p : plugins) {
- boolean shouldReExecute = p.shouldReExecute(executionIndex,
oldPlanMapper, newPlanMapper);
- LOG.debug("{}.shouldReExecuteAfterCompile = {}", p, shouldReExecute);
- ret |= shouldReExecute;
- }
- return ret;
- }
-
- private boolean shouldReExecute() {
- boolean ret = false;
- for (IReExecutionPlugin p : plugins) {
- boolean shouldReExecute = p.shouldReExecute(executionIndex);
- LOG.debug("{}.shouldReExecute = {}", p, shouldReExecute);
Review comment:
Same as above
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]