diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:02:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:02:18 +0000 |
commit | 41f1f5740d2140bfd3b2a282ca1087a4b576679a (patch) | |
tree | 0b1eb5ba5c759d08b05d56e50675784b6170f955 /sqlglot/dialects/tsql.py | |
parent | Releasing debian version 23.7.0-1. (diff) | |
download | sqlglot-41f1f5740d2140bfd3b2a282ca1087a4b576679a.tar.xz sqlglot-41f1f5740d2140bfd3b2a282ca1087a4b576679a.zip |
Merging upstream version 23.10.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/tsql.py')
-rw-r--r-- | sqlglot/dialects/tsql.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sqlglot/dialects/tsql.py b/sqlglot/dialects/tsql.py index 8e06be6..6eed46d 100644 --- a/sqlglot/dialects/tsql.py +++ b/sqlglot/dialects/tsql.py @@ -109,7 +109,7 @@ def _build_formatted_time( assert len(args) == 2 return exp_class( - this=exp.cast(args[1], "datetime"), + this=exp.cast(args[1], exp.DataType.Type.DATETIME), format=exp.Literal.string( format_time( args[0].name.lower(), @@ -726,6 +726,7 @@ class TSQL(Dialect): SUPPORTS_SELECT_INTO = True JSON_PATH_BRACKETED_KEY_SUPPORTED = False SUPPORTS_TO_NUMBER = False + OUTER_UNION_MODIFIERS = False EXPRESSIONS_WITHOUT_NESTED_CTES = { exp.Delete, @@ -882,13 +883,6 @@ class TSQL(Dialect): return rename_func("DATETIMEFROMPARTS")(self, expression) - def set_operations(self, expression: exp.Union) -> str: - limit = expression.args.get("limit") - if limit: - return self.sql(expression.limit(limit.pop(), copy=False)) - - return super().set_operations(expression) - def setitem_sql(self, expression: exp.SetItem) -> str: this = expression.this if isinstance(this, exp.EQ) and not isinstance(this.left, exp.Parameter): |