reproduction
{"fields": [
{"name": "id", "type": "integer"},
{"name": "date", "type": "string"}
],
"primaryKey": ["id"]
- write some rows to a PostgreSQL DB - but in the rows, have the id as type string (but numeric)
- data in DB is inserted correctly, and DB converts it to integer
- now, write the same rows again
expected
- provide an error message, warning about type mismatch
- or match rows in DB (as opposed to bloom)
actual
- writer.__prepare_bloom - collects all data as integers
- writer.__check_existing - compares with a string id - which doesn't match
- this causes insert
- when inserting, the DB matches the primary key (even though types don't match)
- error about duplicate key
reproduction
{"fields": [ {"name": "id", "type": "integer"}, {"name": "date", "type": "string"} ], "primaryKey": ["id"]expected
actual