Here are the templates for new hyperfunction groups.
-
Copy and paste this directory into the
api/_hyperfunctions
directory. -
Rename the directory after the main aggregate function for this family. For example,
uddsketch
. -
Fill in the templates for:
-
Add a page-index entry under
api/page-index/page-index.js
.a. You need a page for the category if it doesn't already exist (for example, `percentile approximation`). The `href` for this page should match the YAML field `hyperfunction > family`. For example, if `hyperfunction > family` is `percentile approximation`, the `href` is `percentile-approximation`. The `type` for the page is `redirect-to-child-page` (see example below). b. Under the category, make a child page for each aggregate function in the category. The `href` for this page is the name of the aggregate function. The `type` for the page is `placeholder`.
Example:
{ title: "Approximate count distinct", href: "approximate-count-distinct", type: "redirect-to-child-page", children: [ { title: "hyperloglog", href: "hyperloglog", type: "placeholder", }, ], }
-
Delete this README.
This group of functions has multiple aggregate functions, or an alternate function that acts sort of like an aggregate, but isn't one:
-
If you have multiple aggregate functions:
-
Are your aggregate functions guaranteed to always work with exactly the same accessors? (For example, one is simply a convenience wrapper around the other, and they produce the same type of aggregate object.)
Choose one to be the main aggregate. For the other aggregates, use the
aggregate
template but sethyperfunction > type
toalternate aggregate
. -
Do the functions work with different accessors, or might they do so in the future?
Split them into different directories. You can put them into the same larger category, for example
uddsketch
andtdigest
are different directories but part of the samepercentile approximation
category because they both sethyperfunction > family
topercentile approximation
.
-
-
If you have an alternate function that acts sort of like an aggregate but isn't one, such as the
candlestick()
function that converts already-aggregated data into the right form:Use the
aggregate
template but sethyperfunction > type
topseudo-aggregate
.