We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repro is with Zed commit f1be6a4.
This is a simplified [ 🤪 ] example of a panic I bumped into while trying to come up with a response to a community user's inquiry in a Slack thread.
$ zq -version Version: v1.14.0-17-gf1be6a4a $ cat repro.zed const a = 1 const b = 2 switch a ( case 1 => over this with val=this => ( switch b ( case 2 => yield val ) ) ) $ echo '[1,2]' | zq -I repro.zed - panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: runtime/debug.Stack() /usr/local/opt/go@1.21/libexec/src/runtime/debug/stack.go:24 +0x5e github.com/brimdata/zed/runtime/sam/op.(*Catcher).Pull.func1() /Users/phil/work/zed/runtime/sam/op/catcher.go:25 +0x3d panic({0x2550000?, 0xc000916000?}) /usr/local/opt/go@1.21/libexec/src/runtime/panic.go:914 +0x21f github.com/brimdata/zed/runtime/sam/expr.Var.Eval(...) /Users/phil/work/zed/runtime/sam/expr/var.go:14 github.com/brimdata/zed/runtime/sam/op/yield.(*Op).Pull(0xc0006e0a20, 0x10?) /Users/phil/work/zed/runtime/sam/op/yield/yield.go:31 +0x432 github.com/brimdata/zed/runtime/sam/op/traverse.(*Exit).pullPlatoon(0xc0006e0a50) /Users/phil/work/zed/runtime/sam/op/traverse/scope.go:222 +0x32 github.com/brimdata/zed/runtime/sam/op/traverse.(*Exit).Pull(0xc0006e0a50, 0x5?) /Users/phil/work/zed/runtime/sam/op/traverse/scope.go:208 +0x2b github.com/brimdata/zed/runtime/sam/op.(*Single).Pull(0xc000407398, 0x60) /Users/phil/work/zed/runtime/sam/op/mux.go:134 +0x2b github.com/brimdata/zed/runtime/sam/op.(*Catcher).Pull(0x3cc1108?, 0xc0?) /Users/phil/work/zed/runtime/sam/op/catcher.go:28 +0x62 github.com/brimdata/zed/runtime/exec.(*Query).Pull(0x4abf4498?, 0xd8?) /Users/phil/work/zed/runtime/exec/query.go:59 +0x3e github.com/brimdata/zed/zbuf.CopyPuller({0x4abf4498, 0xc000406ee8}, {0x28c1520, 0xc0006e0a80}) /Users/phil/work/zed/zbuf/batch.go:162 +0x4d github.com/brimdata/zed/cli/zq.(*Command).Run(0xc000124a80, {0xc0000400b0, 0x1, 0x1}) /Users/phil/work/zed/cli/zq/command.go:162 +0x79e github.com/brimdata/zed/pkg/charm.path.run({0xc00007a2d0?, 0x1, 0x1}, {0xc0000400b0?, 0x1, 0x0?}) /Users/phil/work/zed/pkg/charm/path.go:11 +0x79 github.com/brimdata/zed/pkg/charm.(*Spec).ExecRoot(0x100874b?, {0xc000040090, 0x3, 0x3}) /Users/phil/work/zed/pkg/charm/charm.go:63 +0x3f main.main() /Users/phil/work/zed/cmd/zq/main.go:11 +0x5b
The text was updated successfully, but these errors were encountered:
exprswitch: Propagate batch variables
66fe999
Fix issue with exprswitch op where batch variables where not getting propagated to inner batches. Closes #5076
exprswitch: Propagate batch variables (#5080)
ec56834
Verified in Zed commit 3e5febe.
The program shown in the repro above no longer generates a panic.
$ zq -version Version: v1.14.0-21-g3e5febe7 $ echo '[1,2]' | zq -I repro.zed - [1,2] [1,2]
Thanks @mattnibs!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Repro is with Zed commit f1be6a4.
This is a simplified [ 🤪 ] example of a panic I bumped into while trying to come up with a response to a community user's inquiry in a Slack thread.
The text was updated successfully, but these errors were encountered: