-
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
refactor(fuzzer): add supporting map functions #11536
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D65755011 |
d4d77e0
to
50d6c09
Compare
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
This pull request was exported from Phabricator. Differential Revision: D65755011 |
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
50d6c09
to
a331929
Compare
This pull request was exported from Phabricator. Differential Revision: D65755011 |
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
a331929
to
e42a835
Compare
This pull request was exported from Phabricator. Differential Revision: D65755011 |
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
e42a835
to
0015d7f
Compare
This pull request was exported from Phabricator. Differential Revision: D65755011 |
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
0015d7f
to
4cb733c
Compare
This pull request was exported from Phabricator. Differential Revision: D65755011 |
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.
Hi @wuray22, thank you for making the contribution! I think the type of this PR is more of a refactoring, so the title can be "refactor(fuzzer): ...". Also, could you add more explanation about why it's beneficial to make this change? E.g., it expose xxx API, makes xxx easier to use, etc.
velox/vector/fuzzer/VectorFuzzer.cpp
Outdated
RowTypePtr VectorFuzzer::randRowType(size_t numFields, int maxDepth) { | ||
return velox::randRowType(rng_, numFields, maxDepth); | ||
} |
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.
Is this method used?
@@ -912,6 +925,10 @@ TypePtr VectorFuzzer::randType( | |||
return velox::randType(rng_, scalarTypes, maxDepth); | |||
} | |||
|
|||
TypePtr VectorFuzzer::randMapType(int maxDepth) { |
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.
Is this method used?
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.
Yes. This function is used in my follow up diff D65926722 for controlling the number of maps in my row vector
4cb733c
to
1d8aafd
Compare
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
This pull request was exported from Phabricator. Differential Revision: D65755011 |
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
1d8aafd
to
5e20018
Compare
This pull request was exported from Phabricator. Differential Revision: D65755011 |
Summary: This diff adds some supporting functions for my diff for new benchmark tests for map_concat. Reviewed By: darrenfu Differential Revision: D65755011
5e20018
to
9350ee2
Compare
This pull request was exported from Phabricator. Differential Revision: D65755011 |
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 for the review @kagamiori . I addressed your comments and updated the description.
@@ -912,6 +925,10 @@ TypePtr VectorFuzzer::randType( | |||
return velox::randType(rng_, scalarTypes, maxDepth); | |||
} | |||
|
|||
TypePtr VectorFuzzer::randMapType(int maxDepth) { |
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.
Yes. This function is used in my follow up diff D65926722 for controlling the number of maps in my row vector
Summary: This diff adds some supporting functions for my diff D65926722 for new benchmark tests for metalake's map_concat. In my benchmark tests, I want to be able to control the density of map columns. And generate the number of columns given a range, using the same seed.
Differential Revision: D65755011