viirya commented on a change in pull request #32448:
URL: https://github.com/apache/spark/pull/32448#discussion_r629777957



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala
##########
@@ -483,8 +483,8 @@ case class StructType(fields: Array[StructField]) extends 
DataType with Seq[Stru
    * 4. Otherwise, `this` and `that` are considered as conflicting schemas and 
an exception would be
    *    thrown.
    */
-  private[sql] def merge(that: StructType): StructType =
-    StructType.merge(this, that).asInstanceOf[StructType]
+  private[sql] def merge(that: StructType, resolver: Resolver = _ == _): 
StructType =

Review comment:
       The default resolver looks like for case-sensitive resolution. SparkSQL 
is case-insensitive by default. I'm afraid calling it by default parameter 
could lead to unexpected error. I'm not sure why `findNestedField` uses the 
default resolver. Removing default resolve is also good to me.




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



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

Reply via email to