THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
SELECT /*+ SHUFFLE_HASH('Orders', '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; |
Note:
- Table names in useSHUFFLE_hash HASH hint is required to avoid mistake hint propagation if there are multiple lookup joins.
- The hint only provides a suggestion to the optimization, it is not an enforcer.
...
Code Block | ||||
---|---|---|---|---|
| ||||
builder .hintStrategy("SHUFFLE_HASH", HintStrategy.builder( HintPredicates.and(HintPredicates.CORRELATE, isLookupJoin(), lookupJoinWithFixedTableName()))) .build(); |
...
LookupJoinRules would check whether FlinkLogicalJoin
contain USESHUFFLE_HASH Hint. If yes, and the rules require the input must have hash distribution on join keys when converting FlinkLogicalJoin
to LookupJoin
.
...