Skip to content

feat(spanner): support for enum columns as keys, index and integration tests#7091

Merged
harshachinta merged 3 commits intogoogleapis:proto-column-enhancement-alphafrom
harshachinta:handling_pq_pk_indexes
Dec 1, 2022
Merged

feat(spanner): support for enum columns as keys, index and integration tests#7091
harshachinta merged 3 commits intogoogleapis:proto-column-enhancement-alphafrom
harshachinta:handling_pq_pk_indexes

Conversation

@harshachinta
Copy link
Copy Markdown
Contributor

@harshachinta harshachinta commented Nov 23, 2022

This PR has the following changes,

  1. Adds support for Enum columns in primary key and indexes.
  2. Integration tests for Parameter Binding.
  3. Integration tests for Proto fields and Enum columns as Primary keys.
  4. Integration tests for Proto fields and Enum columns as Indexes.

… parameterized queries, primary key and indexes
@harshachinta harshachinta requested review from a team November 23, 2022 18:23
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the Spanner API. labels Nov 23, 2022
Copy link
Copy Markdown

@Shua1 Shua1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please split the parameter binding part.
  2. It seems more accurate, in the descriptor of the PR, to say "support for enum columns..." instead of "support for proto columns".

@harshachinta harshachinta changed the title feat(spanner): support for proto columns as keys, index, parameters feat(spanner): support for enum columns as keys, index, parameters Nov 30, 2022
@harshachinta
Copy link
Copy Markdown
Contributor Author

  1. Please split the parameter binding part.
  2. It seems more accurate, in the descriptor of the PR, to say "support for enum columns..." instead of "support for proto columns".
  1. Updated the PR description to make the changes more clearer. As the test for parameter binding is small, raising a separate PR for that would not be useful.
  2. Updated the title of the PR.

Copy link
Copy Markdown

@Shua1 Shua1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says: "support for enum columns as keys, index, parameters".

But we are not adding support for parameters. Right? Please update.

@harshachinta harshachinta changed the title feat(spanner): support for enum columns as keys, index, parameters feat(spanner): support for enum columns as keys, index Dec 1, 2022
@harshachinta harshachinta changed the title feat(spanner): support for enum columns as keys, index feat(spanner): support for enum columns as keys, index and integration tests Dec 1, 2022
@harshachinta
Copy link
Copy Markdown
Contributor Author

harshachinta commented Dec 1, 2022

The PR description says: "support for enum columns as keys, index, parameters".

But we are not adding support for parameters. Right? Please update.

Updated the description. Thanks for the review comments, @Shua1

@harshachinta harshachinta merged commit 8a13b71 into googleapis:proto-column-enhancement-alpha Dec 1, 2022
harshachinta added a commit that referenced this pull request May 7, 2024
* feat(spanner): add support for Proto Columns (#6886)

* feat(spanner): Adding support for Proto Message and Proto Enum

* feat(spanner): Add license header to new files

* code refactoring and additional checks

* nit: code changes

* go.mod update to prevent failing builds

* go.mod update to prevent failing builds

* go.mod and build_samples.sh update to prevent failing builds

* revert back grpc version

* revert back changes

* Using standard Singers example, refactoring redundant code

* code and proto refactoring

* Add proto_type_fqn for Proto Message and Proto Enum

* code refactoring

* go mod tidy: go.mod and go.sum version updates

* add changes to support compatibility between Int64 and Enum & compatibility between Bytes and Proto

* Revert "go mod tidy: go.mod and go.sum version updates"

This reverts commit 484b00c.

* add Integration Tests for Proto Message, Proto Enum, compatibility tests

* code refactoring

* code refactoring

* add unit tests for nil proto types

* Add error when nil proto message or nil enum is passed

* feat(spanner): add support for handling null value in Proto columns (#6954)

* feat(spanner): add support for handling null value in Proto columns

* code refactor: get protoTypeFqn from user defined nil types

* code refactoring

* code refactoring

* code refactoring

* code refactoring

* Add tests for MarshalJSON and UnmarshalJSON methods

* refactoring test file

* code refactoring

* feat(spanner): add support for Array of Proto columns (#7014)

* feat(spanner): add support for array of proto columns

* refactoring comments and added negative test cases while reading array of protos

* change decoding logic of handling array of proto columns

* feat(spanner): add support for handling null values in array of proto columns (#7042)

* feat(spanner): add support for handling null values in Array of Proto Columns

* add comments for code readability

* nit: change in error message

* feat(spanner): Modify configuration for integration test and add license header (#7059)

* feat(spanner): update go-genproto dependency (#7066)

* feat(spanner): support for enum columns as keys, index and integration tests (#7091)

* feat(spanner): support for proto columns as primary key and tests for parameterized queries, primary key and indexes

* feat(spanner): close read-only transaction to prevent session leak

* feat(spanner): update table schema to have GPK on proto field

* feat(spanner): add proto changes to support proto columns feature

* feat(spanner): remove gen-proto dep overwrite for proto column support

* feat(spanner): remove gen-proto dep overwrite from kokoro build

* feat(spanner): reset array of proto, enum when null from database (#7176)

* feat(spanner): reset array of proto, enum when null from database

* feat(spanner): fix license header to fix vet.sh build

* feat(spanner): fix proto generated file to fix vet.sh build

* feat(spanner): organize imports to fix vet.sh build

* feat(spanner): golint changes to fix vet.sh build

* feat(spanner): add support for Proto column DDL (#7292)

* feat(spanner): add proto changes for Proto Columns DDL support

* feat(spanner): add Proto descriptor file and integration tests for Proto DDL feature

* feat(spanner): skip pg tests and code refactoring for proto ddl

* feat(spanner): rename NewDatabaseAdminRESTClient to NewDatabaseAdminClient due to visibility label issue fix

* feat(spanner): remove hardcoded cloud-devel host

* feat(spanner): remove hardcoded project id

* feat(spanner): revert autogenerated code

* feat(spanner): just to validate integration tests running

* feat(spanner): change copyright year

* feat(spanner): set project id for integration tests

* feat(spanner): use jsoniter instead of json for marshal and unmarshal

* feat(spanner): revert presubmit.sh changes

* chore(spanner): run integration tests in presubmit

* chore(spanner): revert presubmit.sh changes

* feat(spanner): fix json

---------

Co-authored-by: rahul2393 <irahul@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants