Skip to content

Commit

Permalink
ensure order for variadic query args
Browse files Browse the repository at this point in the history
  • Loading branch information
a-urth authored and hashhar committed Dec 29, 2021
1 parent e5fe10e commit e44eaab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trino/trino.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import (
"net/http"
"net/url"
"regexp"
"sort"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -203,6 +204,10 @@ func (c *Config) FormatDSN() (string, error) {
}
}

// ensure consistent order of items
sort.Strings(sessionkv)
sort.Strings(credkv)

for k, v := range map[string]string{
"catalog": c.Catalog,
"schema": c.Schema,
Expand Down

0 comments on commit e44eaab

Please sign in to comment.