Skip to content
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

More cleanup of array functions #2058

Merged
merged 26 commits into from
Dec 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7fd118d
make wrapDef a util
mtoy-googly-moogly Dec 17, 2024
1d58a8f
move repeat out of standard library
mtoy-googly-moogly Dec 17, 2024
e91435c
cleanup wrapDef a little more
mtoy-googly-moogly Dec 17, 2024
727fd86
even more wrapDef cleanup
mtoy-googly-moogly Dec 17, 2024
da50ddf
fix oopsie
mtoy-googly-moogly Dec 17, 2024
3e8286c
maybe cleaner still?
mtoy-googly-moogly Dec 17, 2024
d1e9479
fix find/replace mistake
mtoy-googly-moogly Dec 17, 2024
ab5a09a
rename arg
mtoy-googly-moogly Dec 17, 2024
8fbb030
make all param names into strings
mtoy-googly-moogly Dec 17, 2024
851c63a
fix trino reverse
mtoy-googly-moogly Dec 17, 2024
692396d
moved todos to docs issue
mtoy-googly-moogly Dec 17, 2024
1688802
Merge branch 'main' into array-func-cleanup
mtoy-googly-moogly Dec 17, 2024
e7bc100
remove extra test for % operator
mtoy-googly-moogly Dec 17, 2024
14103b4
put the cast back into trino reverse
mtoy-googly-moogly Dec 17, 2024
07119c6
go ahead and test reverse for arrays on presto
mtoy-googly-moogly Dec 17, 2024
83a3822
try again to get reverse with generic correct
mtoy-googly-moogly Dec 18, 2024
750b1ac
shared string_reverse
mtoy-googly-moogly Dec 18, 2024
0a23532
maybe finally fix reverse?
mtoy-googly-moogly Dec 18, 2024
a11e45b
use defwrap to cleanup some errors
mtoy-googly-moogly Dec 18, 2024
1621aaf
another minor code tweak to wrapDef
mtoy-googly-moogly Dec 18, 2024
7514bb6
-cleverness, +readability
mtoy-googly-moogly Dec 18, 2024
a76e4aa
add comment
mtoy-googly-moogly Dec 18, 2024
001f24f
comment edit
mtoy-googly-moogly Dec 18, 2024
5f23388
comment explaining dialect split
mtoy-googly-moogly Dec 18, 2024
26a921d
fix T comment
mtoy-googly-moogly Dec 18, 2024
01b7333
Extend wrapDef to def and overdef (#2060)
mtoy-googly-moogly Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
comment explaining dialect split
mtoy-googly-moogly committed Dec 18, 2024
commit 5f23388925fed226b5e2038533315a18f3511259
8 changes: 8 additions & 0 deletions packages/malloy/src/dialect/trino/dialect_functions.ts
Original file line number Diff line number Diff line change
@@ -278,6 +278,14 @@ const string_reverse: DefinitionBlueprint = {
impl: {sql: 'REVERSE(CAST(${str} AS VARCHAR))'},
};

/**
* This map is for functions which exist in both Presto and Trino.
* If you are adding functions which only exist in Presto, put them in
* to PRESTO_DIALECT_FUNCTIONS.
*
* If you have a function which works differently in each, add them to
* both.
*/
export const TRINO_DIALECT_FUNCTIONS: DefinitionBlueprintMap = {
// string functions
reverse: string_reverse,