feat(bigtable): support update column family's value type to non-aggregate type#10410
Merged
bhshkh merged 13 commits intogoogleapis:mainfrom Jul 1, 2024
Merged
feat(bigtable): support update column family's value type to non-aggregate type#10410bhshkh merged 13 commits intogoogleapis:mainfrom
bhshkh merged 13 commits intogoogleapis:mainfrom
Conversation
Contributor
|
Add integration test |
bhshkh
reviewed
Jun 25, 2024
| } | ||
|
|
||
| func (ac *AdminClient) setValueTypeImpl(ctx context.Context, table, family string, valueType Type) error { | ||
| if _, ok := valueType.proto().GetKind().(*btapb.Type_AggregateType); ok { |
Contributor
Author
There was a problem hiding this comment.
is it needed? valueType is Type and not pointer to Type so it should always be non-null, right?
Contributor
There was a problem hiding this comment.
In the test, i passed nil
err := c.SetValueType(context.Background(), "My-table", "cf1", nil)
if err != nil && !test.hasError {
t.Fatalf("Unexpected error when setting type: %v", err)
}
and I don't get any compile time error but see a panic when test is run:
--- FAIL: TestTableAdmin_SetType (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10d7942]
goroutine 10 [running]:
testing.tRunner.func1.2({0x129d780, 0x2139e20})
/usr/lib/google-golang/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
/usr/lib/google-golang/src/testing/testing.go:1634 +0x377
panic({0x129d780?, 0x2139e20?})
/usr/lib/google-golang/src/runtime/panic.go:759 +0x132
cloud.google.com/go/bigtable.(*AdminClient).setValueTypeImpl(0xc000138c80, {0x16876d0, 0x21a42c0}, {0x14e794e, 0x8}, {0x14e3557, 0x3}, {0x0, 0x0})
/usr/local/google/home/bahaaiman/Documents/cfdb-workspace-01/hoang/google-cloud-go/bigtable/admin.go:711 +0x62
cloud.google.com/go/bigtable.(*AdminClient).SetValueType(...)
/usr/local/google/home/bahaaiman/Documents/cfdb-workspace-01/hoang/google-cloud-go/bigtable/admin.go:739
cloud.google.com/go/bigtable.TestTableAdmin_SetType(0xc000124820)
/usr/local/google/home/bahaaiman/Documents/cfdb-workspace-01/hoang/google-cloud-go/bigtable/admin_test.go:433 +0x205
testing.tRunner(0xc000124820, 0x1556ea0)
/usr/lib/google-golang/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 1
/usr/lib/google-golang/src/testing/testing.go:1742 +0x390
FAIL cloud.google.com/go/bigtable 0.156s
FAIL
Contributor
Author
Done: |
bhshkh
approved these changes
Jun 27, 2024
bhshkh
added a commit
to bhshkh/google-cloud-go
that referenced
this pull request
Jul 22, 2024
…non-aggregate type (googleapis#10410)" This reverts commit df60464.
eliben
pushed a commit
to eliben/google-cloud-go
that referenced
this pull request
Jul 23, 2024
…non-aggregate type (googleapis#10410)" (googleapis#10576) This reverts commit df60464.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGIN_COMMIT_OVERRIDE
chore(bigtable): reverted Support update column family's value type to non-aggregate type
END_COMMIT_OVERRIDE