From 8a813471373cbb601f1b6385789a6d0451811f63 Mon Sep 17 00:00:00 2001 From: Michiel <918128+mvanderlee@users.noreply.github.com> Date: Wed, 21 Feb 2024 23:40:41 +0100 Subject: [PATCH] :bug: Fixes #791 --- pypika/terms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pypika/terms.py b/pypika/terms.py index b25af5c5..c5f0c4a7 100644 --- a/pypika/terms.py +++ b/pypika/terms.py @@ -1312,7 +1312,7 @@ def get_special_params_sql(self, **kwargs: Any) -> Any: def get_arg_sql(arg, **kwargs): return arg.get_sql(with_alias=False, **kwargs) if hasattr(arg, "get_sql") else str(arg) - def get_function_sql(self, **kwargs: Any) -> str: + def get_function_sql(self, subquery: Any = None, with_alias: Any = None, **kwargs: Any) -> str: special_params_sql = self.get_special_params_sql(**kwargs) return "{name}({args}{special})".format( @@ -1333,7 +1333,9 @@ def get_sql(self, **kwargs: Any) -> str: dialect = kwargs.pop("dialect", None) # FIXME escape - function_sql = self.get_function_sql(with_namespace=with_namespace, quote_char=quote_char, dialect=dialect) + function_sql = self.get_function_sql( + with_namespace=with_namespace, quote_char=quote_char, dialect=dialect, **kwargs + ) if self.schema is not None: function_sql = "{schema}.{function}".format(