Repository navigation
fix(grl-823): lane functions - #576
Open
ivanmiletic wants to merge 7 commits into
Open
ivanmiletic wants to merge 7 commits into
ivanmiletic wants to merge 7 commits into
Conversation
…ions stddev, variance, stddevPop, variancePop, skew, kurtosis, percentile, percentileApprox (t-digest, compression 100), countDistinct (count_distinct), countDistinctApprox (HLL p12 over xxh64 of the canonical value), distinct (unique), topK, first, last, argMax (maxBy) and argMin (minBy). Aggregates take a projection and an optional filter over the items, with # or a name given with 'as': sum(items as t, t.amount, t.ok). The parser rewrites them to map/filter closures and a null-skipping aggregate, so the stack VM, the lane VM, intellisense and dependency analysis share one form. Existing calls keep their behaviour: a callback form of sum, avg, min, max, median and mode needs # or a name.
join (separator ',' by default, nulls skipped), replace and replaceAll (regular expressions), squish, unaccent, tokenSort, nameKey, soundex, jaroWinkler and tokenSetSimilarity (a string or each string of a list), on the stack VM and the lane VM.
…nt from the end
take, takeLast, find, findLast, findIndex, findLastIndex (-1 when none),
sort and sortBy ('asc' or 'desc', stable, nulls last) and isEmpty. find,
findIndex and sortBy take a callback with # or a name given with 'as'.
items[-1] is the last item, as documented, on the stack VM and the lane
VM (a string counts from its end too); a negative index past the start is
null. The spec rows that recorded the bug, the policy spec case and its
golden now expect the value.
clamp, sqrt, ln, log (base 10 or a given base), exp, sign, padStart and padEnd (to a length in characters, spaces by default), splitPart (from 1, negative from the end, null when missing) and extractAll (every match, or the first group of every match), on the stack VM and the lane VM.
md5, sha256 and xxhash64 (lower-case hex), jsonParse and jsonString, entries, zip and groupBy (an object of arrays by a key given with # or a name; null keys skipped), on the stack VM and the lane VM.
…many inputs on the lane VM A thin wrapper over LaneProgram and LaneRunner: rows (specialized on a sample above 64), scopes or columns, with an evaluation context; plus evaluate_expression_batch. Results equal row-by-row evaluation.
register_host_function adds a named function (signature and implementation) that every thread parses, type-checks, completes and evaluates as FunctionKind::Host, on the stack VM and the lane VM; built-in names cannot be taken. The lane passes the name to one host builtin that drives the registered definition, so both engines give the same result.
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.
No description provided.