From ff7b050f040cea920b9c100bf682f3591d35ab46 Mon Sep 17 00:00:00 2001 From: Colin Ho Date: Fri, 20 Sep 2024 09:54:58 -0700 Subject: [PATCH] fix --- daft/expressions/expressions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daft/expressions/expressions.py b/daft/expressions/expressions.py index f322d3b4e7..1e15d5d98c 100644 --- a/daft/expressions/expressions.py +++ b/daft/expressions/expressions.py @@ -1980,7 +1980,7 @@ def split(self, pattern: str | Expression, regex: bool = False) -> Expression: pattern_expr = Expression._to_expression(pattern) return Expression._from_pyexpr(self._expr.utf8_split(pattern_expr._expr, regex)) - def concat(self, other: str) -> Expression: + def concat(self, other: str | Expression) -> Expression: """Concatenates two string expressions together .. NOTE:: @@ -2012,7 +2012,8 @@ def concat(self, other: str) -> Expression: Expression: a String expression which is `self` concatenated with `other` """ # Delegate to + operator implementation. - return Expression._from_pyexpr(self._expr) + other + other_expr = Expression._to_expression(other) + return Expression._from_pyexpr(self._expr) + other_expr def extract(self, pattern: str | Expression, index: int = 0) -> Expression: r"""Extracts the specified match group from the first regex match in each string in a string column.