-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Tighten checks for "bins" elements in width_bucket(x, bins) #24103
Tighten checks for "bins" elements in width_bucket(x, bins) #24103
Conversation
presto-main/src/test/java/com/facebook/presto/operator/scalar/TestMathFunctions.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MathFunctions.java
Outdated
Show resolved
Hide resolved
db34c17
to
e27c342
Compare
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.
I'd undo the * 1 change for clarity, but everything else looks good
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.
Because this PR changes user-facing behavior, I think we should consider a release note entry for this PR. Perhaps something like:
(I did a local doc build to verify that :func: |
e27c342
to
4c77c0c
Compare
Saved that user @spershin is from Meta |
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.
LGTM! (docs)
Pull updated branch, new local docs build, looks good. Thank you for the quick revision!
Nit on the formatting of the release note entry - please add a row of three ` above and below the release note block. Like this:
|
Summary: Make width_bucket(x, bins) throw error if it finds a null or non-finite element in bins. As per new Presto Java behavior: prestodb/presto#24103 Differential Revision: D66382264
…incubator#11629) Summary: Make width_bucket(x, bins) throw error if it finds a null or non-finite element in bins. As per new Presto Java behavior: prestodb/presto#24103 Reviewed By: Yuhta Differential Revision: D66382264
…incubator#11629) Summary: Make width_bucket(x, bins) throw error if it finds a null or non-finite element in bins. As per new Presto Java behavior: prestodb/presto#24103 Reviewed By: Yuhta Differential Revision: D66382264
Summary: Pull Request resolved: #11629 Make width_bucket(x, bins) throw error if it finds a null or non-finite element in bins. As per new Presto Java behavior: prestodb/presto#24103 Reviewed By: Yuhta Differential Revision: D66382264 fbshipit-source-id: 84f549dfa313e1794551fba9d71f8b87eb3b713e
…incubator#11629) Summary: Pull Request resolved: facebookincubator#11629 Make width_bucket(x, bins) throw error if it finds a null or non-finite element in bins. As per new Presto Java behavior: prestodb/presto#24103 Reviewed By: Yuhta Differential Revision: D66382264 fbshipit-source-id: 84f549dfa313e1794551fba9d71f8b87eb3b713e
Description
Make width_bucket(x, bins) throw error if it finds a
null
or non-finite element inbins
.Motivation and Context
Solves #24055
Impact
Changes behavior of width_bucket(x, bins) which previously was treating all
null
elements inbins
as zero. Now the function will throw an error.Test Plan
Updated unit test to handle few cases with nulls.
Contributor checklist
Release Notes