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
spannertest: add support for row deletion policy #4782
Comments
@olavloite Can you please triage this issue? Thanks. |
@alethenorio Do you have an example of a DDL statement with a row deletion policy that does not work for you? I had a second look into this today, and it turns out that it is implemented:
|
@alethenorio Friendly ping. Do you have an example of a statement with a row deletion policy that does not work? |
@olavloite Thanks for the ping. Missed the first time around. The issue is when calling this API google-cloud-go/spanner/spannertest/inmem.go Line 270 in 25cd7a1
Which eventually ends up in this switch statement google-cloud-go/spanner/spannertest/db.go Line 257 in 25cd7a1
Which has a separate logic from spansql and does not support row deletion policies and instead return the default case of the switch. |
Is your feature request related to a problem? Please describe.
We use spannertest to build an inmemory database based on a set of DDLs however as spannertest does not have any support for row deletion policy, it will fail calls to
UpdateDDL
withunhandled DDL table alteration type spansql.AddRowDeletionPolicy
.Describe the solution you'd like
The simplest solution would be to allow row deletion policy DDLs to not fail
UpdateDDL
calls (just ignore the row deletion policy) which would allow for performing basic functionality such as querying and other updateDescribe alternatives you've considered
Alternative solutions could be to add actual support for row deletion policy (although given that the minimum is 1 day I am not sure how useful it is given the scope of spannertest). A configurable option allowing the user to choose to ignore row deletion policy and not fail
UpdateDDL
calls could also be an option.Additional context
The text was updated successfully, but these errors were encountered: