-
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 array_frequency Presto function #3807
Add array_frequency Presto function #3807
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D42712223 |
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Differential Revision: D42712223 fbshipit-source-id: 6de391726abe4ad7731762874586c2037e94fef1
d90ac0f
to
943ae9c
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
Failures unrelated to the diff. |
943ae9c
to
c8fd497
Compare
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: 0a56eb6a0d9ad2fd8cbbac1bdb4aee4d113aba84
This pull request was exported from Phabricator. Differential Revision: D42712223 |
c8fd497
to
76eb3a0
Compare
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: 4df80d6e6da84de5fdde99450b2110dda74e8f17
This pull request was exported from Phabricator. Differential Revision: D42712223 |
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: 2ee3ec58ba717120a83c9d88dbd90eb9e902cc71
76eb3a0
to
81fa76a
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: cf29ac047b6988b5fd72d320887359064ab7573a
This pull request was exported from Phabricator. Differential Revision: D42712223 |
81fa76a
to
cf55fb5
Compare
❌ Deploy Preview for bright-melba-465c6a failed.
|
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.
@vermapratyush Thank you for adding one more Presto function. Would you update PR description with results of Fuzzer testing?
Implement array_frequency in velox with same signature as presto.
This statement is redundant. Consider removing.
|
||
// optimization to skip counting frequency of null values | ||
if (inputArray.mayHaveNulls()) { | ||
for (const auto& item : inputArray.skipNulls()) { |
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.
Any particular reason we can't use this loop in all cases? CC: @laithsakka
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.
@mbasmanova the API is different as .skipNulls
also unrolls the value. Hence in the subsequent branch is
frequencyCount[item.value()]++;
vs
frequencyCount[item]++;
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: aa824bbe6ee32f59344b1c8c08a0c8fdd28e9c6a
cf55fb5
to
6e4e024
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
@mbasmanova Running fuzzer without
|
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: b1a37ebe291dc4b6dd9f951705fc00016a02d3c5
6e4e024
to
2ee28cc
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
@vermapratyush This is a known issue that was fixed in #3801 Would you rebase and retry? |
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: 36ffcf7c9a337a477ccc21421c8047b49afc9cd8
2ee28cc
to
bb0d6a2
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta Differential Revision: D42712223 fbshipit-source-id: 48fc72c9e09c83c0a246716a9fff56fbf4a990ac
bb0d6a2
to
02e4a9e
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
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.
@vermapratyush Thanks.
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta, mbasmanova Differential Revision: D42712223 fbshipit-source-id: 48c73e9ab0574c01945af91f85913628bd5e01ad
02e4a9e
to
14e9932
Compare
This pull request was exported from Phabricator. Differential Revision: D42712223 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D42712223 |
14e9932
to
d800e2f
Compare
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta, mbasmanova Differential Revision: D42712223 fbshipit-source-id: 18e54975761581c50b798fef307c50556cdfdfaa
Summary: Pull Request resolved: facebookincubator#3807 Implement `array_frequency` in velox with same signature [as presto](https://prestodb.io/docs/current/functions/array.html#array_frequency). Fixes facebookincubator#3752 Reviewed By: Yuhta, mbasmanova Differential Revision: D42712223 fbshipit-source-id: 8e4f37a040c5c3fff636dbdf473b9d3d38f5e24c
This pull request was exported from Phabricator. Differential Revision: D42712223 |
d800e2f
to
a38b61f
Compare
This pull request has been merged in 9971e7f. |
Summary:
Test Plan
Fuzzer on all functions
Fixes #3752
Differential Revision: D42712223