Skip to content

Commit b3c65d5

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

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

113113
Spanner doesn't have these functions.
114114

115+
### Computations that yield FLOAT64 values can't be assigned to INT64 columns
116+
117+
Spanner [doesn't support this](https://github.com/googleapis/python-spanner-django/issues/331).
118+
119+
For example, if `integer` is `IntegerField`:
120+
121+
```
122+
>>> ExampleModel.objects.update(integer=F('integer') / 2)
123+
...
124+
django.db.utils.ProgrammingError: 400 Value of type FLOAT64 cannot be
125+
assigned to integer, which has type INT64 [at 1:46]\nUPDATE
126+
example_model SET integer = (example_model.integer /...
127+
```
128+
115129
## How it works
116130

117131
### Overall design

0 commit comments

Comments
 (0)