Hi, guoliubin
Please ignore my previous answer, I mixed your question with an another one, I post the right temporal join sql syntax here.
SELECT [column_list]
FROM table1 [AS <alias1>]
[LEFT] JOIN table2 FOR SYSTEM_TIME AS OF table1.{ proctime | rowtime } [AS <alias2>]
ON table1.column-name1 = table2.column-name1
The query in announcement missed the JOIN key word which is necessary, and the AS keyword is optional.
The wright query in example should be:
SELECT
o.order_id,
o.order_time,
o.amount * r.currency_rate AS amount,
r.currency
FROM orders AS o JOIN latest_rates FOR SYSTEM_TIME AS OF o.order_time AS r —- the AS keyword is necessary
ON o.currency = r.currency;
I’ll raise up a PR to fix the example in release note.
Best,
Leonard