Skip to content

Inconsistent AS OF SYSTEM TIME future value behavior #91021

@ecwall

Description

@ecwall

Actual behavior fails randomly with small AS OF SYSTEM TIME intervals in the future:

demo@127.0.0.1:26257/movr> CREATE TABLE t();
CREATE TABLE


Time: 3ms total (execution 3ms / network 0ms)

demo@127.0.0.1:26257/movr> SELECT * FROM t AS OF SYSTEM TIME interval '20 microsecond';
--
(0 rows)


Time: 1ms total (execution 1ms / network 0ms)

demo@127.0.0.1:26257/movr> SELECT * FROM t AS OF SYSTEM TIME interval '20 microsecond';
ERROR: AS OF SYSTEM TIME: cannot specify timestamp in the future (1667249155.165540000,0 > 1667249155.165537000,0)

Expected behavior: should always fail with any interval > 0.

Happens in master as of 3dd5e68701273a51c076ce4d6835575e9991d8b0.

Jira issue: CRDB-21077

Epic CRDB-17785

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions