[BugFix] Fix stream load exec status update NPE (backport #62921) (#62981)

Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
Co-authored-by: PengFei Li <lpengfei2016@gmail.com>
This commit is contained in:
mergify[bot] 2025-09-11 04:03:22 +00:00 committed by GitHub
parent a507915f0a
commit 5969a5e8e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -294,6 +294,11 @@ public class JobSpec {
TExecPlanFragmentParams params = planner.getExecPlanFragmentParams();
TUniqueId queryId = params.getParams().getFragment_instance_id();
// Build minimal query options for sync stream load to avoid null dereference
TQueryOptions queryOptions = new TQueryOptions();
queryOptions.setQuery_type(TQueryType.LOAD);
queryOptions.setLoad_job_type(TLoadJobType.STREAM_LOAD);
return new Builder()
.queryId(queryId)
.fragments(Collections.emptyList())
@ -303,7 +308,7 @@ public class JobSpec {
.isBlockQuery(true)
.needReport(true)
.queryGlobals(null)
.queryOptions(null)
.queryOptions(queryOptions)
.enablePipeline(false)
.resourceGroup(null)
.computeResource(planner.getComputeResource())