diff --git a/compiler/semantic/op.go b/compiler/semantic/op.go index 01d31a40a2..5ca08d1c40 100644 --- a/compiler/semantic/op.go +++ b/compiler/semantic/op.go @@ -771,6 +771,10 @@ func (a *analyzer) semOp(o ast.Op, seq dag.Seq) dag.Seq { Exprs: exprs, }) case *ast.Load: + if !a.source.IsLake() { + a.error(o, errors.New("load operator cannot be used without a lake")) + return []dag.Op{badOp()} + } poolID, err := lakeparse.ParseID(o.Pool) if err != nil { poolID, err = a.source.PoolID(a.ctx, o.Pool) diff --git a/compiler/ztests/load-no-lake.yaml b/compiler/ztests/load-no-lake.yaml new file mode 100644 index 0000000000..4d169e19e0 --- /dev/null +++ b/compiler/ztests/load-no-lake.yaml @@ -0,0 +1,3 @@ +zed: "load test" + +errorRE: "load operator cannot be used without a lake"