-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(noisy_sum): Add support for all numeric types in noisy_sum_gaussian(col, noise_scale) #13702
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
Open
oliver6782
wants to merge
6
commits into
facebookincubator:main
Choose a base branch
from
oliver6782:export-D75964171
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D75964171 |
766025a
to
d04cd03
Compare
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 10, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 10, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 10, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 10, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
This pull request was exported from Phabricator. Differential Revision: D75964171 |
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 10, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: Pull Request resolved: facebookincubator#13702 ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
d04cd03
to
066b5c2
Compare
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 11, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 11, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
066b5c2
to
ccfb973
Compare
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 11, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 11, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
This pull request was exported from Phabricator. Differential Revision: D75964171 |
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 11, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: Pull Request resolved: facebookincubator#13702 ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
ccfb973
to
8b467de
Compare
…se_scale) (facebookincubator#13651) Summary: Pull Request resolved: facebookincubator#13651 **Summary** This diff adds more unit tests so that the noisy function is more robust. **Changes** * Added tests that aggregate on non-scalar inputs such as array and map. * Added edge case where the input is empty. Differential Revision: D75916564
…gaussian(col, noise_scale) (facebookincubator#13652) Summary: Pull Request resolved: facebookincubator#13652 Add support for noise_scale of BIGINT type. Differential Revision: D75925753
…andom_seed) (facebookincubator#13653) Summary: Pull Request resolved: facebookincubator#13653 ### Summary This diff introduces random seed to the `noisy_count_gaussian` function to seed the random number generator. ### Changes * Added a new test cases to `NoisyCountGaussianAggregationTest.cpp`. * Updated the `noisy_count_gaussian` function documentation to include the `random_seed` parameter. * Modified the `NoisyCountGaussianAggregate.cpp` file to decode the `random_seed` argument and use it to seed the random number generator. ### Impact This diff enhances the `noisy_count_gaussian` function by providing an optional `random_seed` parameter, allowing users to reproduce the same noisy count results. The new test case ensures that the function works correctly with multiple aggregates and groups. Differential Revision: D75926651
…e functions. (facebookincubator#13661) Summary: Pull Request resolved: facebookincubator#13661 ### Summary This diff refactors duplicate blocks of code to composable functions in the `NoisyCountGaussianAggregate` class. ### Key Changes * Removed duplicate code blocks and replaced them with calls to new composable functions ### Files Changed * `fbcode/velox/functions/prestosql/aggregates/NoisyCountGaussianAggregate.cpp` ### Overall Impact This refactoring improves the maintainability and readability of the code by eliminating duplicates and simplifying the logic. Differential Revision: D76084043
…bookincubator#13701) Summary: Pull Request resolved: facebookincubator#13701 ### This Diff This diff implements a new aggregate function `noisy_sum_gaussian` which calculates the sum over the input values and adds a normally distributed random double value with 0 mean and standard deviation of `noise_scale`. ### File Changes The following files were changed: * `RegisterAggregateFunctions.cpp` - registered the new aggregate function * `NoisySumAccumulator` - new file to support aggregation. * `NoisySumGaussianAggregate` - new file for the aggregate function implementation. * `NoisySumGaussianAggregationTest` - new file to carry out simple unit test. * `FacebookPrestoExpressionFuzzerTest.cpp` - added the new function to the list of non-deterministic functions to skip * `aggregate.rst` - added documentation for the new function * `FacebookAggregationFuzzerTest.cpp` - added the new function to the list of non-deterministic functions to skip ### Impact This new function adds a way to calculate a noisy sum of values, which can be useful in statistical analysis. Differential Revision: D75928375
oliver6782
pushed a commit
to oliver6782/velox
that referenced
this pull request
Jun 11, 2025
…ian(col, noise_scale) (facebookincubator#13702) Summary: ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
…ian(col, noise_scale) (facebookincubator#13702) Summary: Pull Request resolved: facebookincubator#13702 ## This Diff This diff adds support for all numeric types in the `noisy_sum_gaussian` function. ### Key changes **Testing** New test cases have been added to cover the additional numeric types. **Implementation** The implementation of the `noisy_sum_gaussian` function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation. **Impact** This diff extends the functionality of the `noisy_sum_gaussian` function to support more numeric types, making it more versatile and useful in a wider range of applications. Differential Revision: D75964171
This pull request was exported from Phabricator. Differential Revision: D75964171 |
8b467de
to
2c9c973
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This Diff
This diff adds support for all numeric types in the
noisy_sum_gaussian
function.Key changes
Testing
New test cases have been added to cover the additional numeric types.
Implementation
The implementation of the
noisy_sum_gaussian
function has been updated to handle the new numeric types. This includes dispatching to the corresponding type for the update sum operation.Impact
This diff extends the functionality of the
noisy_sum_gaussian
function to support more numeric types, making it more versatile and useful in a wider range of applications.Differential Revision: D75964171