Github user gczsjdy commented on a diff in the pull request: https://github.com/apache/spark/pull/20010#discussion_r157697044 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala --- @@ -99,6 +99,17 @@ object TypeCoercion { case (_: TimestampType, _: DateType) | (_: DateType, _: TimestampType) => Some(TimestampType) + case (t1 @ ArrayType(pointType1, nullable1), t2 @ ArrayType(pointType2, nullable2)) + if t1.sameType(t2) => + val dataType = findTightestCommonType(pointType1, pointType2).get + Some(ArrayType(dataType, nullable1 || nullable2)) + + case (t1 @ MapType(keyType1, valueType1, nullable1), + t2 @ MapType(keyType2, valueType2, nullable2)) if t1.sameType(t2) => + val keyType = findTightestCommonType(keyType1, keyType2).get + val valueType = findTightestCommonType(valueType1, valueType2).get --- End diff -- Also here
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org