Enable hive splits for uncompressed JSON files with S3 Select pushdown#14040
Merged
arhimondr merged 1 commit intotrinodb:masterfrom Sep 20, 2022
Merged
Enable hive splits for uncompressed JSON files with S3 Select pushdown#14040arhimondr merged 1 commit intotrinodb:masterfrom
arhimondr merged 1 commit intotrinodb:masterfrom
Conversation
fuatbasik
approved these changes
Sep 8, 2022
preethiratnam
approved these changes
Sep 8, 2022
Contributor
preethiratnam
left a comment
There was a problem hiding this comment.
Overall looks good, left some nitpicks below.
plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/S3SelectTestHelper.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/S3SelectTestHelper.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/S3SelectTestHelper.java
Outdated
Show resolved
Hide resolved
...test/java/io/trino/plugin/hive/s3select/TestHiveFileSystemS3SelectCsvPushdownWithSplits.java
Outdated
Show resolved
Hide resolved
...est/java/io/trino/plugin/hive/s3select/TestHiveFileSystemS3SelectJsonPushdownWithSplits.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/csv/S3SelectCsvRecordReader.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestS3SelectPushdown.java
Outdated
Show resolved
Hide resolved
Contributor
|
nit : Commit comment |
findinpath
reviewed
Sep 12, 2022
plugin/trino-hive-hadoop2/conf/files/test_table_json_scan_range_select_pushdown_1.json
Outdated
Show resolved
Hide resolved
findinpath
reviewed
Sep 12, 2022
Contributor
findinpath
left a comment
There was a problem hiding this comment.
Looks good overall. Try splitting the PR in multiple commits for an easier review/maintenance.
plugin/trino-hive/src/main/java/io/trino/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectLineRecordReader.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectLineRecordReader.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/S3SelectPushdown.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/s3select/csv/S3SelectCsvRecordReader.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3select/TestS3SelectPushdown.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/S3SelectTestHelper.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/s3select/S3SelectTestHelper.java
Outdated
Show resolved
Hide resolved
c0774ff to
b6a84a2
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 uncompressed JSON input.
arhimondr
approved these changes
Sep 20, 2022
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
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. Support for CSV input files was added in revision 0b8d11c. This change enables hive internal splits for S3 Select uncompressed JSON input.
Documentation updates will come in a separate PR, as this is already quite large.
Non-technical explanation
Trino client will return results faster when S3 Select pushdown is enabled for uncompressed JSON files:
set SESSION hive.s3_select_pushdown_enabled=true;
Release notes
( ) This is not user-visible and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: