Skip to content
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

sql: implement errorIfRows planNode #37053

Closed
jordanlewis opened this issue Apr 23, 2019 · 0 comments · Fixed by #37101
Closed

sql: implement errorIfRows planNode #37053

jordanlewis opened this issue Apr 23, 2019 · 0 comments · Fixed by #37101
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@jordanlewis
Copy link
Member

The errorIfRows planNode should return an error if it sees any input rows at all. This helps enable optimizer-driven foreign key checks.

@jordanlewis jordanlewis added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Apr 23, 2019
craig bot pushed a commit that referenced this issue Apr 25, 2019
37101: sql: add errorIfRows node r=yuzefovich a=yuzefovich

Add errorIfRows node that returns an error if it receives a row
from its input. It is needed for foreign keys checks implementation
with joins.

Fixes: #37053.

I'm not sure whether some of these additions are necessary or if something is missing. Also, I'm not sure whether it deserves a unit test.

Release note: None

37130: sql: fix checking for presence of window functions in some edge cases r=yuzefovich a=yuzefovich

Previously, when a window function was a part of another expression
(say BinaryExpr) instead of being used directly within PARTITION BY
and ORDER BY clauses of another window function, we would incorrectly
not reject such a query and would actually crash while trying to
execute it.

Release note: None

Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
@craig craig bot closed this as completed in #37101 Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants