Skip to content

Commit

Permalink
document 'Computations that yield FLOAT64 values can't be assigned to…
Browse files Browse the repository at this point in the history
… INT64 columns' limitation

refs googleapis#331
  • Loading branch information
timgraham committed Apr 25, 2020
1 parent 540ed84 commit 83953be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ decimal values without the possibility of data loss.

Spanner doesn't have these functions.

### Computations that yield FLOAT64 values can't be assigned to INT64 columns

Spanner [doesn't support this](https://github.com/googleapis/python-spanner-django/issues/331).

For example, if `integer` is `IntegerField`:

```
>>> ExampleModel.objects.update(integer=F('integer') / 2)
...
django.db.utils.ProgrammingError: 400 Value of type FLOAT64 cannot be
assigned to integer, which has type INT64 [at 1:46]\nUPDATE
example_model SET integer = (example_model.integer /...
```

## How it works

### Overall design
Expand Down

0 comments on commit 83953be

Please sign in to comment.