Conversation
DataFusion's `LOCATION` seems to drop the query string in HTTP URLs, so, to hack around that, URI-encode the whole string and decode it on the other end.
Pre-signed S3 URLs can only work with a `HEAD` or a `GET` request, but not both at the same time. As a workaround, if we get a 403 in response to a `HEAD`, try sending a `GET` request with a zero range. The response should have a `Content-Range` header showing the total length of the resource, which we report back to DataFusion.
If our HTTP URL has a query string, it won't end with an actual file extension. DataFusion's `ListingTable` filters by the extension by default (useful when scanning through a directory where some files aren't part of the table). To fix this, disable this feature when using HTTP (since we can't scan through a directory in HTTP anyway). Also extend the e2e HTTP test to have a query string in it (ignored by the mock, but exercises this workaround).
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.
Fix several issues that make it impossible to query Parquet/CSV/JSON files from a pre-signed S3 URL.