[ 
https://issues.apache.org/jira/browse/SPARK-26334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenliang updated SPARK-26334:
------------------------------
    Description: 
In the table shown below:

CREATE EXTERNAL TABLE `test_db4`(`a` string, `b` string, `url` string) 
PARTITIONED BY (`dt` string);

!image-2018-12-11-16-47-26-369.png!

  For field `url`, some values  are initialized to NULL .

  When we apply reflect function  to `url` , it will  lead to  
NullPointerException  as follow:

!image-2018-12-11-16-54-50-659.png!

 

But For Hive,It  can handle it well.

!image-2018-12-11-17-00-00-171.png!

 

  was:
In the table shown below:

CREATE EXTERNAL TABLE `test_db4`(`a` string, `b` string, `url` string) 
PARTITIONED BY (`dt` string);

!image-2018-12-11-16-47-26-369.png!

  For field `url`, some values  are initialized to NULL .

  When we apply reflect function  to `url` , it will  lead to  
NullPointerException  as follow:

!image-2018-12-11-16-54-50-659.png!

 


> NullPointerException  in CallMethodViaReflection when we apply reflect 
> function for empty field
> -----------------------------------------------------------------------------------------------
>
>                 Key: SPARK-26334
>                 URL: https://issues.apache.org/jira/browse/SPARK-26334
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0, 2.3.0
>            Reporter: chenliang
>            Priority: Major
>         Attachments: image-2018-12-11-16-47-26-369.png, 
> image-2018-12-11-16-48-27-305.png, image-2018-12-11-16-54-50-659.png, 
> image-2018-12-11-17-00-00-171.png
>
>
> In the table shown below:
> CREATE EXTERNAL TABLE `test_db4`(`a` string, `b` string, `url` string) 
> PARTITIONED BY (`dt` string);
> !image-2018-12-11-16-47-26-369.png!
>   For field `url`, some values  are initialized to NULL .
>   When we apply reflect function  to `url` , it will  lead to  
> NullPointerException  as follow:
> !image-2018-12-11-16-54-50-659.png!
>  
> But For Hive,It  can handle it well.
> !image-2018-12-11-17-00-00-171.png!
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to