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/10/10 07:39:26 UTC

[GitHub] [spark] EnricoMi commented on pull request #37360: [SPARK-39931][PYTHON][WIP] Improve applyInPandas performance for very small groups

EnricoMi commented on PR #37360:
URL: https://github.com/apache/spark/pull/37360#issuecomment-1272901268

   @HyukjinKwon Two options here:
   
   - provide an alternative for `applyInPandas` that takes the same user function signature in batch mode
     - Python (`wrap_grouped_batch_map_pandas_udf`) calls that function multiple times for one invocation from Scala
   - provide an alternative for `applyInPandas` that takes a different user function signature in batch mode
     - provides a `pandas.DataFrameGroupBy` to provide user code access to multiple groups at once, and Pandas Group API
   
   Both alternatives could be supported based on annotations of the user function (`inspect.getfullargspec`).
   
   I wouldn't touch `applyInPandas` as this might introduce some penalty user code that has large groups.


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