1
0
Fork 0

Adding upstream version 17.11.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 20:49:56 +01:00
parent 19b35e2a28
commit 276276930e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
69 changed files with 30974 additions and 30030 deletions

View file

@ -40,10 +40,12 @@ DATE_DIFF_FACTOR = {
def _date_add_sql(kind: str) -> t.Callable[[generator.Generator, exp.DateAdd | exp.DateSub], str]:
def func(self: generator.Generator, expression: exp.DateAdd | exp.DateSub) -> str:
expression = expression.copy()
this = self.sql(expression, "this")
unit = expression.args.get("unit")
expression = simplify_literal(expression.copy(), copy=False).expression
expression = simplify_literal(expression).expression
if not isinstance(expression, exp.Literal):
self.unsupported("Cannot add non literal")