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 405acfca26 [doc](function) percentile_approx_weighted (#682)
405acfca26 is described below
commit 405acfca26ae55d1216ebd4a8756f6351cfa9059
Author: Mryange <[email protected]>
AuthorDate: Wed Jun 5 10:26:08 2024 +0800
[doc](function) percentile_approx_weighted (#682)
---
.../percentile_approx_weighted.md | 58 ++++++++++++++++++++++
.../percentile_approx_weighted.md | 58 ++++++++++++++++++++++
.../percentile_approx_weighted.md | 58 ++++++++++++++++++++++
sidebars.json | 1 +
.../percentile_approx_weighted.md | 58 ++++++++++++++++++++++
versioned_sidebars/version-2.1-sidebars.json | 1 +
6 files changed, 234 insertions(+)
diff --git
a/docs/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
b/docs/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
new file mode 100644
index 0000000000..fe142588ca
--- /dev/null
+++
b/docs/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
@@ -0,0 +1,58 @@
+---
+{
+ "title": "PERCENTILE_APPROX_WEIGHTED",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## PERCENTILE_APPROX_WEIGHTED
+### description
+#### Syntax
+
+`PERCENTILE_APPROX_WEIGHTED(expr, w ,DOUBLE p [, DOUBLE compression])`
+
+
+The function is similar to PERCENTILE_APPROX, with the only difference being
an additional parameter w, which represents the number of times expr appears.
+
+### example
+```
+mysql >select * from quantile_weighted_table order by k;
++------+------+
+| k | w |
++------+------+
+| 1 | 2 |
+| 3 | 1 |
+| 5 | 2 |
++------+------+
+
+
+mysql >select percentile_approx_weighted(k,w,0.55) from
quantile_weighted_table;
++----------------------------------------------------------------------------------------+
+| percentile_approx_weighted(cast(k as DOUBLE), cast(w as DOUBLE), cast(0.55
as DOUBLE)) |
++----------------------------------------------------------------------------------------+
+|
3.3333332538604736 |
++----------------------------------------------------------------------------------------+
+
+```
+
+### keywords
+PERCENTILE_APPROX,PERCENTILE,APPROX,PERCENTILE_APPROX_WEIGHTED
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
new file mode 100755
index 0000000000..97bbe0b1e5
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
@@ -0,0 +1,58 @@
+---
+{
+ "title": "PERCENTILE_APPROX_WEIGHTED",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## PERCENTILE_APPROX_WEIGHTED
+### description
+#### Syntax
+
+`PERCENTILE_APPROX_WEIGHTED(expr, w ,DOUBLE p [, DOUBLE compression])`
+
+
+该函数和PERCENTILE_APPROX类似,唯一的区别是多了一个参数w,用来表示expr出现的次数。
+
+### example
+```
+mysql >select * from quantile_weighted_table order by k;
++------+------+
+| k | w |
++------+------+
+| 1 | 2 |
+| 3 | 1 |
+| 5 | 2 |
++------+------+
+
+
+mysql >select percentile_approx_weighted(k,w,0.55) from
quantile_weighted_table;
++----------------------------------------------------------------------------------------+
+| percentile_approx_weighted(cast(k as DOUBLE), cast(w as DOUBLE), cast(0.55
as DOUBLE)) |
++----------------------------------------------------------------------------------------+
+|
3.3333332538604736 |
++----------------------------------------------------------------------------------------+
+
+```
+
+### keywords
+PERCENTILE_APPROX,PERCENTILE,APPROX,PERCENTILE_APPROX_WEIGHTED
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
new file mode 100755
index 0000000000..97bbe0b1e5
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
@@ -0,0 +1,58 @@
+---
+{
+ "title": "PERCENTILE_APPROX_WEIGHTED",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## PERCENTILE_APPROX_WEIGHTED
+### description
+#### Syntax
+
+`PERCENTILE_APPROX_WEIGHTED(expr, w ,DOUBLE p [, DOUBLE compression])`
+
+
+该函数和PERCENTILE_APPROX类似,唯一的区别是多了一个参数w,用来表示expr出现的次数。
+
+### example
+```
+mysql >select * from quantile_weighted_table order by k;
++------+------+
+| k | w |
++------+------+
+| 1 | 2 |
+| 3 | 1 |
+| 5 | 2 |
++------+------+
+
+
+mysql >select percentile_approx_weighted(k,w,0.55) from
quantile_weighted_table;
++----------------------------------------------------------------------------------------+
+| percentile_approx_weighted(cast(k as DOUBLE), cast(w as DOUBLE), cast(0.55
as DOUBLE)) |
++----------------------------------------------------------------------------------------+
+|
3.3333332538604736 |
++----------------------------------------------------------------------------------------+
+
+```
+
+### keywords
+PERCENTILE_APPROX,PERCENTILE,APPROX,PERCENTILE_APPROX_WEIGHTED
diff --git a/sidebars.json b/sidebars.json
index 936f697249..4eb04401d5 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -818,6 +818,7 @@
"sql-manual/sql-functions/aggregate-functions/percentile",
"sql-manual/sql-functions/aggregate-functions/percentile-array",
"sql-manual/sql-functions/aggregate-functions/percentile-approx",
+
"sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted",
"sql-manual/sql-functions/aggregate-functions/histogram",
"sql-manual/sql-functions/aggregate-functions/group-array-intersect",
"sql-manual/sql-functions/aggregate-functions/group-bitmap-xor",
diff --git
a/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
b/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
new file mode 100644
index 0000000000..fe142588ca
--- /dev/null
+++
b/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted.md
@@ -0,0 +1,58 @@
+---
+{
+ "title": "PERCENTILE_APPROX_WEIGHTED",
+ "language": "zh-CN"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## PERCENTILE_APPROX_WEIGHTED
+### description
+#### Syntax
+
+`PERCENTILE_APPROX_WEIGHTED(expr, w ,DOUBLE p [, DOUBLE compression])`
+
+
+The function is similar to PERCENTILE_APPROX, with the only difference being
an additional parameter w, which represents the number of times expr appears.
+
+### example
+```
+mysql >select * from quantile_weighted_table order by k;
++------+------+
+| k | w |
++------+------+
+| 1 | 2 |
+| 3 | 1 |
+| 5 | 2 |
++------+------+
+
+
+mysql >select percentile_approx_weighted(k,w,0.55) from
quantile_weighted_table;
++----------------------------------------------------------------------------------------+
+| percentile_approx_weighted(cast(k as DOUBLE), cast(w as DOUBLE), cast(0.55
as DOUBLE)) |
++----------------------------------------------------------------------------------------+
+|
3.3333332538604736 |
++----------------------------------------------------------------------------------------+
+
+```
+
+### keywords
+PERCENTILE_APPROX,PERCENTILE,APPROX,PERCENTILE_APPROX_WEIGHTED
diff --git a/versioned_sidebars/version-2.1-sidebars.json
b/versioned_sidebars/version-2.1-sidebars.json
index cfaf2cdb67..aedf5d1d3f 100644
--- a/versioned_sidebars/version-2.1-sidebars.json
+++ b/versioned_sidebars/version-2.1-sidebars.json
@@ -808,6 +808,7 @@
"sql-manual/sql-functions/aggregate-functions/percentile",
"sql-manual/sql-functions/aggregate-functions/percentile-array",
"sql-manual/sql-functions/aggregate-functions/percentile-approx",
+
"sql-manual/sql-functions/aggregate-functions/percentile_approx_weighted",
"sql-manual/sql-functions/aggregate-functions/histogram",
"sql-manual/sql-functions/aggregate-functions/group-array-intersect",
"sql-manual/sql-functions/aggregate-functions/group-bitmap-xor",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]