-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
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
opt: v20.1.0-alpha20191216: assertion failed: top-level relational expression cannot have outer columns #44724
Comments
cockroach-teamcity
added
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-sentry
Originated from an in-the-wild panic report.
labels
Feb 4, 2020
yuzefovich
changed the title
sentry: *errors.errorString
*safedetails.withSafeDetails: top-level relational expression cannot have outer columns: %s (1)
optimizer.go:218: *withstack.withStack (2)
*assert.withAssertionFailure
(check the extra data payloads)
sentry: opt: assertion failed: top-level relational expression cannot have outer columns
Mar 14, 2020
The anonymized query is |
yuzefovich
changed the title
sentry: opt: assertion failed: top-level relational expression cannot have outer columns
opt: v20.1.0-alpha20191216: assertion failed: top-level relational expression cannot have outer columns
Mar 14, 2020
I can reproduce this. With the Movr schema, the following query triggers this error:
|
craig bot
pushed a commit
that referenced
this issue
Mar 20, 2020
45668: ui: Redesign Events section on Metrics page r=dhartunian a=koorosh Resolves: #45402 Current change is required to fit date and event message after date format was changed. Before, Events section had two columns and it could not fit full date string in the second column without wrapping to several rows what made it not readable. Now, instead of showing two separate columns, date of event is displayed under event message and both event name and date can occupy entire width of events table. Number of events to show on Metrics page is decreased from 10 to 5. Release justification: bug fixes and low-risk updates to new functionality <img width="1437" alt="Screenshot 2020-03-19 at 15 13 59 1" src="https://user-images.githubusercontent.com/3106437/77073262-aab44180-69f7-11ea-866d-3a16b97d0349.png"> <img width="570" alt="Screenshot 2020-03-19 at 15 19 42" src="https://user-images.githubusercontent.com/3106437/77073234-a0924300-69f7-11ea-9ed6-d13d91cacea0.png"> 46227: opt: fix some aggregate scoping issues r=rytaft a=rytaft Prior to this commit, some aggregate functions were either incorrectly rejected or incorrectly accepted when they were scoped at a higher level than their position in the query. For example, aggregate functions are not normally allowed in `WHERE`, but if the aggregate is actually scoped at a higher level, then the aggregate should be allowed. Prior to this commit, these aggregate functions were rejected and caused an error. This commit fixes the issue by validating the context of the aggregate's scope rather than the aggregate's position in the query. In order to avoid adding another field to the scope struct, this commit re-uses the existing `context` field which was previously only used for error messages. To make comparisons more efficient, the field is now an enum rather than a string. Fixes #44724 Fixes #45838 Fixes #30652 Release justification: This bug fix is a low risk, high benefit change to existing functionality, since it fixes internal errors and increases compatibility with Postgres. Release note (bug fix): Fixed an internal error that could occur when an aggregate inside the right-hand side of a LATERAL join was scoped at the level of the left-hand side. Release note (bug fix): Fixed an error that incorrectly occurred when an aggregate was used inside the WHERE or ON clause of a subquery but was scoped at an outer level of the query. Co-authored-by: Andrii Vorobiov <[email protected]> Co-authored-by: Rebecca Taft <[email protected]>
rytaft
added a commit
to rytaft/cockroach
that referenced
this issue
Mar 25, 2020
Prior to this commit, some aggregate functions were either incorrectly rejected or incorrectly accepted when they were scoped at a higher level than their position in the query. For example, aggregate functions are not normally allowed in WHERE, but if the aggregate is actually scoped at a higher level, then the aggregate should be allowed. Prior to this commit, these aggregate functions were rejected and caused an error. This commit fixes the issue by validating the context of the aggregate's scope rather than the aggregate's position in the query. In order to avoid adding another field to the scope struct, this commit re-uses the existing `context` field which was previously only used for error messages. To make comparisons more efficient, the field is now an enum rather than a string. Fixes cockroachdb#44724 Fixes cockroachdb#45838 Fixes cockroachdb#30652 Release justification: This bug fix is a low risk, high benefit change to existing functionality, since it fixes internal errors and increases compatibility with Postgres. Release note (bug fix): Fixed an internal error that could occur when an aggregate inside the right-hand side of a LATERAL join was scoped at the level of the left-hand side. Release note (bug fix): Fixed an error that incorrectly occurred when an aggregate was used inside the WHERE or ON clause of a subquery but was scoped at an outer level of the query.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue was autofiled by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.
Sentry link: https://sentry.io/organizations/cockroach-labs/issues/1495879583/?referrer=webhooks_plugin
Panic message:
Stacktrace (expand for inline code snippets):
cockroach/pkg/sql/opt/xform/optimizer.go
Lines 217 to 219 in e9e2a80
cockroach/pkg/sql/plan_opt.go
Lines 423 to 425 in e9e2a80
cockroach/pkg/sql/plan_opt.go
Lines 161 to 163 in e9e2a80
cockroach/pkg/sql/conn_executor_exec.go
Lines 742 to 744 in e9e2a80
cockroach/pkg/sql/conn_executor_exec.go
Lines 625 to 627 in e9e2a80
cockroach/pkg/sql/conn_executor_exec.go
Lines 416 to 418 in e9e2a80
cockroach/pkg/sql/conn_executor_exec.go
Lines 97 to 99 in e9e2a80
cockroach/pkg/sql/conn_executor.go
Lines 1249 to 1251 in e9e2a80
cockroach/pkg/sql/conn_executor.go
Lines 1178 to 1180 in e9e2a80
cockroach/pkg/sql/conn_executor.go
Lines 449 to 451 in e9e2a80
cockroach/pkg/sql/pgwire/conn.go
Lines 583 to 585 in e9e2a80
/usr/local/go/src/runtime/asm_amd64.s#L1336-L1338 in runtime.goexit
v20.1.0-alpha20191216
go1.12.12
The text was updated successfully, but these errors were encountered: