Skip to content

Commit c7f5add

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

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
@@ -150,6 +150,20 @@ decimal values without the possibility of data loss.
150150

151151
Spanner doesn't have these functions.
152152

153+
### Computations that yield FLOAT64 values can't be assigned to INT64 columns
154+
155+
Spanner [doesn't support this](https://github.com/googleapis/python-spanner-django/issues/331).
156+
157+
For example, if `integer` is `IntegerField`:
158+
159+
```
160+
>>> ExampleModel.objects.update(integer=F('integer') / 2)
161+
...
162+
django.db.utils.ProgrammingError: 400 Value of type FLOAT64 cannot be
163+
assigned to integer, which has type INT64 [at 1:46]\nUPDATE
164+
example_model SET integer = (example_model.integer /...
165+
```
166+
153167
## How it works
154168

155169
### Overall design

0 commit comments

Comments
 (0)