-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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,sql: do not allow special functions in ON clause #28839
Conversation
Previously, both the heuristic planner and the optimizer were erroneously allowing ON clauses to have special functions such as generator functions or aggregates. This commit ensures that any queries containing special functions in the ON clause now throw an error. Fixes cockroachdb#28817 Release note (sql change): Previously, CockroachDB was erroneously allowing generator functions, aggregates, and window functions in the ON clause of joins. These functions are no longer allowed in join conditions, and will cause an error if used.
Nice find! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
28839: opt,sql: do not allow special functions in ON clause r=rytaft a=rytaft Previously, both the heuristic planner and the optimizer were erroneously allowing ON clauses to have special functions such as generator functions or aggregates. This commit ensures that any queries containing special functions in the ON clause now throw an error. Fixes #28817 Release note (sql change): Previously, CockroachDB was erroneously allowing generator functions, aggregates, and window functions in the ON clause of joins. These functions are no longer allowed in join conditions, and will cause an error if used. 28850: sql: improve memory accounting for replace builtin r=solongordon a=solongordon Previously the replace(...) builtin was only reserving memory after the replace operation was performed, so it was possible to outspend the memory budget. Now we do a worst case reservation beforehand and adjust it based on the actual result size. Fixes #28206 Release note: None Co-authored-by: Rebecca Taft <becca@cockroachlabs.com> Co-authored-by: Solon Gordon <solon@cockroachlabs.com>
Build succeeded |
Previously, both the heuristic planner and the optimizer were
erroneously allowing ON clauses to have special functions such
as generator functions or aggregates. This commit ensures that
any queries containing special functions in the ON clause now
throw an error.
Fixes #28817
Release note (sql change): Previously, CockroachDB was
erroneously allowing generator functions, aggregates, and window
functions in the ON clause of joins. These functions are no longer
allowed in join conditions, and will cause an error if used.