-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add from_ieee754_32 Presto function #7903
Conversation
✅ Deploy Preview for meta-velox canceled.
|
b063468
to
82678ad
Compare
82678ad
to
b8a6db1
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.
Thanks @pdabre12.
Code looks good. Small comment in the tests.
@pdabre12 : Please can you add results of ExpressionFuzzer with this function https://facebookincubator.github.io/velox/develop/testing/fuzzer.html#how-to-run |
43a3ce1
to
e2093e2
Compare
This test fails because Expected equality of these values:
Any suggestions of what I can do about the parenthesis () surrounding nan? |
As discussed. You can't compare using |
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.
Thanks @pdabre12 . Code is 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.
@pdabre12 : The linux-build has test failures. Please fix the tests as per Christian's comments.
8ff4883
to
4df9d68
Compare
@aditi-pandit Please review. The pipeline is clean now. |
Fuzzer output:
|
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.
Thanks
@Yuhta , @kagamiori : Please can you help with the review and merge. |
@Yuhta @kagamiori I know you are busy with other high-priority issues, however, I was wondering if you could look into this one whenever you get time so that we can close it. Thanks! |
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.
@pdabre12 : Had a quick review comment.
@@ -94,6 +94,10 @@ Binary Functions | |||
|
|||
Encodes ``real`` in a 32-bit big-endian binary according to IEEE 754 single-precision floating-point format. | |||
|
|||
.. function:: from_ieee754_32(binary) -> real |
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.
Please move this to the right alphabetical order in the list.
out_type<float>& result, | ||
const arg_type<Varbinary>& input) { | ||
static constexpr auto kTypeLength = sizeof(int32_t); | ||
VELOX_USER_CHECK_EQ(input.size(), kTypeLength, "Expected 4-byte input"); |
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.
The java error is "Input floating-point value must be exactly 4 bytes long"
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.
Please see comments above.
4df9d68
to
7f6724e
Compare
@aditi-pandit Addressed the comments, please review again. |
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.
Thanks @pdabre12
@Yuhta @kagamiori : Please can you help with review and merge. |
@Yuhta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
0d9494e
to
7a6ec4c
Compare
7a6ec4c
to
0d8a91a
Compare
@Yuhta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Summary: Add from_ieee754_32() scalar function Resolves : facebookincubator#4427 Reference: https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/operator/scalar/VarbinaryFunctions.java#L267 Pull Request resolved: facebookincubator#7903 Reviewed By: mbasmanova Differential Revision: D55440664 Pulled By: Yuhta fbshipit-source-id: 691532afbdc053c357d9a9d6241701df69dde682
Fixes #4427
Reference: https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/operator/scalar/VarbinaryFunctions.java#L267