Adding upstream version 26.1.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
09521056ff
commit
d908bee480
119 changed files with 71635 additions and 68059 deletions
|
@ -520,6 +520,19 @@ class TestDialect(Validator):
|
|||
},
|
||||
)
|
||||
|
||||
def test_is_ascii(self):
|
||||
self.validate_all(
|
||||
"SELECT IS_ASCII(x)",
|
||||
write={
|
||||
"": "SELECT IS_ASCII(x)",
|
||||
"sqlite": "SELECT (NOT x GLOB CAST(x'2a5b5e012d7f5d2a' AS TEXT))",
|
||||
"mysql": "SELECT REGEXP_LIKE(x, '^[[:ascii:]]*$')",
|
||||
"postgres": "SELECT (x ~ '^[[:ascii:]]*$')",
|
||||
"tsql": "SELECT (PATINDEX('%[^' + CHAR(0x00) + '-' + CHAR(0x7f) + ']%' COLLATE Latin1_General_BIN, x) = 0)",
|
||||
"oracle": "SELECT NVL(REGEXP_LIKE(x, '^[' || CHR(1) || '-' || CHR(127) || ']*$'), TRUE)",
|
||||
},
|
||||
)
|
||||
|
||||
def test_nvl2(self):
|
||||
self.validate_all(
|
||||
"SELECT NVL2(a, b, c)",
|
||||
|
@ -1669,11 +1682,11 @@ class TestDialect(Validator):
|
|||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"POSITION(needle in haystack)",
|
||||
"POSITION(needle IN haystack)",
|
||||
write={
|
||||
"drill": "STRPOS(haystack, needle)",
|
||||
"duckdb": "STRPOS(haystack, needle)",
|
||||
"postgres": "STRPOS(haystack, needle)",
|
||||
"postgres": "POSITION(needle IN haystack)",
|
||||
"presto": "STRPOS(haystack, needle)",
|
||||
"spark": "LOCATE(needle, haystack)",
|
||||
"clickhouse": "position(haystack, needle)",
|
||||
|
@ -1686,7 +1699,7 @@ class TestDialect(Validator):
|
|||
write={
|
||||
"drill": "STRPOS(haystack, needle)",
|
||||
"duckdb": "STRPOS(haystack, needle)",
|
||||
"postgres": "STRPOS(haystack, needle)",
|
||||
"postgres": "POSITION(needle IN haystack)",
|
||||
"presto": "STRPOS(haystack, needle)",
|
||||
"bigquery": "STRPOS(haystack, needle)",
|
||||
"spark": "LOCATE(needle, haystack)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue