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 2019/02/21 21:51:42 UTC

[GitHub] 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

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:
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