srowen commented 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-466181496 I agree with your argument about null; it would never have worked here anyway. It feels like there should be an assertion about it to make sure, as if a null reaches here it returns "null" rather than an exception. I also don't know this part well enough, but primitives are matched to string? That sounds weird. It seems like primitives are already handled in ``` case c if !inferExternalType(c).isInstanceOf[ObjectType] => path ``` It wasn't clear from the JIRA, initially, how this even happened. Now there's a simple test case attached. Could we paste that in as a test here, and see if it even fails without the change? and if so, how. The test case suggests that a String field is the problem, but it has toString and isn't handled by this part.
---------------------------------------------------------------- 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]
