Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

#60 provide type for custom columns - #90

Open
kostjas wants to merge 1 commit into
databricks:masterfrom
kostjas:custom_fields
Open

#60 provide type for custom columns#90
kostjas wants to merge 1 commit into
databricks:masterfrom
kostjas:custom_fields

Conversation

@kostjas

Copy link
Copy Markdown

If you are not using userSchema by default all fields in csv file are assumed to be StringType.
This commit adds possibility to setup types for fields which are not supposed to be as StringType.

Usage:

TestSQLContext.csvFile(carsTypedColumnsFile, fieldsTypeMap = Map("price" -> DoubleType, "new" -> BooleanType))

@andrewrothstein

Copy link
Copy Markdown

+1

@falaki

Copy link
Copy Markdown
Member

@kostjas thanks for submitting this. Would you please rebase this? Also please add unit tests for CsvFastSuite as well.

@andrewrothstein

Copy link
Copy Markdown

@falaki I rebased @kostjas branch and added a unit test to CsvFastSuite at andrewrothstein/spark-csv:master. Should I raise a separate pull request?

@falaki

Copy link
Copy Markdown
Member

If @kostjas is not interested in following up or does not have time for it, by all means. @kspitsyn What is your input?

@kostjas

Copy link
Copy Markdown
Author

I rebased and squashed my commits into one. However if @andrewrothstein would like to accumulate fixes of several issues and push them simultaneously into master, I do not have objections.

@kostjas

Copy link
Copy Markdown
Author

As I see pull request for #107 is ready 👍

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@kostjas@andrewrothstein@falaki@JoshRosen