Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Insert;
import org.apache.iotdb.db.queryengine.plan.relational.sql.parser.SqlParser;
import org.apache.iotdb.db.queryengine.plan.statement.StatementType;
import org.apache.iotdb.db.queryengine.plan.statement.crud.InsertTabletStatement;
import org.apache.iotdb.db.utils.CommonUtils;
import org.apache.iotdb.db.utils.SetThreadName;
Expand Down Expand Up @@ -139,7 +140,7 @@ public Response executeQueryStatement(SQL sql, SecurityContext securityContext)
.ifPresent(
s ->
CommonUtils.addStatementExecutionLatency(
OperationType.EXECUTE_QUERY_STATEMENT, s.toString(), costTime));
OperationType.EXECUTE_QUERY_STATEMENT, StatementType.QUERY.name(), costTime));
}
}

Expand Down Expand Up @@ -194,7 +195,6 @@ public Response executeNonQueryStatement(SQL sql, SecurityContext securityContex
SqlParser relationSqlParser = new SqlParser();
Long queryId = null;
Statement statement = null;
long startTime = System.nanoTime();
try {
IClientSession clientSession = SESSION_MANAGER.getCurrSession();
statement = createStatement(sql, clientSession, relationSqlParser);
Expand Down Expand Up @@ -233,12 +233,6 @@ public Response executeNonQueryStatement(SQL sql, SecurityContext securityContex
} catch (Exception e) {
return Response.ok().entity(ExceptionHandler.tryCatchException(e)).build();
} finally {
long costTime = System.nanoTime() - startTime;
Optional.ofNullable(statement)
.ifPresent(
s ->
CommonUtils.addStatementExecutionLatency(
OperationType.EXECUTE_NON_QUERY_PLAN, s.toString(), costTime));
if (queryId != null) {
COORDINATOR.cleanupQueryExecution(queryId);
}
Expand Down
Loading