diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java b/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java index a14aea25463ad4..d718089fcabfee 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/NereidsCoordinator.java @@ -199,7 +199,11 @@ public long getNumReceivedRows() { @Override public long getJobId() { - return coordinatorContext.asLoadProcessor().jobId; + JobProcessor jobProcessor = coordinatorContext.getJobProcessor(); + if (jobProcessor instanceof LoadProcessor) { + return ((LoadProcessor) jobProcessor).jobId; + } + return -1L; } /*