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: fix checking for presence of window functions in some edge cases #37130

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

yuzefovich
Copy link
Member

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

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
@yuzefovich yuzefovich requested review from justinj and a team April 25, 2019 17:52
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@justinj justinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: thanks for fixing!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @justinj)

@yuzefovich
Copy link
Member Author

Thanks for spotting this bug and for the review!

bors r+

craig bot pushed a commit that referenced this pull request 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
Copy link
Contributor

craig bot commented Apr 25, 2019

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants