Add S3 Select scan range support for uncompressed input#18946
Merged
pettyjamesm merged 1 commit intoprestodb:masterfrom Mar 1, 2023
Merged
Add S3 Select scan range support for uncompressed input#18946pettyjamesm merged 1 commit intoprestodb:masterfrom
pettyjamesm merged 1 commit intoprestodb:masterfrom
Conversation
dbbdbaa to
60aaa22
Compare
e922dcd to
1cf1a75
Compare
pettyjamesm
reviewed
Jan 26, 2023
Contributor
pettyjamesm
left a comment
There was a problem hiding this comment.
A few issues I spotted in addition to the specific comments here:
- We should add a test for the splits generated for a Bzip2Compressor compressed JSON file, because that would have been marked as "splittable" by
InternalHiveSplitFactorylogic but should not be as far as I understand the S3Select limitations - Not added in this or the earlier PR's but
S3SelectLineRecordReaderis marked@Threadsafebut it definitely is not, with lots of internal unsynchronized mutation of fields- we should remove that annotation.
presto-hive/src/main/java/com/facebook/presto/hive/StoragePartitionLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveFileSystem.java
Outdated
Show resolved
Hide resolved
.../java/com/facebook/presto/hive/s3select/TestHiveFileSystemS3SelectCsvPushdownWithSplits.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectLineRecordReader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectLineRecordReader.java
Outdated
Show resolved
Hide resolved
Contributor
|
@dnanuti Thanks for your contributions, do you think we can address the feedback, we can target this feature for next release. |
Author
Hey! Thanks for the update. This was de-prioritized on our side, but I'll try to update it by the end of the week. Hope this fits your schedule. |
7261a29 to
416f89f
Compare
pettyjamesm
reviewed
Feb 6, 2023
presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectCsvRecordReader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/com/facebook/presto/hive/StoragePartitionLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectJsonRecordReader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/com/facebook/presto/hive/s3select/TestS3SelectPushdown.java
Outdated
Show resolved
Hide resolved
e4d28ba to
b79cf19
Compare
ef1c118 to
e606131
Compare
Scan range allows S3 Select to query uncompressed files at a finer granularity than the entire object, by providing a byte range to SelectObjectContent requests. This change enables Hive internal splits for S3 Select pushdown on uncompressed input using this feature.
27ae270 to
b6f2e45
Compare
pettyjamesm
approved these changes
Feb 28, 2023
Contributor
pettyjamesm
left a comment
There was a problem hiding this comment.
LGTM with the latest changes
Contributor
|
Merged, thanks @dnanuti for the contribution! |
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.
Test plan - Locally tested (including Select logs) and added Docker tests.
Scan range allows S3 Select to query uncompressed files at a finer granularity than the entire object, by providing a byte range to SelectObjectContent requests. This change enables Hive internal splits for S3 Select pushdown on uncompressed input using this feature.
JSON Tests:
CSV tests: