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

bigtable: rowFilter.String() v1.21.0 do not include quotes in the endBound part #9448

Open
jfyhn opened this issue Feb 21, 2024 · 1 comment
Assignees
Labels
api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jfyhn
Copy link

jfyhn commented Feb 21, 2024

After change in file bigtable .go, func (r RowRange) String() string { in #8755
I get
["test#feab3187-a4ac-4ab4-b47c-238792f9be98#",test#feab3187-a4ac-4ab4-b47c-238792f9be98$)
instead of
["test#feab3187-a4ac-4ab4-b47c-238792f9be98#","test#feab3187-a4ac-4ab4-b47c-238792f9be98$")

in the output string

Environment
Get this on all, tested on local windows PC

Go Environment
go version go1.21.4 windows/amd64

PS C:\sandbox\techyon\timeseries> go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\fyhnj\AppData\Local\go-build
set GOENV=C:\Users\fyhnj\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\fyhnj\go\pkg\mod
set GONOPROXY=github.com/techyon-io
set GONOSUMDB=github.com/techyon-io
set GOOS=windows
set GOPATH=C:\Users\fyhnj\go
set GOPRIVATE=github.com/techyon-io
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:/Program Files/Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.4
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\sandbox\techyon\timeseries\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\fyhnj\AppData\Local\Temp\go-build2435872685=/tmp/go-build -gno-record-gcc-switches

Code
package bigtable
file bigtable .go
func (r RowRange) String() string {

Expected behavior
for rowrange from test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190326# to test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190330#

expected: "["test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190326#","test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190330#")"

Actual behavior
for rowrange from test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190326# to test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190330#
actual : "["test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190326#",test#feab3187-a4ac-4ab4-b47c-238792f9be98#20190330#)"

Additional context
Started after upgrading to v1.21.0 .
change in https://github.com/googleapis/google-cloud-go/pull/8755/files

@jfyhn jfyhn added the triage me I really want to be triaged. label Feb 21, 2024
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Feb 21, 2024
@jfyhn
Copy link
Author

jfyhn commented Feb 21, 2024

To be even more specific, I think strconv.Quote() should be added to r.end and not just r.start in the function:

// String provides a printable description of a RowRange.
func (r RowRange) String() string {
	var startStr string
	switch r.startBound {
	case rangeOpen:
		startStr = "(" + strconv.Quote(r.start)
	case rangeClosed:
		startStr = "[" + strconv.Quote(r.start)
	case rangeUnbounded:
		startStr = "(∞"
	}
	var endStr string
	switch r.endBound {
	case rangeOpen:
		endStr = r.end + ")"
	case rangeClosed:
		endStr = r.end + "]"
	case rangeUnbounded:
		endStr = "∞)"
	}

	return fmt.Sprintf("%s,%s", startStr, endStr)
}

@codyoss codyoss added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants