summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/dialect.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 16:13:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 16:13:01 +0000
commita7044b672667f2a0b48bd0b326b5a55b0815ef79 (patch)
tree4fb5238d47fb4709d47f766a74b8bbaa9c6f17d8 /sqlglot/dialects/dialect.py
parentReleasing debian version 23.12.1-1. (diff)
downloadsqlglot-a7044b672667f2a0b48bd0b326b5a55b0815ef79.tar.xz
sqlglot-a7044b672667f2a0b48bd0b326b5a55b0815ef79.zip
Merging upstream version 23.13.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/dialect.py')
-rw-r--r--sqlglot/dialects/dialect.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sqlglot/dialects/dialect.py b/sqlglot/dialects/dialect.py
index 0fd1a47..cc1d620 100644
--- a/sqlglot/dialects/dialect.py
+++ b/sqlglot/dialects/dialect.py
@@ -161,6 +161,9 @@ class _Dialect(type):
if enum not in ("", "bigquery"):
klass.generator_class.SELECT_KINDS = ()
+ if enum not in ("", "athena", "presto", "trino"):
+ klass.generator_class.TRY_SUPPORTED = False
+
if enum not in ("", "databricks", "hive", "spark", "spark2"):
modifier_transforms = klass.generator_class.AFTER_HAVING_MODIFIER_TRANSFORMS.copy()
for modifier in ("cluster", "distribute", "sort"):
@@ -318,6 +321,9 @@ class Dialect(metaclass=_Dialect):
UNICODE_START: t.Optional[str] = None
UNICODE_END: t.Optional[str] = None
+ # Separator of COPY statement parameters
+ COPY_PARAMS_ARE_CSV = True
+
@classmethod
def get_or_raise(cls, dialect: DialectType) -> Dialect:
"""
@@ -897,9 +903,7 @@ def regexp_extract_sql(self: Generator, expression: exp.RegexpExtract) -> str:
def regexp_replace_sql(self: Generator, expression: exp.RegexpReplace) -> str:
- bad_args = list(
- filter(expression.args.get, ("position", "occurrence", "parameters", "modifiers"))
- )
+ bad_args = list(filter(expression.args.get, ("position", "occurrence", "modifiers")))
if bad_args:
self.unsupported(f"REGEXP_REPLACE does not support the following arg(s): {bad_args}")