-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-11678] [SQL] Partition discovery should stop at the root path of the table. #9651
Changes from all commits
e406792
28a1227
df48220
1744624
89f21ba
d784a52
240bcf3
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 |
---|---|---|
|
@@ -294,7 +294,7 @@ class ParquetFilterSuite extends QueryTest with ParquetTest with SharedSQLContex | |
// If the "part = 1" filter gets pushed down, this query will throw an exception since | ||
// "part" is not a valid column in the actual Parquet file | ||
checkAnswer( | ||
sqlContext.read.parquet(path).filter("part = 1"), | ||
sqlContext.read.parquet(dir.getCanonicalPath).filter("part = 1"), | ||
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. Why do we need 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. path is a partition dir and if we load that single dir, I am not sure we should attach part as a column to your table. |
||
(1 to 3).map(i => Row(i, i.toString, 1))) | ||
} | ||
} | ||
|
@@ -311,7 +311,7 @@ class ParquetFilterSuite extends QueryTest with ParquetTest with SharedSQLContex | |
// If the "part = 1" filter gets pushed down, this query will throw an exception since | ||
// "part" is not a valid column in the actual Parquet file | ||
checkAnswer( | ||
sqlContext.read.parquet(path).filter("a > 0 and (part = 0 or a > 1)"), | ||
sqlContext.read.parquet(dir.getCanonicalPath).filter("a > 0 and (part = 0 or a > 1)"), | ||
(2 to 3).map(i => Row(i, i.toString, 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.
Considering
parsePartitions
asserts thatbasePaths.distinct.size == 1
, users should either provide abasePath
or passing only a single input path, right?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, actually the
basePaths
inparsePartitions
is completely something else with the same name.