diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-15 13:53:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-15 13:53:00 +0000 |
commit | 684905e3de7854a3806ffa55e0d1a09431ba5a19 (patch) | |
tree | 127ebd7d051f15fb8f8cf36cfd04a8a65a4d9680 /sqlglot/dialects/tableau.py | |
parent | Releasing debian version 6.3.1-1. (diff) | |
download | sqlglot-684905e3de7854a3806ffa55e0d1a09431ba5a19.tar.xz sqlglot-684905e3de7854a3806ffa55e0d1a09431ba5a19.zip |
Merging upstream version 7.1.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/tableau.py')
-rw-r--r-- | sqlglot/dialects/tableau.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sqlglot/dialects/tableau.py b/sqlglot/dialects/tableau.py index e571749..45aa041 100644 --- a/sqlglot/dialects/tableau.py +++ b/sqlglot/dialects/tableau.py @@ -1,7 +1,6 @@ from sqlglot import exp from sqlglot.dialects.dialect import Dialect from sqlglot.generator import Generator -from sqlglot.helper import list_get from sqlglot.parser import Parser @@ -16,7 +15,7 @@ def _coalesce_sql(self, expression): def _count_sql(self, expression): this = expression.this if isinstance(this, exp.Distinct): - return f"COUNTD({self.sql(this, 'this')})" + return f"COUNTD({self.expressions(this, flat=True)})" return f"COUNT({self.sql(expression, 'this')})" @@ -33,5 +32,5 @@ class Tableau(Dialect): FUNCTIONS = { **Parser.FUNCTIONS, "IFNULL": exp.Coalesce.from_arg_list, - "COUNTD": lambda args: exp.Count(this=exp.Distinct(this=list_get(args, 0))), + "COUNTD": lambda args: exp.Count(this=exp.Distinct(expressions=args)), } |