Github user mn-mikke commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21704#discussion_r202002501
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
 ---
    @@ -184,6 +184,17 @@ object TypeCoercion {
         }
       }
     
    +  def findCommonTypeDifferentOnlyInNullFlags(types: Seq[DataType]): 
Option[DataType] = {
    +    if (types.isEmpty) {
    +      None
    +    } else {
    +      types.tail.foldLeft(Option(types.head)) {
    --- End diff --
    
    nit: ```Some(types.head)``` to avoid an extra null check?


---

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

Reply via email to