...
Describe in few sentences how the FLIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?
Other Syntax of timetravel
Due to the current limitations of Calcite syntax, we can only support specifying a single time and cannot specify a time range.
Code Block |
---|
SqlSnapshot Snapshot(SqlNode tableRef) :
{
final Span s;
final SqlNode e;
}
{
{ s = span(); } <FOR> <SYSTEM_TIME> <AS> <OF>
// Syntax for temporal table in
// standard SQL 2011 IWD 9075-2:201?(E) 7.6 <table reference>
// supports grammar as following:
// 1. datetime literal
// 2. datetime value function, i.e. CURRENT_TIMESTAMP
// 3. datetime term in 1 or 2 +(or -) interval term
// We extend to support column reference, use Expression
// to simplify the parsing code.
e = Expression(ExprContext.ACCEPT_NON_QUERY) {
return new SqlSnapshot(s.end(this), tableRef, e);
}
} |
Currently , we can't support the following synax.
Code Block | ||
---|---|---|
| ||
SELECT ENo,EName,Sys_Start,Sys_End
FROM Emp FOR SYSTEM_TIME FROM
TIMESTAMP '2011-01-02 00:00:00’TO
TIMESTAMP '2011-12-31 00:00:00' |
Code Block | ||
---|---|---|
| ||
SELECT ENo,EName,Sys_Start,Sys_End
FROM Emp FOR SYSTEM_TIME BETWEEN
TIMESTAMP '2011-01-02 00:00:00'AND
TIMESTAMP '2011-12-31 00:00:00' |
Rejected Alternatives
If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.