1
0
Fork 0

Merging upstream version 26.1.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:59:50 +01:00
parent 829d661a08
commit c8d4d2df63
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
119 changed files with 71635 additions and 68059 deletions
sqlglot/dialects

View file

@ -420,6 +420,9 @@ class Dialect(metaclass=_Dialect):
SUPPORTS_VALUES_DEFAULT = True
"""Whether the DEFAULT keyword is supported in the VALUES clause."""
NUMBERS_CAN_BE_UNDERSCORE_SEPARATED = False
"""Whether number literals can include underscores for better readability"""
REGEXP_EXTRACT_DEFAULT_GROUP = 0
"""The default value for the capturing group."""
@ -1751,3 +1754,8 @@ def no_make_interval_sql(self: Generator, expression: exp.MakeInterval, sep: str
args.append(f"{value} {unit}")
return f"INTERVAL '{self.format_args(*args, sep=sep)}'"
def length_or_char_length_sql(self: Generator, expression: exp.Length) -> str:
length_func = "LENGTH" if expression.args.get("binary") else "CHAR_LENGTH"
return self.func(length_func, expression.this)