RelationTimeTravel Logical Operator¶
RelationTimeTravel is an unresolved logical operator (UnresolvedLeafNode) to "mark a need" to time travel the child relation to the given timestamp or version.
RelationTimeTravel represents the following in table identifiers in a SQL query:
FOR? (SYSTEM_VERSION | VERSION) AS OF versionFOR? (SYSTEM_TIME | TIMESTAMP) AS OF timestamp
Creating Instance¶
RelationTimeTravel takes the following to be created:
- Child relation (LogicalPlan)
- Optional timestamp (Expression)
- Optional version
RelationTimeTravel is created when:
AstBuilderis requested to withTimeTravel
nodePatterns¶
nodePatterns is the following TreePattern:
Logical Analysis¶
RelationTimeTravel is a target of the following logical rules:
- CTESubstitution (only for UnresolvedRelations with a single-part table identifier)
EvalSubqueriesForTimeTravel(only for timestamp specified)- ResolveRelations
- ResolveSQLOnFile
- ResolveSubquery