Skip to content

Determine correct behavior for Row.get("column", Integer.class) #276

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

Closed
elefeint opened this issue Sep 28, 2020 · 0 comments · Fixed by #286
Closed

Determine correct behavior for Row.get("column", Integer.class) #276

elefeint opened this issue Sep 28, 2020 · 0 comments · Fixed by #286
Assignees
Labels
feature New functionality P2
Milestone

Comments

@elefeint
Copy link
Contributor

Cloud Spanner only has INT64, a long. The current V2 behavior is to ignore the requested type and instead only use the type of the retrieved column to decode the value.

In V1, retrieving an Integer column value was supported.

Should we support retrieving integers if the user requested an Integer explicitly? Likely yes, with exceptions thrown if the returned INT64 value does not fit into an integer. The alternative would be to disallow this scenario, but that's a regression from V1.

@elefeint elefeint added this to the 0.3.0 milestone Sep 28, 2020
@elefeint elefeint added feature New functionality P2 labels Oct 6, 2020
elefeint added a commit that referenced this issue Oct 23, 2020
Remove TCK test overrides that were necessary due to DML syntax requiring column list in Spanner.

R2DBC SPI 0.8.3 containing the TCK changes was released. I also upgraded Reactor to the same version that's in SPI.

There are still two reasons for overrides:
1) Spanner returning `Long` even when `Integer` is requested -- work tracked in #276.
2) the driver breaking R2DBC spec by treating columns as case insensitive -- decision pending on #271.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants