[SPARK-34075][SQL][CORE] Hidden directories are being listed for partition inference#31169
Closed
gengliangwang wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-34075][SQL][CORE] Hidden directories are being listed for partition inference#31169gengliangwang wants to merge 2 commits intoapache:masterfrom
gengliangwang wants to merge 2 commits intoapache:masterfrom
Conversation
Member
Author
|
Test build #134009 has finished for PR 31169 at commit
|
HyukjinKwon
approved these changes
Jan 13, 2021
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #134011 has finished for PR 31169 at commit
|
sunchao
approved these changes
Jan 13, 2021
Member
sunchao
left a comment
There was a problem hiding this comment.
LGTM - good catch and sorry for introducing this regression!
Member
|
It's alrighty, @sunchao. Merged to master and branch-3.1. |
HyukjinKwon
pushed a commit
that referenced
this pull request
Jan 14, 2021
…ition inference ### What changes were proposed in this pull request? Fix a regression from #29959. In Spark, the following file paths are considered as hidden paths and they are ignored on file reads: 1. starts with "_" and doesn't contain "=" 2. starts with "." However, after the refactoring PR #29959, the hidden paths are not filtered out on partition inference: https://github.com/apache/spark/pull/29959/files#r556432426 This PR is to fix the bug. To archive the goal, the method `InMemoryFileIndex.shouldFilterOut` is refactored as `HadoopFSUtils.shouldFilterOutPathName` ### Why are the changes needed? Bugfix ### Does this PR introduce _any_ user-facing change? Yes, it fixes a bug for reading file paths with partitions. ### How was this patch tested? Unit test Closes #31169 from gengliangwang/fileListingBug. Authored-by: Gengliang Wang <gengliang.wang@databricks.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> (cherry picked from commit 467d758) Signed-off-by: HyukjinKwon <gurwls223@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Fix a regression from #29959.
In Spark, the following file paths are considered as hidden paths and they are ignored on file reads:
However, after the refactoring PR #29959, the hidden paths are not filtered out on partition inference: https://github.com/apache/spark/pull/29959/files#r556432426
This PR is to fix the bug. To archive the goal, the method
InMemoryFileIndex.shouldFilterOutis refactored asHadoopFSUtils.shouldFilterOutPathNameWhy are the changes needed?
Bugfix
Does this PR introduce any user-facing change?
Yes, it fixes a bug for reading file paths with partitions.
How was this patch tested?
Unit test