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.
This branch adds a new
Operator
calledDrawSample
, which makes sampling a first-class primitive (as a step towards addressing #362). Currently support exists for two forms of sampling:Both of these sampling are probabilistic (you get approximately the specified %, rather than exactly that amount).
The choice to make DrawSample a distinct operator (rather than folding it into, say Select) was motivated by the following:
udf
method. It would be possible in Mimir if we had support for dictionary types... but we don't. Thus, the only way to implement this (without resorting to repeated string parsing in a tight loop) is directly in RAToSpark... which means we need something on the order of an Operator to pull it off.I would like to revisit this decision, ideally once we add a more robust typesystem into Mimir (e.g., #367).
A few more notes: