Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5798#discussion_r29406952
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala
 ---
    @@ -29,12 +29,23 @@ package object analysis {
     
       /**
        * Resolver should return true if the first string refers to the same 
entity as the second string.
    -   * For example, by using case insensitive equality.
    +   * For example, by using case insensitive equality. Besides, Resolver 
also provides the ability
    +   * to normalize the string according to its semantic.
        */
    -  type Resolver = (String, String) => Boolean
    +  trait Resolver {
    +    def apply(a: String, b: String): Boolean
    +    def apply(a: String): String
    +  }
    +
    +  val caseInsensitiveResolution = new Resolver {
    +    override def apply(a: String, b: String): Boolean = 
a.equalsIgnoreCase(b)
    +    override def apply(a: String): String = a.toLowerCase // as Hive does
    --- End diff --
    
    I'd like keep the first `apply` as it was, because I don't want to impact a 
lots of existed code. I agree  we should rename the second `apply` => 
`normalize`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to