Skip to content

Commit

Permalink
fix(bigtable): Add quotes to end of range (#10488)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhshkh authored Jul 3, 2024
1 parent 0d0e5dd commit 142b153
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bigtable/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,9 @@ func (r RowRange) String() string {
var endStr string
switch r.endBound {
case rangeOpen:
endStr = r.end + ")"
endStr = strconv.Quote(r.end) + ")"
case rangeClosed:
endStr = r.end + "]"
endStr = strconv.Quote(r.end) + "]"
case rangeUnbounded:
endStr = "∞)"
}
Expand Down
10 changes: 5 additions & 5 deletions bigtable/bigtable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,22 +513,22 @@ func TestRowRangeString(t *testing.T) {
{
desc: "RowRange closed open",
rr: NewClosedOpenRange("a", "b"),
str: "[\"a\",b)",
str: "[\"a\",\"b\")",
},
{
desc: "RowRange open open",
rr: NewOpenRange("c", "d"),
str: "(\"c\",d)",
str: "(\"c\",\"d\")",
},
{
desc: "RowRange closed closed",
rr: NewClosedRange("e", "f"),
str: "[\"e\",f]",
str: "[\"e\",\"f\"]",
},
{
desc: "RowRange open closed",
rr: NewOpenClosedRange("g", "h"),
str: "(\"g\",h]",
str: "(\"g\",\"h\"]",
},
{
desc: "RowRange unbound unbound",
Expand All @@ -543,7 +543,7 @@ func TestRowRangeString(t *testing.T) {
{
desc: "RowRange unbound closed",
rr: InfiniteReverseRange("c"),
str: "(∞,c]",
str: "(∞,\"c\"]",
},
} {
t.Run(test.desc, func(t *testing.T) {
Expand Down

0 comments on commit 142b153

Please sign in to comment.