GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/16351
[SPARK-18943][SQL] Avoid per-record type dispatch in CSV when reading
## What changes were proposed in this pull request?
`CSVRelation.csvParser` does type dispatch for each value in each row. We
can prevent this because the schema is already kept in `CSVRelation`.
So, this PR proposes that converters are created first according to the
schema, and then apply them to each.
## How was this patch tested?
Tests in `CSVTypeCastSuite` and `CSVRelation`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark type-dispatch
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16351.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16351
----
commit e72d1bc419dfd6da7f6e298d5b5412dba69eb5ad
Author: hyukjinkwon <[email protected]>
Date: 2016-12-20T11:54:05Z
Avoid per-record type dispatch in CSV when reading
----
---
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]