Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the same library when Reading and Writing CSV #30

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changed the type of quote and escape from char to Character so nullable
Abdelaziz Bendadani committed Mar 19, 2015
commit 54782ac62703cadffda91a28ec15bfb2a92c40e7
2 changes: 1 addition & 1 deletion src/main/scala/com/databricks/spark/csv/CsvParser.scala
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ class CsvParser {
private var useHeader: Boolean = true
private var delimiter: Character = ','
private var quote: Character = '"'
private var escape: Character = '\\'
private var escape: Character = null
private var schema: StructType = null

def withUseHeader(flag: Boolean): CsvParser = {
4 changes: 2 additions & 2 deletions src/main/scala/com/databricks/spark/csv/CsvRelation.scala
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@ case class CsvRelation protected[spark] (
location: String,
useHeader: Boolean,
delimiter: Char,
quote: Char,
escape: Char,
quote: Character,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Char

escape: Character,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Char

userSchema: StructType = null)(@transient val sqlContext: SQLContext)
extends BaseRelation with TableScan with InsertableRelation {