Sorry, <http://c.id/> in the sql is not correct.
So the origin SQL in flip-204 is
SELECT /*+ SHUFFLE_HASH('Customers') */ o.order_id, o.total, c.country, c.zip
FROM Orders AS o
JOIN Customers FOR SYSTEM_TIME AS OF o.proc_time AS c
ON o.customer_id = c.id;
The correct syntax is:
SELECT /*+ SHUFFLE_HASH(‘c') */ o.order_id, o.total, c.country, c.zip
FROM Orders AS o
JOIN Customers FOR SYSTEM_TIME AS OF o.proc_time AS c
ON o.customer_id = c.id;
On 2024/01/23 04:04:32 yunfan zhang wrote:
> Hi dev,
>
> I am working on advancing the flip204 project, but I have noticed an error in
> the SQL syntax section.
> The sql syntax in the documentation is:
>
> SELECT /*+ SHUFFLE_HASH('Customers') */ o.order_id, o.total, c.country, c.zip
> FROM Orders AS o
> JOIN Customers FOR SYSTEM_TIME AS OF o.proc_time AS c
> ON o.customer_id = c.id <http://c.id/>;
>
> In this SQL query, the 'Customers' table is renamed as 'c', but in the hint,
> the original table name 'Customers' is used. This approach is different from
> other query hints regarding table names in Flink.
> For other hints like LOOKUP or BROADCAST
> , the syntax rule is to use the alias name if the table has one, and if not,
> to use its original table name.
> Therefore, I believe the correct syntax for the flip204 example should be:
>
> SELECT /*+ SHUFFLE_HASH('c') */ o.order_id, o.total, c.country, c.zip
> FROM Orders AS o
> JOIN Customers FOR SYSTEM_TIME AS OF o.proc_time AS c
> ON o.customer_id = c.id <http://c.id/>;
>
>