Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Resolved
-
None
-
None
-
None
Description
Temporal join is a correlate, the right of correlate is a Snapshot, the period of snapshot comes from left table's time attribute column.
the time attribute column may be pruned if the downstream `RelNode` did not reference it any more, so I need to keep the necessary condition(e.g., left time attribute, right primary key) for temporal join node in join condition.
Given an example:
SELECT o.order_id, o.currency, o.amount, r.rate,r.rowtime FROM orders_proctime AS o JOIN versioned_currency FOR SYSTEM_TIME AS OF o.rowtime as r ON o.currency = r.currency
The select clause did not use `o.rowtime` and thus the column `o.rowtime` will be removed later, but we need the `o.rowtime` in temporal join node, so I keep the `o.rowtime` in temporal join condition just like[1].