-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-19018][SQL] ADD csv write charset param #16428
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,9 @@ private[csv] class CSVOptions(@transient private val parameters: CaseInsensitive | |
| val delimiter = CSVTypeCast.toChar( | ||
| parameters.getOrElse("sep", parameters.getOrElse("delimiter", ","))) | ||
| private val parseMode = parameters.getOrElse("mode", "PERMISSIVE") | ||
| val charset = parameters.getOrElse("encoding", | ||
| val readCharSet = parameters.getOrElse("encoding", | ||
| parameters.getOrElse("charset", StandardCharsets.UTF_8.name())) | ||
| val writeCharSet = parameters.getOrElse("writeEncoding", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should not necessarily introduce additional option. We could just use
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @HyukjinKwon I think so |
||
| parameters.getOrElse("charset", StandardCharsets.UTF_8.name())) | ||
|
|
||
| val quote = getChar("quote", '\"') | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also should add the same documentation in
readwriter.py.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,I will write my unit test and modify this pull request