-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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-23049][SQL] spark.sql.files.ignoreCorruptFiles
should work for ORC files
#20240
Conversation
@@ -608,4 +609,33 @@ class OrcQuerySuite extends OrcQueryTest with SharedSQLContext { | |||
} | |||
} | |||
} | |||
|
|||
test("Enabling/disabling ignoreCorruptFiles") { |
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.
This has the same test coverage with a Parquet test case.
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.
How about hive.orc format?
new Path(basePath, "third").toString) | ||
checkAnswer( | ||
df, | ||
Seq(Row(0), Row(1))) |
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.
Could we make this inlined?
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.
Oh, thank you for review, @HyukjinKwon .
It comes from Parquet test suite. So, I keep the same shape so far.
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.
I'll inline it together.
} | ||
} catch { | ||
case e: org.apache.orc.FileFormatException => | ||
if (true) { |
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.
if true
...?
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.
Oops. My bad.
Test build #85995 has finished for PR 20240 at commit
|
Hi, @gatorsmile and @cloud-fan . |
Test build #85999 has finished for PR 20240 at commit
|
Retest this please. |
Test build #86014 has finished for PR 20240 at commit
|
Retest this please |
Test build #86038 has finished for PR 20240 at commit
|
Retest this please |
Test build #86047 has finished for PR 20240 at commit
|
Retest this please. |
Test build #86055 has finished for PR 20240 at commit
|
Retest this please. |
Test build #86079 has finished for PR 20240 at commit
|
testIgnoreCorruptFiles() | ||
} | ||
|
||
withSQLConf(SQLConf.IGNORE_CORRUPT_FILES.key -> "false") { |
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.
Could we have a test case when the schema is explicitly set too while we are here?
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.
Sure. I'll update Parquet test case together in order to keep the same test coverage.
LGTM otherwise. |
We need to address both ORC formats. |
Thank you for review, @gatorsmile . Sure! |
Test build #86098 has finished for PR 20240 at commit
|
Test build #86102 has finished for PR 20240 at commit
|
Test build #86107 has finished for PR 20240 at commit
|
Hi, @HyukjinKwon and @gatorsmile . |
LGTM |
…or ORC files ## What changes were proposed in this pull request? When `spark.sql.files.ignoreCorruptFiles=true`, we should ignore corrupted ORC files. ## How was this patch tested? Pass the Jenkins with a newly added test case. Author: Dongjoon Hyun <[email protected]> Closes #20240 from dongjoon-hyun/SPARK-23049. (cherry picked from commit 9a96bfc) Signed-off-by: Wenchen Fan <[email protected]>
thanks, merging to master/2.3! |
Thank you so much for considering this at the last minute! @cloud-fan , @HyukjinKwon , and @gatorsmile . |
What changes were proposed in this pull request?
When
spark.sql.files.ignoreCorruptFiles=true
, we should ignore corrupted ORC files.How was this patch tested?
Pass the Jenkins with a newly added test case.