Repository navigation
docs: correct core transformation and aggregation examples - #187
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Correct executable examples and their stated results in the guide and key concepts:
withSeriesin the generated-column example and theselectcall in the transformed-column example. Both snippets currently fail to parse.aggregateto sum a non-empty series before dividing by its count.averagetakes no seed/reducer: the existing[1, 2, 3, 4]example pattern averages the skipped series and returns3instead of2.5.Price, and weight the running mean by the accumulated row count. With three small authored rows having prices10, 20, 60, the corrected example reports three rows and average price30.between(10, 20).row1withrow2in the comparer example rather than an undeclaredrow.No runtime API or generated artifacts change.
Validation
On Node.js 24.14.1 / npm 11.11.0:
npm run buildpasses.--no-experimental-strip-typeswith the existing Mocha/ts-node runner. Plainnpm teston this Node version encounters Node's native type-stripping syntax restriction.npm run pack:rolluppasses; its ESM output passes a Webpack Node-target consumer smoke check (Webpack 4 requires--openssl-legacy-providerhere). Native ESM consumption of the CJS exports also passes.git diff --checkpasses.Browser execution, filesystem extensions, external services, statistics beyond these examples, and performance were not tested.