From b402680fb63ca4df1b03d682ecf5e580ddb7ee5a Mon Sep 17 00:00:00 2001 From: Noah Treuhaft Date: Thu, 26 Oct 2023 14:21:25 -0400 Subject: [PATCH] Handle Job.Parallelize error in lakeCompiler.NewLakeQuery --- compiler/lake.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/lake.go b/compiler/lake.go index 0a16100922..dc91ffa942 100644 --- a/compiler/lake.go +++ b/compiler/lake.go @@ -46,7 +46,9 @@ func (l *lakeCompiler) NewLakeQuery(octx *op.Context, program ast.Seq, paralleli parallelism = Parallelism } if parallelism > 1 { - job.Parallelize(parallelism) + if err := job.Parallelize(parallelism); err != nil { + return nil, err + } } if err := job.Build(); err != nil { return nil, err