[jira] [Commented] (SPARK-14800) Dealing with null as a value in options for each internal data source

2016-04-22 Thread Apache Spark (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-14800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15255099#comment-15255099
 ] 

Apache Spark commented on SPARK-14800:
--

User 'HyukjinKwon' has created a pull request for this issue:
https://github.com/apache/spark/pull/12629

> Dealing with null as a value in options for each internal data source
> -
>
> Key: SPARK-14800
> URL: https://issues.apache.org/jira/browse/SPARK-14800
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 2.0.0
>Reporter: Hyukjin Kwon
>Priority: Minor
>
> This was found in https://github.com/apache/spark/pull/12494.
> Currently, most of options in data sources throws {{NullPointerException}} 
> when given value is {{null}}.
> For example, the codes below:
> {code}
> sqlContext.read
>   .format("csv")
>   .option("compression", null)
> {code}
> throws an exception below:
> {code}
> java.lang.NullPointerException was thrown.
> java.lang.NullPointerException
> at 
> org.apache.spark.sql.execution.datasources.csv.CSVOptions.getChar(CSVOptions.scala:32)
> at 
> org.apache.spark.sql.execution.datasources.csv.CSVOptions.(CSVOptions.scala:68)
> at 
> org.apache.spark.sql.execution.datasources.csv.DefaultSource.prepareWrite(DefaultSource.scala:86)
> ...
> {code}
> while some of options such as {{nullValue}} in CSV data source accepts 
> {{null}} .
> So, the options throwing {{NullPointerException}} when it sets to {{null}} 
> might have to be handled separately for each data source.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SPARK-14800) Dealing with null as a value in options for each internal data source

2016-04-21 Thread Hyukjin Kwon (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-14800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15251509#comment-15251509
 ] 

Hyukjin Kwon commented on SPARK-14800:
--

Let me work on this if https://github.com/apache/spark/pull/12494 is merged.

> Dealing with null as a value in options for each internal data source
> -
>
> Key: SPARK-14800
> URL: https://issues.apache.org/jira/browse/SPARK-14800
> Project: Spark
>  Issue Type: Improvement
>  Components: SQL
>Affects Versions: 2.0.0
>Reporter: Hyukjin Kwon
>Priority: Minor
>
> This was found in https://github.com/apache/spark/pull/12494.
> Currently, most of options in data sources throws {{NullPointerException}} 
> when given value is {{null}}.
> For example, the codes below:
> {code}
> sqlContext.read
>   .format("csv")
>   .option("compression", null)
> {code}
> throws an exception below:
> {code}
> java.lang.NullPointerException was thrown.
> java.lang.NullPointerException
> at 
> org.apache.spark.sql.execution.datasources.csv.CSVOptions.getChar(CSVOptions.scala:32)
> at 
> org.apache.spark.sql.execution.datasources.csv.CSVOptions.(CSVOptions.scala:68)
> at 
> org.apache.spark.sql.execution.datasources.csv.DefaultSource.prepareWrite(DefaultSource.scala:86)
> ...
> {code}
> while some of options such as {{nullValue}} in CSV data source accepts 
> {{null}} .
> So, the options throwing {{NullPointerException}} when it sets to {{null}} 
> might have to be handled separately for each data source.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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