spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-24676) Project required data from parsed data when csvColumnPruning disabled
Date Thu, 28 Jun 2018 07:52:00 GMT

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

Apache Spark reassigned SPARK-24676:
------------------------------------

    Assignee: Apache Spark

> Project required data from parsed data when csvColumnPruning disabled
> ---------------------------------------------------------------------
>
>                 Key: SPARK-24676
>                 URL: https://issues.apache.org/jira/browse/SPARK-24676
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Takeshi Yamamuro
>            Assignee: Apache Spark
>            Priority: Minor
>
> I hit a bug below when parsing csv data;
> {code}
> ./bin/spark-shell --conf spark.sql.csv.parser.columnPruning.enabled=false
> scala> val dir = "/tmp/spark-csv/csv"
> scala> spark.range(10).selectExpr("id % 2 AS p", "id").write.mode("overwrite").partitionBy("p").csv(dir)
> scala> spark.read.csv(dir).selectExpr("sum(p)").collect()
> 18/06/25 13:48:46 ERROR Executor: Exception in task 2.0 in stage 2.0 (TID 7)
> java.lang.ClassCastException: org.apache.spark.unsafe.types.UTF8String cannot be cast
to java.lang.Integer
>         at scala.runtime.BoxesRunTime.unboxToInt(BoxesRunTime.java:101)
>         at org.apache.spark.sql.catalyst.expressions.BaseGenericInternalRow$class.getInt(rows.scala:41)
>         ...
> {code}



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

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


Mime
View raw message