You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xinrong-meng (via GitHub)" <gi...@apache.org> on 2023/03/09 09:04:42 UTC

[GitHub] [spark] xinrong-meng opened a new pull request, #40350: [SPARK-42710][CONNECT][PYTHON] Implement `DataFrame.mapInArrow`

xinrong-meng opened a new pull request, #40350:
URL: https://github.com/apache/spark/pull/40350

   ### What changes were proposed in this pull request?
   Implement `DataFrame.mapInArrow`.
   
   ### Why are the changes needed?
   Parity with vanilla PySpark.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. `DataFrame.mapInArrow` is supported as shown below.
   
   ```
   >>> import pyarrow
   >>> df = spark.createDataFrame([(1, 21), (2, 30)], ("id", "age"))
   >>> def filter_func(iterator):
   ...   for batch in iterator:
   ...     pdf = batch.to_pandas()
   ...     yield pyarrow.RecordBatch.from_pandas(pdf[pdf.id == 1])
   ... 
   >>> df.mapInArrow(filter_func, df.schema).show()
   +---+---+                                                                       
   | id|age|
   +---+---+
   |  1| 21|
   +---+---+
   ```
   
   ### How was this patch tested?
   Unit tests.
   


-- 
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] HyukjinKwon closed pull request #40350: [SPARK-42726][CONNECT][PYTHON] Implement `DataFrame.mapInArrow`

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #40350: [SPARK-42726][CONNECT][PYTHON] Implement `DataFrame.mapInArrow`
URL: https://github.com/apache/spark/pull/40350


-- 
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] HyukjinKwon commented on pull request #40350: [SPARK-42726][CONNECT][PYTHON] Implement `DataFrame.mapInArrow`

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #40350:
URL: https://github.com/apache/spark/pull/40350#issuecomment-1463058011

   The test failure seems unrelated.
   
   Merged to master and branch-3.4.


-- 
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] xinrong-meng commented on pull request #40350: [SPARK-42726][CONNECT][PYTHON] Implement `DataFrame.mapInArrow`

Posted by "xinrong-meng (via GitHub)" <gi...@apache.org>.
xinrong-meng commented on PR #40350:
URL: https://github.com/apache/spark/pull/40350#issuecomment-1463193506

   Thanks @HyukjinKwon !


-- 
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