-
Notifications
You must be signed in to change notification settings - Fork 156
feat(stdlib): add experimental.preview function #4725
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
Conversation
| // preview limits the number of rows and tables in the stream. | ||
| // The group keys that are included are not deterministic and depends on the order | ||
| // that the engine sends them. |
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.
| // preview limits the number of rows and tables in the stream. | |
| // The group keys that are included are not deterministic and depends on the order | |
| // that the engine sends them. | |
| // preview limits the number of rows and tables in the stream. | |
| // | |
| // Included groups keys are not deterministic and depend on the order | |
| // that the engine sends them. |
| // that the engine sends them. | ||
| // | ||
| // ## Parameters | ||
| // - nrows: Maximum number of rows in each table. |
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.
| // - nrows: Maximum number of rows in each table. | |
| // - nrows: Maximum number of rows per table to return. |
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.
Does this parameter have a default value? The example below suggests that it does.
| // ## Parameters | ||
| // - nrows: Maximum number of rows in each table. | ||
| // | ||
| // - ntables: Maximum number of tables returned by the transformation. |
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.
| // - ntables: Maximum number of tables returned by the transformation. | |
| // - ntables: Maximum number of tables to return. |
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.
Does this parameter have a default value? The example below suggests that it does.
| // ``` | ||
| // import "experimental" | ||
| // import "sampledata" | ||
| // | ||
| // sampledata.init() | ||
| // |> experimental.preview() |
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.
| // ``` | |
| // import "experimental" | |
| // import "sampledata" | |
| // | |
| // sampledata.init() | |
| // |> experimental.preview() | |
| // ``` | |
| // import "experimental" | |
| // import "sampledata" | |
| // | |
| // sampledata.int() | |
| // |> experimental.preview() | |
| // ``` |
| // |> experimental.preview() | ||
| // | ||
| // ## Metadata | ||
| // introduced: next |
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.
@nathanielc Does case matter here? Does this need to be NEXT?
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.
It looks like it's supposed to be NEXT. Fixed.
d75e074 to
818f27a
Compare
wolffcm
left a comment
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.
Looks reasonable.
818f27a to
41449da
Compare
| // Included group keys are not deterministic and depends on the order | ||
| // that the engine sends them. |
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.
| // Included group keys are not deterministic and depends on the order | |
| // that the engine sends them. | |
| // The function is designed to quickly provide a data preview by not | |
| // returning the entire result set. | |
| // Included group keys are not deterministic and depend on the order | |
| // that the engine sends them. |
| // sampledata.init() | ||
| // |> experimental.preview() |
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.
- Change
sampledata.init()tosampledata.int() - Passing parameters in the example will show exactly how the input tables are modified.
- Add input (
<) and output (>) identifiers to generate the input and output examples.
| // sampledata.init() | |
| // |> experimental.preview() | |
| // < sampledata.int() | |
| // > |> experimental.preview(nrows: 3, ntables: 1) |
41449da to
334dbeb
Compare
The preview function will limit the number of rows and the number of tables that can be returned by a transformation. It will discard any remaining tables/rows.
334dbeb to
d5ea073
Compare
The preview function will limit the number of rows and the number of
tables that can be returned by a transformation. It will discard any
remaining tables/rows.
Fixes #4719.
Done checklist