Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ql/src/java/org/apache/hadoop/hive/ql/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ private void runInternal(String command, boolean alreadyCompiled) throws Command

if (!alreadyCompiled) {
compileInternal(command, true);
} else {
driverContext.recordQueryStartTime();
}

DriverUtils.checkInterrupted(driverState, driverContext, "at acquiring the lock.", null, null);
Expand Down Expand Up @@ -273,14 +271,12 @@ private void validateCurrentSnapshot() throws CommandProcessorException {
driverContext.setRetrial(true);

compileInternal(context.getCmd(), true);
driverContext.setRetrial(false);

if (driverContext.getPlan().hasAcidResourcesInQuery()) {
driverTxnHandler.recordValidWriteIds();
driverTxnHandler.setWriteIdForAcidFileSinks();
}
// Since we're reusing the compiled plan, we need to update its start time for current run
driverContext.recordQueryStartTime();
driverContext.setRetrial(false);
}
// Re-check snapshot only in case we had to release locks and open a new transaction,
// otherwise exclusive locks should protect output tables/partitions in snapshot from concurrent writes.
Expand Down
4 changes: 0 additions & 4 deletions ql/src/java/org/apache/hadoop/hive/ql/DriverContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,4 @@ public void setExplainPlan(String explainPlan) {
public String getExplainPlan() {
return explainPlan;
}

public void recordQueryStartTime() {
plan.setQueryStartTime(queryDisplay.getQueryStartTime());

@abstractdog abstractdog Mar 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you remove this, the only usage of plan.setQueryStartTime() is from TestHiveProtoLoggingHook, does it make sense to add @VisibleForTesting to setQueryStartTime to let the code readers know that they should not set this directly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method was added by me, there were no usages except Driver

}
}
Loading