Hi, guoliubin Sorry for the late reply, I think the example in release note has a minor typo error which missed the ‘AS’ keyword.
SELECT o.order_id, o.order_time, o.amount * r.currency_rate AS amount, r.currency FROM orders AS o, latest_rates FOR SYSTEM_TIME AS OF o.order_time AS r ON o.currency = r.currency; The ‘AS’ keyword is necessary if we alias the correlation name here, I know it’s easy to be ignored(just like the release note o(╯□╰)o ) , but the syntax follows SQL standard 2011 7.6 table reference: <table primary> ::= <table or query name> [ <query system time period specification> ] [ [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ] ] Best, Leonard > 在 2020年12月14日,18:18,guoliubi...@foxmail.com 写道: > > I just try to follow the example list in the page > https://flink.apache.org/news/2020/12/10/release-1.12.0.html#table-apisql-support-for-temporal-table-joins-in-sql > > <https://flink.apache.org/news/2020/12/10/release-1.12.0.html#table-apisql-support-for-temporal-table-joins-in-sql> > > > Unfortunately when I try to upload the python file to flink cluster, the > error occured: > > py4j.protocol.Py4JJavaError: An error occurred while calling o2.sqlQuery. > : org.apache.flink.table.api.SqlParserException: SQL parse failed. > Encountered "ON" at line 8, column 5. > Was expecting one of: > <EOF> > "EXCEPT" ... > "FETCH" ... > "GROUP" ... > > Maybe I miss something? > guoliubi...@foxmail.com <mailto:guoliubi...@foxmail.com>