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 2020/02/12 00:15:47 UTC

[GitHub] [spark] maropu commented on a change in pull request #27540: Revert "[SPARK-28093][SQL] Fix TRIM/LTRIM/RTRIM function parameter order issue"

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

 ##########
 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 personally like the explicit format like `trimStr FROM str` and the idea to hide the api in future releases look reasonable to me. If we fix it that way, I think its better to fix the other string functions consistently, e.g., `substring` and `overlay`.
   
   These string functions are pretty common in dbms-like systems, so I feel throwing an exception is better than returning a wrong answer when users just copy&paste a query including these string functions from another system.

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


With regards,
Apache Git Services

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