This is an automated email from the ASF dual-hosted git repository.
luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 8de9b9d622ed [docs](Nereids) update join hint support multi leading in
2.1 and master (#447)
8de9b9d622ed is described below
commit 8de9b9d622ede30587c7636eea80d719ebf5352e
Author: LiBinfeng <[email protected]>
AuthorDate: Fri Mar 22 10:02:04 2024 +0800
[docs](Nereids) update join hint support multi leading in 2.1 and master
(#447)
---
docs/query-acceleration/hint/joinHint.md | 31 ----------------------
.../current/query-acceleration/hint/joinHint.md | 31 ----------------------
.../query-acceleration/hint/joinHint.md | 30 ---------------------
.../query-acceleration/hint/joinHint.md | 31 ----------------------
4 files changed, 123 deletions(-)
diff --git a/docs/query-acceleration/hint/joinHint.md
b/docs/query-acceleration/hint/joinHint.md
index adce5d9ddca5..262e65cae5e1 100644
--- a/docs/query-acceleration/hint/joinHint.md
+++ b/docs/query-acceleration/hint/joinHint.md
@@ -464,37 +464,6 @@ mysql> explain shape plan select /*+ ORDERED LEADING(t1
t2 t3) */ t1.c1 from t2
+--------------------------------------------------------------------------------+
18 rows in set (0.02 sec)
```
-## Limitation
-- The current version supports only one leadingHint. If leadinghint is used
with a subquery, the query will report an error. Example (This example explain
will report an error, but will follow the normal path generation plan) :
-```sql
-mysql> explain shape plan select /*+ leading(alias t1) */ count(*) from t1
join (select /*+ leading(t3 t2) */ c2 from t2 join t3 on t2.c2 = t3.c3) as
alias on t1.c1 = alias.c2;
-
+----------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner)
|
-
+----------------------------------------------------------------------------------------+
- | PhysicalResultSink
|
- | --hashAgg[GLOBAL]
|
- | ----PhysicalDistribute[DistributionSpecGather]
|
- | ------hashAgg[LOCAL]
|
- | --------PhysicalProject
|
- | ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = alias.c2))
otherCondition=() |
- | ------------PhysicalProject
|
- | --------------PhysicalOlapScan[t1]
|
- | ------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------PhysicalProject
|
- | ----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))
otherCondition=() |
- | ------------------PhysicalProject
|
- | --------------------PhysicalOlapScan[t2]
|
- | ------------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------------PhysicalProject
|
- | ----------------------PhysicalOlapScan[t3]
|
- |
|
- | Hint log:
|
- | Used:
|
- | UnUsed: leading(alias t1)
|
- | SyntaxError: leading(t3 t2) Msg:one query block can only have one leading
clause |
-
+----------------------------------------------------------------------------------------+
- 21 rows in set (0.01 sec)
-```
# OrderedHint
- Using ordered hint causes the join tree to be fixed in shape and displayed
in text order
- The syntax is /*+ ORDERED */,leading is surrounded by "/*+" and "*/" and
placed directly behind the select in the select statement, for example:
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/hint/joinHint.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/hint/joinHint.md
index 926104f5939e..2f6219c2f62e 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/hint/joinHint.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/hint/joinHint.md
@@ -457,37 +457,6 @@ mysql> explain shape plan select /*+ ORDERED LEADING(t1
t2 t3) */ t1.c1 from t2
+--------------------------------------------------------------------------------+
18 rows in set (0.02 sec)
```
-## 使用限制
--
当前版本只支持使用一个leadingHint。若和子查询同时使用leadinghint的话则查询会报错。例(这个例子explain会报错,但是会走正常的路径生成计划):
-```sql
-mysql> explain shape plan select /*+ leading(alias t1) */ count(*) from t1
join (select /*+ leading(t3 t2) */ c2 from t2 join t3 on t2.c2 = t3.c3) as
alias on t1.c1 = alias.c2;
-
+----------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner)
|
-
+----------------------------------------------------------------------------------------+
- | PhysicalResultSink
|
- | --hashAgg[GLOBAL]
|
- | ----PhysicalDistribute[DistributionSpecGather]
|
- | ------hashAgg[LOCAL]
|
- | --------PhysicalProject
|
- | ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = alias.c2))
otherCondition=() |
- | ------------PhysicalProject
|
- | --------------PhysicalOlapScan[t1]
|
- | ------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------PhysicalProject
|
- | ----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))
otherCondition=() |
- | ------------------PhysicalProject
|
- | --------------------PhysicalOlapScan[t2]
|
- | ------------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------------PhysicalProject
|
- | ----------------------PhysicalOlapScan[t3]
|
- |
|
- | Hint log:
|
- | Used:
|
- | UnUsed: leading(alias t1)
|
- | SyntaxError: leading(t3 t2) Msg:one query block can only have one leading
clause |
-
+----------------------------------------------------------------------------------------+
- 21 rows in set (0.01 sec)
-```
# OrderedHint 使用说明
- 使用ordered hint会让join tree的形状固定下来,按照文本序来显示
- 语法为 /*+ ORDERED */,leading由"/*+"和"*/"包围并置于select语句里面 select的正后方,例:
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/hint/joinHint.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/hint/joinHint.md
index 926104f5939e..cc42dff5a5bb 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/hint/joinHint.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/hint/joinHint.md
@@ -457,36 +457,6 @@ mysql> explain shape plan select /*+ ORDERED LEADING(t1
t2 t3) */ t1.c1 from t2
+--------------------------------------------------------------------------------+
18 rows in set (0.02 sec)
```
-## 使用限制
--
当前版本只支持使用一个leadingHint。若和子查询同时使用leadinghint的话则查询会报错。例(这个例子explain会报错,但是会走正常的路径生成计划):
-```sql
-mysql> explain shape plan select /*+ leading(alias t1) */ count(*) from t1
join (select /*+ leading(t3 t2) */ c2 from t2 join t3 on t2.c2 = t3.c3) as
alias on t1.c1 = alias.c2;
-
+----------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner)
|
-
+----------------------------------------------------------------------------------------+
- | PhysicalResultSink
|
- | --hashAgg[GLOBAL]
|
- | ----PhysicalDistribute[DistributionSpecGather]
|
- | ------hashAgg[LOCAL]
|
- | --------PhysicalProject
|
- | ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = alias.c2))
otherCondition=() |
- | ------------PhysicalProject
|
- | --------------PhysicalOlapScan[t1]
|
- | ------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------PhysicalProject
|
- | ----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))
otherCondition=() |
- | ------------------PhysicalProject
|
- | --------------------PhysicalOlapScan[t2]
|
- | ------------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------------PhysicalProject
|
- | ----------------------PhysicalOlapScan[t3]
|
- |
|
- | Hint log:
|
- | Used:
|
- | UnUsed: leading(alias t1)
|
- | SyntaxError: leading(t3 t2) Msg:one query block can only have one leading
clause |
-
+----------------------------------------------------------------------------------------+
- 21 rows in set (0.01 sec)
```
# OrderedHint 使用说明
- 使用ordered hint会让join tree的形状固定下来,按照文本序来显示
diff --git a/versioned_docs/version-2.1/query-acceleration/hint/joinHint.md
b/versioned_docs/version-2.1/query-acceleration/hint/joinHint.md
index adce5d9ddca5..262e65cae5e1 100644
--- a/versioned_docs/version-2.1/query-acceleration/hint/joinHint.md
+++ b/versioned_docs/version-2.1/query-acceleration/hint/joinHint.md
@@ -464,37 +464,6 @@ mysql> explain shape plan select /*+ ORDERED LEADING(t1
t2 t3) */ t1.c1 from t2
+--------------------------------------------------------------------------------+
18 rows in set (0.02 sec)
```
-## Limitation
-- The current version supports only one leadingHint. If leadinghint is used
with a subquery, the query will report an error. Example (This example explain
will report an error, but will follow the normal path generation plan) :
-```sql
-mysql> explain shape plan select /*+ leading(alias t1) */ count(*) from t1
join (select /*+ leading(t3 t2) */ c2 from t2 join t3 on t2.c2 = t3.c3) as
alias on t1.c1 = alias.c2;
-
+----------------------------------------------------------------------------------------+
- | Explain String(Nereids Planner)
|
-
+----------------------------------------------------------------------------------------+
- | PhysicalResultSink
|
- | --hashAgg[GLOBAL]
|
- | ----PhysicalDistribute[DistributionSpecGather]
|
- | ------hashAgg[LOCAL]
|
- | --------PhysicalProject
|
- | ----------hashJoin[INNER_JOIN] hashCondition=((t1.c1 = alias.c2))
otherCondition=() |
- | ------------PhysicalProject
|
- | --------------PhysicalOlapScan[t1]
|
- | ------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------PhysicalProject
|
- | ----------------hashJoin[INNER_JOIN] hashCondition=((t2.c2 = t3.c3))
otherCondition=() |
- | ------------------PhysicalProject
|
- | --------------------PhysicalOlapScan[t2]
|
- | ------------------PhysicalDistribute[DistributionSpecHash]
|
- | --------------------PhysicalProject
|
- | ----------------------PhysicalOlapScan[t3]
|
- |
|
- | Hint log:
|
- | Used:
|
- | UnUsed: leading(alias t1)
|
- | SyntaxError: leading(t3 t2) Msg:one query block can only have one leading
clause |
-
+----------------------------------------------------------------------------------------+
- 21 rows in set (0.01 sec)
-```
# OrderedHint
- Using ordered hint causes the join tree to be fixed in shape and displayed
in text order
- The syntax is /*+ ORDERED */,leading is surrounded by "/*+" and "*/" and
placed directly behind the select in the select statement, for example:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]