Sfoglia il codice sorgente

Merge pull request #2161 from opencost/sean/add-athena-pagination

set max results param for athena pagination
Ajay Tripathy 2 anni fa
parent
commit
130415a827
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      pkg/cloud/aws/athenaquerier.go

+ 2 - 0
pkg/cloud/aws/athenaquerier.go

@@ -126,8 +126,10 @@ func (aq *AthenaQuerier) queryAthenaPaginated(ctx context.Context, query string,
 	if err != nil {
 		return fmt.Errorf("QueryAthenaPaginated: query execution error: %s", err.Error())
 	}
+	var maxResults int32 = 10000
 	queryResultsInput := &athena.GetQueryResultsInput{
 		QueryExecutionId: startQueryExecutionOutput.QueryExecutionId,
+		MaxResults:       &maxResults,
 	}
 	getQueryResultsPaginator := athena.NewGetQueryResultsPaginator(cli, queryResultsInput)
 	for getQueryResultsPaginator.HasMorePages() {