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 window functions with GROUPS offset FOLLOWING #37222

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

yuzefovich
Copy link
Member

Previously, boundaries of peer groups were incorrectly determined
with GROUPS BETWEEN offset FOLLOWING AND UNBOUNDED FOLLOWING mode
of framing due to an incorrect special case (I don't know what I
was thinking when I wrote that) that didn't confirm to the contract
of the methods.

Fixes: #37201.

Release note: None

Previously, boundaries of peer groups were incorrectly determined
with GROUPS BETWEEN offset FOLLOWING AND UNBOUNDED FOLLOWING mode
of framing due to an incorrect special case (I don't know what I
was thinking when I wrote that) that didn't confirm to the contract
of the methods.

Release note: None
@yuzefovich yuzefovich requested review from jordanlewis and a team April 30, 2019 20:37
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

:lgtm: - is there another test that goes with this one to verify the previous case with PRECEDING?

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

Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

No, that was a special case only for GROUPS BETWEEN offset FOLLOWING AND UNBOUNDED FOLLOWING, the PRECEDING case doesn't have special handling (since the general logic handles it), so it should behave correctly (I've just confirmed it locally with a few cases, and it returned nulls as expected for empty frames).

TFTR!

bors r+

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

craig bot pushed a commit that referenced this pull request Apr 30, 2019
37222: sql: fix window functions with GROUPS offset FOLLOWING r=yuzefovich a=yuzefovich

Previously, boundaries of peer groups were incorrectly determined
with GROUPS BETWEEN offset FOLLOWING AND UNBOUNDED FOLLOWING mode
of framing due to an incorrect special case (I don't know what I
was thinking when I wrote that) that didn't confirm to the contract
of the methods.

Fixes: #37201.

Release note: None

Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig
Copy link
Contributor

craig bot commented Apr 30, 2019

Build succeeded

@craig craig bot merged commit 2539df5 into cockroachdb:master Apr 30, 2019
@yuzefovich yuzefovich deleted the nil-datum branch May 16, 2019 00:44
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.

sql: panic: Cannot convert nil datum to EncDatum
3 participants