I've noticed missing entries in table relationships which are joined using timestamp columns using "infinity" timestamps.
The files below demonstrate this. The example is stipped down to the bare minimum while still reproducing the issue.
Looking at the table data, when joining using name
and ts
we should get two rows (as seen in the select.sql
file below).
But, when running this in Python we run into an issue: The infinity timestamp gets converted to a datetime
instance using datetime(1, 1, 1, 0, 0)
. When accessing the relation on the entity, SQLAlchemy will emit a query using this value instead of -infinity
, so the relation will not return anything.