cloud-fan commented on a change in pull request #23854: [SPARK-22000][SQL] Use
String.valueOf in generated code to assign value to String type of field in
Java Bean Encoder
URL: https://github.com/apache/spark/pull/23854#discussion_r259339255
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala
##########
@@ -235,9 +236,6 @@ object JavaTypeInference {
path :: Nil,
returnNullable = false)
- case c if c == classOf[java.lang.String] =>
- Invoke(path, "toString", ObjectType(classOf[String]))
Review comment:
The `ScalaReflection` does the same thing, do we have a problem there too?
AFAIK the `path` should be a string type column, and it's always safe to
call `UTF8String.toString`. My gut feeling is, we miss to add `Upcast`
somewhere in `JavaTypeInference`.
----------------------------------------------------------------
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]