zero323 commented on issue #27406: [SPARK-30681][PYSPARK][SQL] Add higher order 
functions API to PySpark
URL: https://github.com/apache/spark/pull/27406#issuecomment-580411272
 
 
   > > ```python
   > > df.selectExpr("transform(values, x -> x + 1)")
   > > ```
   > 
   > So with this PR, this can be rewritten as follows, correct?
   > 
   > ```python
   > from pyspark.sql.functions import transform
   > 
   > df.select(transform('values', lambda x: x + 1))
   > ```
   
   That's exactly it. I think it is much easier to write, and while there is 
some potential for confusion (not really different from Scala variant), it 
outweighs the benefits.
   
   > > ### Does this PR introduce any user-facing change?
   > > No.
   > 
   > Since this PR adds new public PySpark APIs, shouldn't this be "yes"? Or is 
that only when modifying an existing public API?
   
   Description says:
   
   > If yes, please clarify the previous behavior and the change this PR 
proposes
   
   Since there was no "previous behavior", I'd opted for no. 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to