Repository navigation
Conversation
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.
Adds three built-in relational functions.
SAMPLE(DATA => table, N => n)
Table function that performs reservoir sampling over whole rows, with n rows
per partition. The first n rows fill the reservoir; each following row replaces
a uniformly chosen slot with probability n / (rows seen so far). All input
columns are kept, partition columns first, and the sampled rows are emitted in
input order.
DERIVATIVE(DATA => table PARTITION BY ... ORDER BY time, [unit => duration])
Table function that emits one output row per pair of adjacent points in ORDER
BY time within each partition. The output time is the time of the second point,
and each calculation column c outputs (c2 - c1) / (t2 - t1) * unit.
unitdefaults to 1s in the current timestamp precision; a null on either side only
makes that column null for the pair.
INTEGRAL(value [, time_unit [, time]])
Aggregate function that computes the trapezoidal integral of
valueovertime, divided bytime_unit.time_unitdefaults to 1s andtimedefaultsto the time column of the table. Ordered and naive accumulators are provided for
both grouped and ungrouped aggregation; the naive ones support intermediate
states so partial results can be merged in distributed aggregation.
Bug fixes
Fixes an existing planning bug for table functions that must run once per
partition (
mergeChildrenForSingleProcessorinTableDistributedPlanGenerator):common to all children, or by plain concatenation when there was none. The
merged stream was therefore not ordered by the GROUP clause (partition keys
followed by the in-partition ordering), and rows of one partition could arrive
non-consecutively when a partition spans several children, e.g. PARTITION BY
on non-device columns or a device spanning regions. Such a partition was then
treated as several partitions. The merged input now uses the ordering of the
GroupNode and inserts an explicit SortNode when the children do not already
provide it.
canSplitTableFunctionProcessoronly excluded FFT from per-child splitting.M4, FORECAST, PATTERN_MATCH, CLASSIFY, LOWPASS, HIGHPASS, XCORR, SESSION,
VARIATION and CAPACITY could be cloned for every child, so one logical
partition could be handled by several processors with separate state. They are
now listed in
NON_SPLITTABLE_TABLE_FUNCTIONS.