summaryrefslogtreecommitdiffstats
path: root/sqlglot/dataframe/sql/functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/dataframe/sql/functions.py')
-rw-r--r--sqlglot/dataframe/sql/functions.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sqlglot/dataframe/sql/functions.py b/sqlglot/dataframe/sql/functions.py
index 8f24746..3c98f42 100644
--- a/sqlglot/dataframe/sql/functions.py
+++ b/sqlglot/dataframe/sql/functions.py
@@ -954,10 +954,12 @@ def array_join(
col: ColumnOrName, delimiter: str, null_replacement: t.Optional[str] = None
) -> Column:
if null_replacement is not None:
- return Column.invoke_anonymous_function(
- col, "ARRAY_JOIN", lit(delimiter), lit(null_replacement)
+ return Column.invoke_expression_over_column(
+ col, expression.ArrayJoin, expression=lit(delimiter), null=lit(null_replacement)
)
- return Column.invoke_anonymous_function(col, "ARRAY_JOIN", lit(delimiter))
+ return Column.invoke_expression_over_column(
+ col, expression.ArrayJoin, expression=lit(delimiter)
+ )
def concat(*cols: ColumnOrName) -> Column: