You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Navya Krishnappa (JIRA)" <ji...@apache.org> on 2017/11/03 11:46:00 UTC

[jira] [Updated] (SPARK-22439) Not able to get numeric columns for the attached file

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

Navya Krishnappa updated SPARK-22439:
-------------------------------------
    Summary: Not able to get numeric columns for the attached file  (was: Not able to get numeric column for the attached file)

> Not able to get numeric columns for the attached file
> -----------------------------------------------------
>
>                 Key: SPARK-22439
>                 URL: https://issues.apache.org/jira/browse/SPARK-22439
>             Project: Spark
>          Issue Type: Bug
>          Components: Java API, SQL
>    Affects Versions: 2.2.0
>            Reporter: Navya Krishnappa
>            Priority: Major
>
> When reading the below-mentioned decimal value by specifying header as true.
> SourceFile: 
> 8.95977565356765764E+20
> 8.95977565356765764E+20
> 8.95977565356765764E+20
> Source code1:
> Dataset dataset = getSqlContext().read()
> .option(PARSER_LIB, "commons")
> .option(INFER_SCHEMA, "true")
> .option(HEADER, "true")
> .option(DELIMITER, ",")
> .option(QUOTE, "\"")
> .option(ESCAPE, "
> ")
> .option(MODE, Mode.PERMISSIVE)
> .csv(sourceFile);
> dataset.numericColumns()
> Result: 
> Caused by: java.util.NoSuchElementException: None.get
> 	at scala.None$.get(Option.scala:347)
> 	at scala.None$.get(Option.scala:345)
> 	at org.apache.spark.sql.Dataset$$anonfun$numericColumns$2.apply(Dataset.scala:223)
> 	at org.apache.spark.sql.Dataset$$anonfun$numericColumns$2.apply(Dataset.scala:222)
> 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
> 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
> 	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
> 	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
> 	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
> 	at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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