summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/tableau.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/dialects/tableau.py')
-rw-r--r--sqlglot/dialects/tableau.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/sqlglot/dialects/tableau.py b/sqlglot/dialects/tableau.py
index d5fba17..67ef76b 100644
--- a/sqlglot/dialects/tableau.py
+++ b/sqlglot/dialects/tableau.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from sqlglot import exp, generator, parser, transforms
-from sqlglot.dialects.dialect import Dialect
+from sqlglot.dialects.dialect import Dialect, rename_func
class Tableau(Dialect):
@@ -11,6 +11,7 @@ class Tableau(Dialect):
TRANSFORMS = {
**generator.Generator.TRANSFORMS,
+ exp.Coalesce: rename_func("IFNULL"),
exp.Select: transforms.preprocess([transforms.eliminate_distinct_on]),
}
@@ -25,9 +26,6 @@ class Tableau(Dialect):
false = self.sql(expression, "false")
return f"IF {this} THEN {true} ELSE {false} END"
- def coalesce_sql(self, expression: exp.Coalesce) -> str:
- return f"IFNULL({self.sql(expression, 'this')}, {self.expressions(expression)})"
-
def count_sql(self, expression: exp.Count) -> str:
this = expression.this
if isinstance(this, exp.Distinct):