cloud-fan commented on a change in pull request #27540: Revert 
"[SPARK-28093][SQL] Fix TRIM/LTRIM/RTRIM function parameter order issue"
URL: https://github.com/apache/spark/pull/27540#discussion_r377682518
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
 ##########
 @@ -719,7 +719,7 @@ object StringTrim {
 
     _FUNC_(TRAILING FROM str) - Removes the trailing space characters from 
`str`.
 
-    _FUNC_(str, trimStr) - Remove the leading and trailing `trimStr` 
characters from `str`.
+    _FUNC_(trimStr, str) - Remove the leading and trailing `trimStr` 
characters from `str`.
 
 Review comment:
   I'm thinking about if we should remove this line (as well as the example) 
and hide this API. This was definitely a mistake and it's not even consistent 
with the scala version in `functions.scala`. For backward compatibility, we 
should keep this mistake but don't expose it too publicly.
   
   I think `trimStr FROM str` should be the recommended API at the SQL side.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to