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

    https://github.com/apache/spark/pull/22553#discussion_r220770316
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/CaseInsensitiveMap.scala
 ---
    @@ -42,7 +42,11 @@ class CaseInsensitiveMap[T] private (val originalMap: 
Map[String, T]) extends Ma
       override def iterator: Iterator[(String, T)] = keyLowerCasedMap.iterator
     
       override def -(key: String): Map[String, T] = {
    -    new 
CaseInsensitiveMap(originalMap.filterKeys(!_.equalsIgnoreCase(key)))
    +    new CaseInsensitiveMap(originalMap.filter(!_._1.equalsIgnoreCase(key)))
    +  }
    +
    +  override def filterKeys(p: (String) => Boolean): Map[String, T] = {
    --- End diff --
    
    It seems safer to override the method though..
    Anyway I will change all the methods calls of  `filterKeys ` and add 
comment in `CaseInsensitiveMap`.



---

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

Reply via email to