You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/30 03:19:38 UTC
[GitHub] [spark] zhengruifeng opened a new pull request, #39300: [SPARK-41779][SPARK-41771][CONNECT][PYTHON] Make `__getitem__` support filter and select
zhengruifeng opened a new pull request, #39300:
URL: https://github.com/apache/spark/pull/39300
### What changes were proposed in this pull request?
Make dataframe `__getitem__` support:
1, filter: `cdf[cdf.a.isin(1, 2, 3)]`
2, select: `cdf[["col1", cdf.a]]`
3, index: `cdf[0]`
### Why are the changes needed?
to be consistent with PySpark
### Does this PR introduce _any_ user-facing change?
yes
### How was this patch tested?
added UT
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng closed pull request #39300: [SPARK-41779][SPARK-41771][CONNECT][PYTHON] Make `__getitem__` support filter and select
Posted by GitBox <gi...@apache.org>.
zhengruifeng closed pull request #39300: [SPARK-41779][SPARK-41771][CONNECT][PYTHON] Make `__getitem__` support filter and select
URL: https://github.com/apache/spark/pull/39300
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #39300: [SPARK-41779][SPARK-41771][CONNECT][PYTHON] Make `__getitem__` support filter and select
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #39300:
URL: https://github.com/apache/spark/pull/39300#issuecomment-1367784813
thanks, merged into master
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #39300: [SPARK-41779][SPARK-41771][CONNECT][PYTHON] Make `__getitem__` support filter and select
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #39300:
URL: https://github.com/apache/spark/pull/39300#issuecomment-1367773335
cc @HyukjinKwon @grundprinzip
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #39300: [SPARK-41779][SPARK-41771][CONNECT][PYTHON] Make `__getitem__` support filter and select
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #39300:
URL: https://github.com/apache/spark/pull/39300#issuecomment-1367703895
this pr is to fix
```
File "/.../spark/python/pyspark/sql/connect/column.py", line 364, in pyspark.sql.connect.column.Column.isin
Failed example:
df[df.name.isin("Bob", "Mike")].collect()
Exception raised:
Traceback (most recent call last):
File "/.../miniconda3/envs/python3.9/lib/python3.9/doctest.py", line 1336, in __run
exec(compile(example.source, filename, "single",
File "<doctest pyspark.sql.connect.column.Column.isin[1]>", line 1, in <module>
df[df.name.isin("Bob", "Mike")].collect()
File "/.../workspace/forked/spark/python/pyspark/sql/connect/dataframe.py", line 888, in __getitem__
return col(name)
File "/.../workspace/forked/spark/python/pyspark/sql/connect/functions.py", line 161, in col
return Column(ColumnReference(col))
File "/.../spark/python/pyspark/sql/connect/expressions.py", line 322, in __init__
assert isinstance(name, str)
AssertionError
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org