swuferhong commented on code in PR #24077:
URL: https://github.com/apache/flink/pull/24077#discussion_r1467388040


##########
docs/content.zh/docs/dev/table/sql/queries/hints.md:
##########
@@ -108,6 +108,39 @@ hintOption:
     |   stringLiteral
 ```
 
+### 查询提示使用中的冲突
+#### Key-value 类型查询提示的冲突处理
+Key-value 类型的查询提示使用如下语法:
+
+```sql
+hintName '(' optionKey '=' optionVal [, optionKey '=' optionVal ]* ')'
+```
+
+当 Key-value 类型的查询提示发生冲突时,Flink 会按顺序用后定义的查询提示覆盖前面定义的同名查询提示。
+对于下面的例子,包含同相同 key 的查询提示 'max-attempts':
+
+```sql
+SELECT /*+ LOOKUP('table'='D', 'max-attempts'='3', 'max-attempts'='4') */ * 
FROM t1 T JOIN t2 AS OF T.proctime AS D ON T.id = D.id;
+```
+
+在这个例子里,Flink 会选择 'max-attempts' = '4' 的查询提示覆盖 'max-attempts' = '3' 的提示,
+所以最后 'max-attempts' 的值为 4。
+
+#### List 类型查询提示的冲突处理
+List 类型的查询提示使用如下语法:
+
+```sql
+hintName '(' hintOption [, hintOption ]* ')'
+```
+
+对于 List 类型的查询提示,Flink 会选择最先被采纳的查询提示。如下面具有相同 BROADCAST 提示的例子:
+
+```sql
+SELECT /*+ BROADCAST(t2, t1), BROADCAST(t1, t2) */ * FROM t1;

Review Comment:
   done!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to