Repository navigation
Conversation
Contributor
|
@jay23606: Thanks for the PR. We're going to close it, since we plan to fix #7396 ourselves. For future contributions, please see the Pull requests section of our contributing guide. We ask that a maintainer agree to a change and its approach, on Slack or in an issue, before a PR is opened. If you use an AI agent, it should follow our AGENTS.md. And if this bug is getting in the way of something you're doing with SuperDB, we'd like to hear about your use case in #7396 or on Slack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
unnest [1] into (from "http://127.0.0.1:1/x" (format json))panicked when the source could not be reached (#7396). The compile-time path incompileVamSubqueryalready returned errors, but the callback that re-creates a subquery instance for re-entrant evaluation still calledpanic(err), and the first compile also panicked on the same error class.Change
runtime/op/subquery.go:NewSubquerynow takes acreatecallback that returns(*Subquery, error).Subquery.Evalreturns the error as an error value when it cannot create a duplicate instance, instead of panicking.compiler/rungen/vexpr.go: the re-creation callback passes the error through; the panic is removed.runtime/ztests/expr/subquery-into-connect-error.yaml: regression test. It checks thatsuperfails with the error text and does not panic. It matches the stable prefixhttp://127.0.0.1:1/x: Get "...": dial tcp 127.0.0.1:1:so it does not depend on the OS-specific connect message (Windows reports a different string).Testing
go build ./runtime/op/ ./compiler/... && go vet ./runtime/op/ ./compiler/rungen/passes.panic: http://127.0.0.1:1/x: Get ..., as the issue describes.Regression test: fails on base twice (/panic: http://127\.0\.0\.1:1/x/), passes on fix twice (
mkdir -p .pr-go/bin && go build -o .pr-go/bin/super ./cmd/super && ZTEST_PATH="$PWD/.pr-go/bin" go test . -short -run 'TestSPQ/runtime/ztests/expr/subquery-into-connect-error')Fixes #7396