-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29786][SQL] Fix MetaException when dropping a partition not exists on HDFS #26422
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
Closed
Deegue
wants to merge
14
commits into
apache:master
from
Deegue:fix_empty_partition_InvalidInputException
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
90233e4
Merge pull request #1 from apache/master
Deegue 7a246d5
Merge pull request #2 from apache/master
Deegue 783211f
Merge pull request #3 from apache/master
Deegue 355496e
Fix drop partition MetaException:File does not exist.
Deegue 74d5984
Add notes.
Deegue 84b1da8
1584531350
Deegue 248b6cf
UT failed #119927, getDataLocation->getPartitionPath
Deegue c20c390
UT failed #120076, add HIDDEN_FILES_PATH_FILTER
Deegue 9d75854
optimize
Deegue 5a5ff74
UT failed #120087. Hive-0.13 doesn't have `Partition.getPartitionPath…
Deegue f4b3793
UT failed #120093, purge and ignoreIfNotExists should be false.
Deegue 4d1c35e
isEmptyPath->isExistPath
Deegue 7cf7c6b
remove redundant code
Deegue f8b96de
restore '!'
Deegue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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 how hive resolve the problem?
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, It's the same method as Hive uses.
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.
Isn't it bad for performance? i.e. you call
fs.existsandfs.listStatusfor each partition.Uh oh!
There was an error while loading. Please reload this page.
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, but only affect
drop partitions. I think it's necessary and won't take much time to do the check while dropping.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.
Can you point to the Hive source code that does the same thing? i.e. create a dummy directory before dropping the partition.
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.
In Hive 1.x, it's like this.
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 it for DROP PARTITION?
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.
No, it will check every query before executing. Maybe it's better to do the check before all queries?
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.
Does Spark have a problem to do table scan when partition directory not exist?
Uh oh!
There was an error while loading. Please reload this page.
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.
It's related to #24668, and controlled by
spark.sql.files.ignoreMissingFiles.Spark will check it when listing leaf files.