HeartSaVioR commented on a change in pull request #23854: [SPARK-22000][SQL]
Address missing Upcast in JavaTypeInference.deserializerFor
URL: https://github.com/apache/spark/pull/23854#discussion_r260126785
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
##########
@@ -349,10 +349,18 @@ object ScalaReflection extends ScalaReflection {
// TODO: add walked type path for map
val TypeRef(_, _, Seq(keyType, valueType)) = t
+ val classNameForKey = getClassNameFromType(keyType)
+ val classNameForValue = getClassNameFromType(valueType)
+
+ val newTypePath =
+ s"""- map key class: "$classNameForKey",
+ | value class: "$classNameForValue"""".stripMargin +:
+ walkedTypePath
+
Review comment:
Adding a UT just for testing path addition looks overkill. If you're unsure
about this chance unless I add a new test for this, I'd rather roll back
(adding TODO back) and address this in follow-up PR which may add a new object
tracking walkedTypePath for both Java/Scala.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]