Skip to content

fix(athena): apply max_results in list_query_executions when no workgroup is given - #3579

Open
abhishekacharya200 wants to merge 1 commit into
aws:mainfrom
abhishekacharya200:fix/athena-list-query-executions-max-results
Open

abhishekacharya200 wants to merge 1 commit into
aws:mainfrom
abhishekacharya200:fix/athena-list-query-executions-max-results

Conversation

@abhishekacharya200

Copy link
Copy Markdown
Contributor

Feature or Bugfix

  • Bugfix

Detail

  • In wr.athena.list_query_executions, the if max_results is not None block was nested inside if workgroup:, so when no workgroup was passed max_results never reached the MaxResults parameter. The first request returned a full page (up to 50 ids) regardless of max_results, and the result wasn't capped.
  • Moved the MaxResults assignment out of the workgroup block so it applies in both cases.
  • Added a mocked unit test in tests/unit/test_athena_mocked.py (workgroup None/set, max_results 3/60). The two no-workgroup cases fail without the change and pass with it.

Relates

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant