Handle empty directories with content-type application/octet-stream also as directories#20603
Merged
imjalpreet merged 1 commit intoprestodb:masterfrom Aug 23, 2023
Merged
Conversation
tdcmeehan
approved these changes
Aug 21, 2023
kiersten-stokes
approved these changes
Aug 22, 2023
Contributor
kiersten-stokes
left a comment
There was a problem hiding this comment.
Tested and confirmed that this fixes the issue - LGTM!
Member
Author
|
Thank you @tdcmeehan and @kiersten-stokes for reviewing the PR. I will go ahead and merge. |
54 tasks
6 tasks
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.
Description
Certain systems create empty directories with content-type as
application/octet-streamrather thanapplication/x-directorydue to which we see failures when trying to create an external table on top of such directories as Presto does not recognize them as directories.Motivation and Context
Fixes #20310
Impact
This PR will allow Presto to recognize such directories
Test Plan
Tested the fix with Minio.
Before this fix, got the below error while trying to create an external table with the location as an empty directory in Minio
After the fix, create table ran successfully on the same empty directory:
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.