southernriver opened a new pull request #23485: [SPARK-26334][SQL] 
NullPointerException in CallMethodViaReflection when we apply reflect function 
for empty field
URL: https://github.com/apache/spark/pull/23485
 
 
   ## What changes were proposed in this pull request?
   As the description in 
[SPARK-26334](https://issues.apache.org/jira/browse/SPARK-26334),When we apply 
reflect function  to empty field,  it will  always  lead to  
NullPointerException. We can catch the NPE  when invocation is triggered by 
reflect function.
   
   
   ## How was this patch tested?
   manual tests!
   In the table shown below,  for field `url`, some values  are initialized to 
NULL .
   
   
![image](https://user-images.githubusercontent.com/20614350/49791627-dd3eab80-fd6b-11e8-90f0-e181163f6627.png)
   
   When we apply reflect function  to `url` ,
   before fix:
   
![image](https://user-images.githubusercontent.com/20614350/49791773-19720c00-fd6c-11e8-8342-e010b48e38c0.png)
   
   after fix:
   
![image](https://user-images.githubusercontent.com/20614350/49791850-48887d80-fd6c-11e8-87c1-25b25750fbb5.png)
   
   
   Please review http://spark.apache.org/contributing.html before opening a 
pull request.
   

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

Reply via email to