...
Describe the problems you are trying to solve.
Public Interfaces
Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.
A public interface is any change to the following:
Binary log formatThe network protocol and api behaviorAny class in the public packages under clientsConfiguration, especially client configurationorg/apache/kafka/common/serializationorg/apache/kafka/commonorg/apache/kafka/common/errorsorg/apache/kafka/clients/producerorg/apache/kafka/clients/consumer (eventually, once stable)
MonitoringCommand line tools and argumentsAnything else that will likely break existing users in some way when they upgrade
Proposed Changes
Syntax
We propose add the following syntax for time travel statement.
Code Block | ||
---|---|---|
| ||
SELECT * FROM paimon_tb AS OF TIMESTAMP '2023-04-27 00:00:00' |
Public interfaces
Add a new source ability interface. Different connectors can implement this interfaces to support time travel.
Code Block | ||
---|---|---|
| ||
/**
Enables to push down the timestamp of snapshot into a {@link ScanTableSource}.
*
* <p>When a source connector implements the SupportsTimeTravel interface, users can leverage its
* time-travel functionality to analyze historical data, perform backfilling operations, and more.
* This can be particularly useful for debugging and data recovery purposes.
*/
@PublicEvolving
public interface SupportsTimeTravel {
/**
* @param timestamp The timestamp of the snapshot to apply.
*/
void applySnapshot(long timestamp);
}
|
Proposed Changes
1. Add the Source Ability interface to support TimeTravel systems in implementing TimeTravel capabilities.
2. Add corresponding table optimization rules so that during LogicalPlan optimization, the Snapshot interval can be pushed up to the ScanTableSource.
3. To avoid conflicts with Temporal Join, we should apply TimeTravel transformation rules before apply the Temporal Join transformation rulesDescribe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.
Compatibility, Deprecation, and Migration Plan
...