-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more String functions incl. Lambda based transpilation
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
- Loading branch information
1 parent
12aed9a
commit 38f30a0
Showing
6 changed files
with
328 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
-- provided | ||
SELECT | ||
DATE_DIFF('2017-12-30', '2014-12-30', YEAR) AS year_diff, | ||
DATE_DIFF('2017-12-30', '2014-12-30', ISOYEAR) AS isoyear_diff; | ||
SELECT SAFE_CONVERT_BYTES_TO_STRING(b'\x61') as safe_convert | ||
; | ||
|
||
-- expected | ||
SELECT | ||
DATE_DIFF('YEAR', DATE '2014-12-30', DATE '2017-12-30' ) AS year_diff, | ||
DATE_DIFF('ISOYEAR', DATE '2014-12-30', DATE '2017-12-30') AS isoyear_diff; | ||
SELECT DECODE(COALESCE(TRY_CAST('\x61' AS BLOB),ENCODE('\x61')))AS SAFE_CONVERT; | ||
|
||
-- result | ||
"year_diff","isoyear_diff" | ||
"3","2" | ||
"safe_convert" | ||
"a" | ||
|
This file contains 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
Oops, something went wrong.