1
0
Fork 0

Adding upstream version 10.0.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 14:52:26 +01:00
parent 24752785d9
commit 1e860cc299
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
98 changed files with 4080 additions and 1666 deletions

View file

@ -1,7 +1,7 @@
from sqlglot import exp
from __future__ import annotations
from sqlglot import exp, generator, parser
from sqlglot.dialects.dialect import Dialect
from sqlglot.generator import Generator
from sqlglot.parser import Parser
def _if_sql(self, expression):
@ -20,17 +20,17 @@ def _count_sql(self, expression):
class Tableau(Dialect):
class Generator(Generator):
class Generator(generator.Generator):
TRANSFORMS = {
**Generator.TRANSFORMS,
**generator.Generator.TRANSFORMS, # type: ignore
exp.If: _if_sql,
exp.Coalesce: _coalesce_sql,
exp.Count: _count_sql,
}
class Parser(Parser):
class Parser(parser.Parser):
FUNCTIONS = {
**Parser.FUNCTIONS,
**parser.Parser.FUNCTIONS,
"IFNULL": exp.Coalesce.from_arg_list,
"COUNTD": lambda args: exp.Count(this=exp.Distinct(expressions=args)),
}