Skip to content

Commit

Permalink
sql: check for resultWriter error in runPlanInsidePlan
Browse files Browse the repository at this point in the history
In #104553, we modified
`runPlanInsidePlan` to plan and run checks after planning and running
the inside plan. Although we check for comm errors after the initial
call to `PlanAndRun` to see if we should exit early, we neglected to
also check the result writer for errors. Since not all result writer
errors may be copied into the comm errors, we fix that here.

Epic: None
Informs: #87289

Release note: None
  • Loading branch information
rharding6373 committed Aug 3, 2023
1 parent 54c3e26 commit 34eafdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sql/apply_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ func runPlanInsidePlan(
if recv.commErr != nil {
return recv.commErr
}
if resultWriter.Err() != nil {
return resultWriter.Err()
}

evalCtxFactory2 := func(usedConcurrently bool) *extendedEvalContext {
return evalCtxFactory()
Expand Down

0 comments on commit 34eafdf

Please sign in to comment.