[ https://issues.apache.org/jira/browse/SPARK-19783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15889886#comment-15889886
]
Takeshi Yamamuro commented on SPARK-19783:
------------------------------------------
I think we must treat longer length of tokens as malformed ones because dropping some tokens
leads to loss of information. But, I'm not 100% sure that shorter ones are malformed. What
do you think? cc: [~hyukjin.kwon]
I just made a prototype here: https://github.com/apache/spark/compare/master...maropu:SPARK-19783
This is the version that handles both pattens as malformed.
> Treat shorter/longer lengths of tokens as malformed records in CSV parser
> -------------------------------------------------------------------------
>
> Key: SPARK-19783
> URL: https://issues.apache.org/jira/browse/SPARK-19783
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.1.0
> Reporter: Takeshi Yamamuro
>
> If a length of tokens does not match an expected length in a schema, we probably need
to treat it as a malformed record.
> https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityParser.scala#L239
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org
|