timsaucer commented on code in PR #1286:
URL: 
https://github.com/apache/datafusion-python/pull/1286#discussion_r2459898496


##########
python/datafusion/dataframe.py:
##########
@@ -545,13 +545,14 @@ def with_column(self, name: str, expr: Expr | str) -> 
DataFrame:
         return DataFrame(self.df.with_column(name, ensure_expr(expr)))
 
     def with_columns(
-        self, *exprs: Expr | Iterable[Expr], **named_exprs: Expr
+        self, *exprs: Expr | str | Iterable[Expr | str], **named_exprs: Expr | 
str
     ) -> DataFrame:
         """Add columns to the DataFrame.
 
-        By passing expressions, iterables of expressions, or named expressions.
+        By passing expressions, iterables of expressions, string SQL 
expressions,
+        or named expressions.
         All expressions must be :class:`~datafusion.expr.Expr` objects created 
via
-        :func:`datafusion.col` or :func:`datafusion.lit`.
+        :func:`datafusion.col` or :func:`datafusion.lit`, or SQL expression 
strings.
         To pass named expressions use the form ``name=Expr``.
 
         Example usage: The following will add 4 columns labeled ``a``, ``b``, 
``c``,

Review Comment:
   It would be really nice to add a simple example of a SQL expression right 
here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to