feat: support newer GetQueryExecution response fields#708
Merged
Conversation
Add the following fields to AthenaQueryExecution, all introduced to the GetQueryExecution response over the past two years and not previously exposed by PyAthena: Statistics: - service_pre_processing_time_in_millis - dpu_count Top-level: - managed_query_results_enabled / managed_query_results_kms_key - enable_s3_access_grants / create_user_level_prefix / s3_access_grants_authentication_type Bump boto3 to >=1.38.2 and botocore to >=1.41.2 (Nov 2025) so that all new fields are actually populated by the SDK. Earlier versions would silently return None for the newest field (DpuCount), which would be misleading. Refs #707
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.
WHAT
Add the following fields to
AthenaQueryExecutioninpyathena/model.py, all introduced to theGetQueryExecutionresponse since the class was last extended:Statistics:service_pre_processing_time_in_millis—ServicePreProcessingTimeInMillis(botocore 1.32.3)dpu_count—DpuCount, per-query DPU usage exposed alongside the 2025-11 Capacity Reservations enhancements (botocore 1.41.2)Top-level configuration:
managed_query_results_enabled/managed_query_results_kms_key—ManagedQueryResultsConfigurationfor the Managed Query Results feature released 2025-06 (botocore 1.38.28)enable_s3_access_grants/create_user_level_prefix/s3_access_grants_authentication_type—QueryResultsS3AccessGrantsConfigurationfor S3 Access Grants integrationAlso bumps
boto3>=1.38.2andbotocore>=1.41.2(Nov 2025 releases) so all new fields are actually populated by the SDK.WHY
These fields are returned by current boto3 versions but PyAthena was silently dropping them. Exposing them improves observability (extra timing buckets, DPU usage) and unblocks users adopting Managed Query Results and S3 Access Grants.
The lower-bound bump is conservative: without it the new properties would silently return
Noneeven when the user has the latest SDK and Athena returns the data. Tying the floor to the SDK release that actually servesDpuCountkeeps the contract honest.Closes #707