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

[SPARK-22516][SQL] Bump up Univocity version to 2.5.9 #19906

Closed
wants to merge 1 commit into from

Conversation

smurakozi
Copy link
Contributor

What changes were proposed in this pull request?

There was a bug in Univocity Parser that causes the issue in SPARK-22516. This was fixed by upgrading from 2.5.4 to 2.5.9 version of the library :

Executing

spark.read.option("header","true").option("inferSchema", "true").option("multiLine", "true").option("comment", "g").csv("test_file_without_eof_char.csv").show()

Before

ERROR Executor: Exception in task 0.0 in stage 6.0 (TID 6)
com.univocity.parsers.common.TextParsingException: java.lang.IllegalArgumentException - Unable to skip 1 lines from line 2. End of input reached
...
Internal state when error was thrown: line=3, column=0, record=2, charIndex=31
	at com.univocity.parsers.common.AbstractParser.handleException(AbstractParser.java:339)
	at com.univocity.parsers.common.AbstractParser.parseNext(AbstractParser.java:475)
	at org.apache.spark.sql.execution.datasources.csv.UnivocityParser$$anon$1.next(UnivocityParser.scala:281)
	at scala.collection.Iterator$$anon$11.next(Iterator.scala:409)

After

+-------+-------+
|column1|column2|
+-------+-------+
|    abc|    def|
+-------+-------+

How was this patch tested?

The already existing CSVSuite.commented lines in CSV data test was extended to parse the file also in multiline mode. The test input file was modified to also include a comment in the last line.

@HyukjinKwon
Copy link
Member

ok to test

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -4,3 +4,4 @@
6,7,8,9,0,2015-08-21 16:58:01
~0,9,8,7,6,2015-08-22 17:59:02
1,2,3,4,5,2015-08-23 18:00:42
~ comment in last line to test SPARK-22516 - do not add empty line at the end of this file!
Copy link
Member

Choose a reason for hiding this comment

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

nice

@SparkQA
Copy link

SparkQA commented Dec 6, 2017

Test build #84539 has finished for PR 19906 at commit 8bc6a9c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Dec 6, 2017

Test build #84549 has finished for PR 19906 at commit 8bc6a9c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Dec 6, 2017

LGTM, merging to master.

@asfgit asfgit closed this in 9948b86 Dec 6, 2017
@smurakozi
Copy link
Contributor Author

Thanks for your help and reviews @HyukjinKwon, @vanzin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants