Github user OopsOutOfMemory commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2998#discussion_r19717586
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
 ---
    @@ -23,7 +23,8 @@ import scala.collection.IndexedSeqOptimized
     
     
     import org.apache.spark.sql.catalyst.analysis.UnresolvedException
    -import org.apache.spark.sql.catalyst.types.{BinaryType, BooleanType, 
DataType, StringType}
    +import org.apache.spark.sql.catalyst.types._
    +import org.apache.commons.lang.StringUtils
    --- End diff --
    
    @marmbrus  I'm not sure which is more faster, may be could be the same. 
    But I got your idea is do not add  external dependency libs into catalyst 
if only they have significantly improvement.
    The native implementation can be done with 
```scala.collection.immutable.StringOps.```
    eg:
    ```
    ltrim : str.dropWhile ( _ == ' ')
    rtrim : str.reverse.dropWhile(_ == ' ').reverse 
    ```
    So I will change this and retest it . Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to