[SPARK-28431][SQL] Set maximum error message length in CSV datasource's parsing and writing#25184
Closed
WeichenXu123 wants to merge 8 commits intoapache:masterfrom
Closed
[SPARK-28431][SQL] Set maximum error message length in CSV datasource's parsing and writing#25184WeichenXu123 wants to merge 8 commits intoapache:masterfrom
WeichenXu123 wants to merge 8 commits intoapache:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
HyukjinKwon
reviewed
Jul 18, 2019
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala
Outdated
Show resolved
Hide resolved
srowen
reviewed
Jul 18, 2019
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
Outdated
Show resolved
Hide resolved
35f8b32 to
c8f1a52
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
srowen
reviewed
Jul 19, 2019
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HyukjinKwon
reviewed
Jul 20, 2019
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala
Outdated
Show resolved
Hide resolved
HyukjinKwon
reviewed
Jul 20, 2019
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Outdated
Show resolved
Hide resolved
HyukjinKwon
reviewed
Jul 21, 2019
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Outdated
Show resolved
Hide resolved
HyukjinKwon
reviewed
Jul 21, 2019
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Outdated
Show resolved
Hide resolved
HyukjinKwon
reviewed
Jul 21, 2019
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
MaxGekk
reviewed
Jul 21, 2019
Member
MaxGekk
left a comment
There was a problem hiding this comment.
Please, fix PR's title meximum -> maximum
MaxGekk
reviewed
Jul 21, 2019
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Outdated
Show resolved
Hide resolved
634cc64 to
f8c3f7f
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
Jenkins, retest this please. |
|
Test build #107992 has finished for PR 25184 at commit
|
|
Test build #108002 has finished for PR 25184 at commit
|
Member
|
Merged to master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Fix CSV datasource to throw
com.univocity.parsers.common.TextParsingExceptionwith large size message, which will make log output consume large disk space.This issue is troublesome when sometimes we need parse CSV with large size column.
This PR proposes to set CSV parser/writer settings by
setErrorContentLength(1000)to limit the error message length.How was this patch tested?
Manually.
Before:
The thrown message will include error content of about 30MB size (The column size exceed the max value 30MB, so the error content include the whole parsed content, so it is 30MB).
After:
The thrown message will include error content like "...aaa...aa" (the number of 'a' is 1024), i.e. limit the content size to be 1024.