You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jean-Francis Roy (Jira)" <ji...@apache.org> on 2021/02/15 21:26:00 UTC

[jira] [Comment Edited] (SPARK-25243) Use FailureSafeParser in from_json

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

Jean-Francis Roy edited comment on SPARK-25243 at 2/15/21, 9:25 PM:
--------------------------------------------------------------------

`from_json() doesn't support the DROPMALFORMED mode. Acceptable modes are PERMISSIVE and FAILFAST.`

It seems like the previous behavior cannot be reproduced anymore?


was (Author: jeanfrancisroy):
```
from_json() doesn't support the DROPMALFORMED mode. Acceptable modes are PERMISSIVE and FAILFAST.

```

It seems like the previous behavior cannot be reproduced anymore?

> Use FailureSafeParser in from_json
> ----------------------------------
>
>                 Key: SPARK-25243
>                 URL: https://issues.apache.org/jira/browse/SPARK-25243
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> The [FailureSafeParser|https://github.com/apache/spark/blob/a8a1ac01c4732f8a738b973c8486514cd88bf99b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FailureSafeParser.scala#L28]  is used in parsing JSON, CSV files and dataset of strings. It supports the [PERMISSIVE, DROPMALFORMED and FAILFAST|https://github.com/apache/spark/blob/5264164a67df498b73facae207eda12ee133be7d/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ParseMode.scala#L31-L44] modes. The ticket aims to make the from_json function compatible to regular parsing via FailureSafeParser and support above modes



--
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