Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bigtable): Add quotes to end of range #10488

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading