You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Punit Shah (Jira)" <ji...@apache.org> on 2020/11/17 13:39:00 UTC
[jira] [Comment Edited] (SPARK-33445) Can't parse decimal type from
csv file
[ https://issues.apache.org/jira/browse/SPARK-33445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17233589#comment-17233589 ]
Punit Shah edited comment on SPARK-33445 at 11/17/20, 1:38 PM:
---------------------------------------------------------------
[~dongjoon]
As per the issue description, the call to spark_session.schema results in error. Not spark_session.printSchema.
Please test again.
And I know for a fact that in 2.4.3 printSchema succeeds, whereas schema fails.
was (Author: bullsoverbears):
As per the issue description, the call to spark_session.schema results in error. Not spark_session.printSchema.
Please test again.
And I know for a fact that in 2.4.3 printSchema succeeds, whereas schema fails.
> Can't parse decimal type from csv file
> --------------------------------------
>
> Key: SPARK-33445
> URL: https://issues.apache.org/jira/browse/SPARK-33445
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.4.6, 2.4.7, 3.0.0
> Reporter: Punit Shah
> Priority: Major
> Attachments: tsd.csv
>
>
> The attached file is a one column csv file containing decimals.
> Execute: {color:#de350b}mydf2 = spark_session.read.csv("tsd.csv", header=True, inferSchema=True){color}
> Then invoking {color:#de350b}mydf2.schema{color} will result in error:
> {color:#ff8b00}ValueError: Could not parse datatype: decimal(6,-7){color}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org