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: mark age() as impure #37609

Merged
merged 1 commit into from May 21, 2019

Conversation

Projects
None yet
3 participants
@mjibson
Copy link
Member

commented May 20, 2019

Release note (bug fix): The age() function is now correctly marked as
impure, causing it to be unavailable in certain contexts.

@mjibson mjibson requested review from jordanlewis and knz May 20, 2019

@mjibson mjibson requested a review from cockroachdb/sql-rest-prs as a code owner May 20, 2019

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

commented May 20, 2019

This change is Reviewable

@mjibson

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

I'm not sure if or how this should even be tested (we don't have exhaustive pure vs impure tests).

Also I think this needs to be backported because the various places that care about purity can assume wrong things if the function is actually impure, for example the optimizer sets the CanHaveSideEffects flag.

sql: mark age() as impure
Release note (bug fix): The age() function is now correctly marked as
impure, causing it to be unavailable in certain contexts.

@mjibson mjibson force-pushed the mjibson:age-pure branch from 8d2f779 to 71a6611 May 20, 2019

@mjibson mjibson requested a review from cockroachdb/sql-opt-prs as a code owner May 20, 2019

@jordanlewis
Copy link
Member

left a comment

LGTM

@mjibson

This comment has been minimized.

Copy link
Member Author

commented May 21, 2019

bors r+

craig bot pushed a commit that referenced this pull request May 21, 2019

Merge #37609
37609: sql: mark age() as impure r=mjibson a=mjibson

Release note (bug fix): The age() function is now correctly marked as
impure, causing it to be unavailable in certain contexts.

Co-authored-by: Matt Jibson <matt.jibson@gmail.com>
@craig

This comment has been minimized.

Copy link

commented May 21, 2019

Build succeeded

@craig craig bot merged commit 71a6611 into cockroachdb:master May 21, 2019

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@mjibson mjibson deleted the mjibson:age-pure branch May 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.