-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22146] FileNotFoundException while reading ORC files containing special characters #19368
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 2 commits
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 |
|---|---|---|
|
|
@@ -993,7 +993,6 @@ class MetastoreDataSourcesSuite extends QueryTest with SQLTestUtils with TestHiv | |
| spark.sql("""drop database if exists testdb8156 CASCADE""") | ||
| } | ||
|
|
||
|
|
||
| test("skip hive metadata on table creation") { | ||
| withTempDir { tempPath => | ||
| val schema = StructType((1 to 5).map(i => StructField(s"c_$i", StringType))) | ||
|
|
@@ -1345,6 +1344,17 @@ class MetastoreDataSourcesSuite extends QueryTest with SQLTestUtils with TestHiv | |
| } | ||
| } | ||
|
|
||
| Seq("orc", "parquet").foreach { format => | ||
|
||
| test(s"SPARK-22146: read files containing special characters using $format") { | ||
| val nameWithSpecialChars = s"sp&cial%chars" | ||
| withTempDir { dir => | ||
| val tmpFile = s"$dir/$nameWithSpecialChars" | ||
| spark.createDataset(Seq("a", "b")).write.format(format).save(tmpFile) | ||
| spark.read.format(format).load(tmpFile) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private def withDebugMode(f: => Unit): Unit = { | ||
| val previousValue = sparkSession.sparkContext.conf.get(DEBUG_MODE) | ||
| try { | ||
|
|
||
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.
The fix looks good to me.
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.
Ah I see, the URI is right but this isn't expecting a URI