Github user antoniobarbuzzi commented on the issue:
https://github.com/apache/spark/pull/12904
I agree with @HyukjinKwon and comment
https://github.com/apache/spark/pull/12904#issuecomment-217605160, except for
third use case, i.e. I'd rather do this:
With the option, nullValue set to `""`
`"","a",` should be converted to `Row("", "a", null)`
In fact, just like the univocity parser does
[here](https://github.com/uniVocity/univocity-parsers/blob/master/src/main/java/com/univocity/parsers/csv/CsvParserSettings.java#L63-L72):
> if the parser does not read any character from the input, and the input
is within quotes , the empty is used instead of an empty string
Regarding the PR, I'd deletegate the handling of this to the univocity
parser, setting the `settings.setEmptyValue(params.emptyValue)` in the
univocity's CSVSettings
[here](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVParser.scala#L34)
and
[here](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVParser.scala#L77)
too.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]