On cloud-spanner-emulator, the following SQL will get the error spanner: code = "OutOfRange", desc = "Invalid timestamp: '2022-03-31T23:59:59.999999999Z'"
SELECT TIMESTAMP('2022-03-31T23:59:59.999999999Z');
However, Cloud Spanner does not return any error.
Also the emulator accept nanoseconds level value as TIMESTAMP type, but MAX() and MIN() returns microseconds's one.
For example, if SomethingTable has CreatedAt TIMESTAMP NOT NULL column and value of 2022-03-31T14:59:59.999999999Z was inserted.
The following SQL returns 2022-03-31T14:59:59.999999999Z.
SELECT CreatedAt FROM SomethingTable
However, the following SQL returns 2022-03-31T14:59:59.999999Z.
SELECT MAX(CreatedAt) FROM SomethingTable;
On cloud-spanner-emulator, the following SQL will get the error
spanner: code = "OutOfRange", desc = "Invalid timestamp: '2022-03-31T23:59:59.999999999Z'"However, Cloud Spanner does not return any error.
Also the emulator accept nanoseconds level value as TIMESTAMP type, but
MAX()andMIN()returns microseconds's one.For example, if
SomethingTablehasCreatedAt TIMESTAMP NOT NULLcolumn and value of2022-03-31T14:59:59.999999999Zwas inserted.The following SQL returns
2022-03-31T14:59:59.999999999Z.However, the following SQL returns
2022-03-31T14:59:59.999999Z.