Add openS3 Compatibility for AWS SDK v3 #64
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.
Without changing parameter list for openS3 function, allows the function to take as input required arguments for use with version 3 of the AWS SDK S3 client (S3Client, HeadObjectCommand, and GetObjectCommand).
Checks for existence of client.getObject (v2) in the client argument before attempting to destructure the client argument into an S3Client, HeadObjectCommand, and GetObjectCommand. The actual implementation is abstracted down from the ParquetReader class (called by the developer) to the ParquetEnvelopeReader class (called by ParquetReader).
The S3Client should be an instantiated client object, and the commands should be passed in just as they are after being destructured/modularized from the require statement. This allows for the ParquetEnvelopeReader class to set ranges on "getObject" calls for v3, as it does for v2 S3 clients (as command inputs are readonly in version 3 of the SDK and must be set per 'new' command). It also allows the developer to set middleware on their client if they wish.
The following example was added to README.md