HeartSaVioR edited a comment on issue #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#issuecomment-466277832 The thing is, inferred types are not propagated into deserializer (which is `InitializeJavaBean`). It only has setters which `StaticInvoke` is passed for the String field, and it doesn't have information which type is required, only have information for return type of `StaticInvoke` which is wrapped with ObjectType. (So StaticInvoke - maybe Invoke too - doesn't expect specific DataType and accepts any DataType as parameter. The issue might be starting from here.) So if we want to leverage inferred SQL DataType to avoid dealing with ObjectType, it may need to be also propagated in StaticInvoke (and also Invoke maybe) which also looks like non-trivial thing (the code change might be small but just not sure this is what we want).
---------------------------------------------------------------- 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]
