1
0
Fork 0

Adding upstream version 25.8.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:51:59 +01:00
parent 8356f462bb
commit a500eebbbb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
61 changed files with 50550 additions and 50354 deletions

View file

@ -168,16 +168,13 @@ def _serial_to_generated(expression: exp.Expression) -> exp.Expression:
def _build_generate_series(args: t.List) -> exp.GenerateSeries:
# The goal is to convert step values like '1 day' or INTERVAL '1 day' into INTERVAL '1' day
# Note: postgres allows calls with just two arguments -- the "step" argument defaults to 1
step = seq_get(args, 2)
if step is None:
# Postgres allows calls with just two arguments -- the "step" argument defaults to 1
return exp.GenerateSeries.from_arg_list(args)
if step.is_string:
args[2] = exp.to_interval(step.this)
elif isinstance(step, exp.Interval) and not step.args.get("unit"):
args[2] = exp.to_interval(step.this.this)
if step is not None:
if step.is_string:
args[2] = exp.to_interval(step.this)
elif isinstance(step, exp.Interval) and not step.args.get("unit"):
args[2] = exp.to_interval(step.this.this)
return exp.GenerateSeries.from_arg_list(args)