milenkovicm commented on code in PR #1286:
URL:
https://github.com/apache/datafusion-python/pull/1286#discussion_r2452610610
##########
python/tests/test_dataframe.py:
##########
@@ -538,15 +538,35 @@ def test_with_columns(df):
assert result.column(6) == pa.array([5, 7, 9])
-def test_with_columns_invalid_expr(df):
- with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
- df.with_columns("a")
- with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
- df.with_columns(c="a")
- with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
- df.with_columns(["a"])
- with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
- df.with_columns(c=["a"])
+def test_with_columns_str(df):
+ df = df.with_columns(
+ "a + b as c",
+ "a + b as d",
+ [
+ "a + b as e",
+ "a + b as f",
+ ],
+ g=("a + b"),
Review Comment:
which line you refer 545 and 548 or 549 hard to get from github render,
thanks
--
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]