Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
fix: compare trimmed query string
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed Feb 10, 2022
1 parent bd2d334 commit e432d81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/s3spanstore/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ func (r *Reader) queryAthenaCached(ctx context.Context, queryString string, ttl

latestCompletionDateTime := time.Now()
latestQueryExecutionId := ""
trimmedQueryString := strings.TrimSpace(queryString)

for _, value := range queryExecutionIdChunks {
value := value
Expand All @@ -348,7 +349,7 @@ func (r *Reader) queryAthenaCached(ctx context.Context, queryString string, ttl

for _, v := range result.QueryExecutions {
// Different query
if *v.Query != queryString {
if *v.Query != trimmedQueryString {
continue
}

Expand Down

0 comments on commit e432d81

Please sign in to comment.