-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-39910][SQL] Delegate path qualification to filesystem during DataSource file path globbing #43463
[SPARK-39910][SQL] Delegate path qualification to filesystem during DataSource file path globbing #43463
Changes from all 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
%2F dir 1707380620211+493+tigrulya+hadoop 0 0 test.csv | ||
%2Ftest.csv file part-0 0 6 1707380620197+420+tigrulya+hadoop |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
3 | ||
0 1948547033 0 119 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1 | ||
2 | ||
3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1363,4 +1363,12 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSparkSession with | |
} | ||
} | ||
} | ||
|
||
test("SPARK-39910: read files from Hadoop archives") { | ||
val fileSchema = new StructType().add("str", StringType) | ||
val harPath = testFile("test-data/test-archive.har") | ||
.replaceFirst("file:/", "har:/") | ||
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. So Spark works with 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. Yes, the |
||
|
||
testRead(spark.read.schema(fileSchema).csv(s"$harPath/test.csv"), data, fileSchema) | ||
} | ||
} |
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.
is this change needed?
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.
Yes, if we don't override this method, then path check inside
fs.makeQualified(path)
will fail, because it expects path withfile://
scheme (MockFileSystem
inheritsRawLocalFileSystem
)