Skip to content

Commit 83953be

Browse files
committed
document 'Computations that yield FLOAT64 values can't be assigned to INT64 columns' limitation
refs googleapis#331
1 parent 540ed84 commit 83953be

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,20 @@ decimal values without the possibility of data loss.
159159

160160
Spanner doesn't have these functions.
161161

162+
### Computations that yield FLOAT64 values can't be assigned to INT64 columns
163+
164+
Spanner [doesn't support this](https://github.com/googleapis/python-spanner-django/issues/331).
165+
166+
For example, if `integer` is `IntegerField`:
167+
168+
```
169+
>>> ExampleModel.objects.update(integer=F('integer') / 2)
170+
...
171+
django.db.utils.ProgrammingError: 400 Value of type FLOAT64 cannot be
172+
assigned to integer, which has type INT64 [at 1:46]\nUPDATE
173+
example_model SET integer = (example_model.integer /...
174+
```
175+
162176
## How it works
163177

164178
### Overall design

0 commit comments

Comments
 (0)