Apache flink 有两种方法可以进行临时连接,首选哪一种

Apache flink 有两种方法可以进行临时连接,首选哪一种,apache-flink,Apache Flink,我在 它正在使用语法连接。。。对于截至的SYSTEM_TIME,执行临时联接,如下所示 SELECT o.amount, o.currency, r.rate, o.amount * r.rate FROM Orders AS o JOIN LatestRates FOR SYSTEM_TIME AS OF o.proctime AS r ON r.currency = o.currency 还有另一种方法可以进行时态连接,即使用TemporalTableFunction

我在

它正在使用语法
连接。。。对于截至
的SYSTEM_TIME,执行临时联接,如下所示

SELECT
  o.amount, o.currency, r.rate, o.amount * r.rate
FROM
  Orders AS o
  JOIN LatestRates FOR SYSTEM_TIME AS OF o.proctime AS r
  ON r.currency = o.currency
还有另一种方法可以进行
时态连接
,即使用
TemporalTableFunction


        val latestRates = rateTable.createTemporalTableFunction("ps", "currency");
        tableEnv.registerFunction("LatestRates ", latestRates );

        val result = tableEnv
                .sqlQuery("""select o.amount, o.currency, r.rate, o.amount * r.rate from  Orders as o Lateral table (LatestRates (o.ps)) d  where o.currency =d.currency""");


我想问哪一个是首选的,在我看来第一个是首选的,因为它遵循SQL标准来表示时态表

第一种方法,使用
JOIN。。。对于SYSTEM_,从
开始的时间是首选方法<代码>表#CreateTimporalTableFunction(…)在Flink 1.12中添加了这种更好的方法时被弃用(有关详细信息,请参阅)