You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/20 01:31:44 UTC
[GitHub] [spark] Ngone51 commented on a change in pull request #27959:
[SPARK-31190][SQL] ScalaReflection should erasure non user defined AnyVal
type
Ngone51 commented on a change in pull request #27959: [SPARK-31190][SQL] ScalaReflection should erasure non user defined AnyVal type
URL: https://github.com/apache/spark/pull/27959#discussion_r395403884
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
##########
@@ -611,10 +611,33 @@ object ScalaReflection extends ScalaReflection {
}
}
+ private def erasure(tpe: Type): Type = {
+ if (isSubtype(tpe, localTypeOf[AnyVal]) && !tpe.toString.startsWith("scala")) {
+ tpe
+ } else {
+ tpe.erasure
Review comment:
Basically, it convert a Scala type to Java type. e.g. `scala.Any` -> `java.lang.Object`.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org