Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/20700#discussion_r171774634 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala --- @@ -734,23 +734,26 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String val keyToStringFunc = dataToStringFunc("keyToString", kt) val valueToStringFunc = dataToStringFunc("valueToString", vt) val loopIndex = ctx.freshName("loopIndex") + val getValueMapKeyArray0 = CodeGenerator.getValue(s"$map.keyArray()", kt, "0") + val getValueMapValArray0 = CodeGenerator.getValue(s"$map.valueArray()", vt, "0") --- End diff -- `getMapFirstKey` and `getMapFirstValue`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org