You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2025/08/06 10:00:50 UTC
(datafusion) branch asf-site updated: Publish built docs triggered by 183ff6643ace3b4708103b5fda8eecd6c31ca3f7
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/asf-site by this push:
new d157bbe52c Publish built docs triggered by 183ff6643ace3b4708103b5fda8eecd6c31ca3f7
d157bbe52c is described below
commit d157bbe52c9e7445913ae43a617df71373b5369e
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Wed Aug 6 10:00:47 2025 +0000
Publish built docs triggered by 183ff6643ace3b4708103b5fda8eecd6c31ca3f7
---
_sources/user-guide/expressions.md.txt | 42 +++++++++++-----------
_sources/user-guide/sql/aggregate_functions.md.txt | 17 +++++++--
searchindex.js | 2 +-
user-guide/expressions.html | 8 ++---
user-guide/sql/aggregate_functions.html | 19 ++++++++--
5 files changed, 57 insertions(+), 31 deletions(-)
diff --git a/_sources/user-guide/expressions.md.txt b/_sources/user-guide/expressions.md.txt
index 69638b15f8..9171a5d29d 100644
--- a/_sources/user-guide/expressions.md.txt
+++ b/_sources/user-guide/expressions.md.txt
@@ -284,27 +284,27 @@ select log(-1), log(0), sqrt(-1);
## Aggregate Functions
-| Syntax | Description |
-| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
-| avg(expr) | Сalculates the average value for `expr`. |
-| approx_distinct(expr) | Calculates an approximate count of the number of distinct values for `expr`. |
-| approx_median(expr) | Calculates an approximation of the median for `expr`. |
-| approx_percentile_cont(expr, percentile) | Calculates an approximation of the specified `percentile` for `expr`. |
-| approx_percentile_cont_with_weight(expr, weight_expr, percentile) | Calculates an approximation of the specified `percentile` for `expr` and `weight_expr`. |
-| bit_and(expr) | Computes the bitwise AND of all non-null input values for `expr`. |
-| bit_or(expr) | Computes the bitwise OR of all non-null input values for `expr`. |
-| bit_xor(expr) | Computes the bitwise exclusive OR of all non-null input values for `expr`. |
-| bool_and(expr) | Returns true if all non-null input values (`expr`) are true, otherwise false. |
-| bool_or(expr) | Returns true if any non-null input value (`expr`) is true, otherwise false. |
-| count(expr) | Returns the number of rows for `expr`. |
-| count_distinct | Creates an expression to represent the count(distinct) aggregate function |
-| cube(exprs) | Creates a grouping set for all combination of `exprs` |
-| grouping_set(exprs) | Create a grouping set. |
-| max(expr) | Finds the maximum value of `expr`. |
-| median(expr) | Сalculates the median of `expr`. |
-| min(expr) | Finds the minimum value of `expr`. |
-| rollup(exprs) | Creates a grouping set for rollup sets. |
-| sum(expr) | Сalculates the sum of `expr`. |
+| Syntax | Description |
+| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| avg(expr) | Сalculates the average value for `expr`. |
+| approx_distinct(expr) | Calculates an approximate count of the number of distinct values for `expr`. |
+| approx_median(expr) | Calculates an approximation of the median for `expr`. |
+| approx_percentile_cont(expr, percentile [, centroids]) | Calculates an approximation of the specified `percentile` for `expr`. Optional `centroids` parameter controls accuracy (default: 100). |
+| approx_percentile_cont_with_weight(expr, weight_expr, percentile [, centroids]) | Calculates an approximation of the specified `percentile` for `expr` and `weight_expr`. Optional `centroids` parameter controls accuracy (default: 100). |
+| bit_and(expr) | Computes the bitwise AND of all non-null input values for `expr`. |
+| bit_or(expr) | Computes the bitwise OR of all non-null input values for `expr`. |
+| bit_xor(expr) | Computes the bitwise exclusive OR of all non-null input values for `expr`. |
+| bool_and(expr) | Returns true if all non-null input values (`expr`) are true, otherwise false. |
+| bool_or(expr) | Returns true if any non-null input value (`expr`) is true, otherwise false. |
+| count(expr) | Returns the number of rows for `expr`. |
+| count_distinct | Creates an expression to represent the count(distinct) aggregate function |
+| cube(exprs) | Creates a grouping set for all combination of `exprs` |
+| grouping_set(exprs) | Create a grouping set. |
+| max(expr) | Finds the maximum value of `expr`. |
+| median(expr) | Сalculates the median of `expr`. |
+| min(expr) | Finds the minimum value of `expr`. |
+| rollup(exprs) | Creates a grouping set for rollup sets. |
+| sum(expr) | Сalculates the sum of `expr`. |
## Aggregate Function Builder
diff --git a/_sources/user-guide/sql/aggregate_functions.md.txt b/_sources/user-guide/sql/aggregate_functions.md.txt
index 88241770a4..e3396cd7bd 100644
--- a/_sources/user-guide/sql/aggregate_functions.md.txt
+++ b/_sources/user-guide/sql/aggregate_functions.md.txt
@@ -1039,7 +1039,7 @@ approx_median(expression)
Returns the approximate percentile of input values using the t-digest algorithm.
```sql
-approx_percentile_cont(percentile, centroids) WITHIN GROUP (ORDER BY expression)
+approx_percentile_cont(percentile [, centroids]) WITHIN GROUP (ORDER BY expression)
```
#### Arguments
@@ -1051,6 +1051,12 @@ approx_percentile_cont(percentile, centroids) WITHIN GROUP (ORDER BY expression)
#### Example
```sql
+> SELECT approx_percentile_cont(0.75) WITHIN GROUP (ORDER BY column_name) FROM table_name;
++------------------------------------------------------------------+
+| approx_percentile_cont(0.75) WITHIN GROUP (ORDER BY column_name) |
++------------------------------------------------------------------+
+| 65.0 |
++------------------------------------------------------------------+
> SELECT approx_percentile_cont(0.75, 100) WITHIN GROUP (ORDER BY column_name) FROM table_name;
+-----------------------------------------------------------------------+
| approx_percentile_cont(0.75, 100) WITHIN GROUP (ORDER BY column_name) |
@@ -1064,7 +1070,7 @@ approx_percentile_cont(percentile, centroids) WITHIN GROUP (ORDER BY expression)
Returns the weighted approximate percentile of input values using the t-digest algorithm.
```sql
-approx_percentile_cont_with_weight(weight, percentile) WITHIN GROUP (ORDER BY expression)
+approx_percentile_cont_with_weight(weight, percentile [, centroids]) WITHIN GROUP (ORDER BY expression)
```
#### Arguments
@@ -1072,6 +1078,7 @@ approx_percentile_cont_with_weight(weight, percentile) WITHIN GROUP (ORDER BY ex
- **expression**: The expression to operate on. Can be a constant, column, or function, and any combination of operators.
- **weight**: Expression to use as weight. Can be a constant, column, or function, and any combination of arithmetic operators.
- **percentile**: Percentile to compute. Must be a float value between 0 and 1 (inclusive).
+- **centroids**: Number of centroids to use in the t-digest algorithm. _Default is 100_. A higher number results in more accurate approximation but requires more memory.
#### Example
@@ -1082,4 +1089,10 @@ approx_percentile_cont_with_weight(weight, percentile) WITHIN GROUP (ORDER BY ex
+---------------------------------------------------------------------------------------------+
| 78.5 |
+---------------------------------------------------------------------------------------------+
+> SELECT approx_percentile_cont_with_weight(weight_column, 0.90, 100) WITHIN GROUP (ORDER BY column_name) FROM table_name;
++--------------------------------------------------------------------------------------------------+
+| approx_percentile_cont_with_weight(weight_column, 0.90, 100) WITHIN GROUP (ORDER BY column_name) |
++--------------------------------------------------------------------------------------------------+
+| 78.5 |
++--------------------------------------------------------------------------------------------------+
```
diff --git a/searchindex.js b/searchindex.js
index 7154973576..b24ada8125 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles":{"!=":[[56,"op-neq"]],"!~":[[56,"op-re-not-match"]],"!~*":[[56,"op-re-not-match-i"]],"!~~":[[56,"id19"]],"!~~*":[[56,"id20"]],"#":[[56,"op-bit-xor"]],"%":[[56,"op-modulo"]],"&":[[56,"op-bit-and"]],"(relation, name) tuples in logical fields and logical columns are unique":[[12,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[56,"op-multiply"]],"+":[[56,"op-plus"]],"-":[[56,"op-minus"]],"/":[[56,"op-divide"]],"<":[[56,"op-lt"]],"< [...]
\ No newline at end of file
+Search.setIndex({"alltitles":{"!=":[[56,"op-neq"]],"!~":[[56,"op-re-not-match"]],"!~*":[[56,"op-re-not-match-i"]],"!~~":[[56,"id19"]],"!~~*":[[56,"id20"]],"#":[[56,"op-bit-xor"]],"%":[[56,"op-modulo"]],"&":[[56,"op-bit-and"]],"(relation, name) tuples in logical fields and logical columns are unique":[[12,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[56,"op-multiply"]],"+":[[56,"op-plus"]],"-":[[56,"op-minus"]],"/":[[56,"op-divide"]],"<":[[56,"op-lt"]],"< [...]
\ No newline at end of file
diff --git a/user-guide/expressions.html b/user-guide/expressions.html
index 36c3dab48b..b954a2cfae 100644
--- a/user-guide/expressions.html
+++ b/user-guide/expressions.html
@@ -1342,11 +1342,11 @@ but these operators always return a <code class="docutils literal notranslate"><
<tr class="row-even"><td><p>approx_median(expr)</p></td>
<td><p>Calculates an approximation of the median for <code class="docutils literal notranslate"><span class="pre">expr</span></code>.</p></td>
</tr>
-<tr class="row-odd"><td><p>approx_percentile_cont(expr, percentile)</p></td>
-<td><p>Calculates an approximation of the specified <code class="docutils literal notranslate"><span class="pre">percentile</span></code> for <code class="docutils literal notranslate"><span class="pre">expr</span></code>.</p></td>
+<tr class="row-odd"><td><p>approx_percentile_cont(expr, percentile [, centroids])</p></td>
+<td><p>Calculates an approximation of the specified <code class="docutils literal notranslate"><span class="pre">percentile</span></code> for <code class="docutils literal notranslate"><span class="pre">expr</span></code>. Optional <code class="docutils literal notranslate"><span class="pre">centroids</span></code> parameter controls accuracy (default: 100).</p></td>
</tr>
-<tr class="row-even"><td><p>approx_percentile_cont_with_weight(expr, weight_expr, percentile)</p></td>
-<td><p>Calculates an approximation of the specified <code class="docutils literal notranslate"><span class="pre">percentile</span></code> for <code class="docutils literal notranslate"><span class="pre">expr</span></code> and <code class="docutils literal notranslate"><span class="pre">weight_expr</span></code>.</p></td>
+<tr class="row-even"><td><p>approx_percentile_cont_with_weight(expr, weight_expr, percentile [, centroids])</p></td>
+<td><p>Calculates an approximation of the specified <code class="docutils literal notranslate"><span class="pre">percentile</span></code> for <code class="docutils literal notranslate"><span class="pre">expr</span></code> and <code class="docutils literal notranslate"><span class="pre">weight_expr</span></code>. Optional <code class="docutils literal notranslate"><span class="pre">centroids</span></code> parameter controls accuracy (default: 100).</p></td>
</tr>
<tr class="row-odd"><td><p>bit_and(expr)</p></td>
<td><p>Computes the bitwise AND of all non-null input values for <code class="docutils literal notranslate"><span class="pre">expr</span></code>.</p></td>
diff --git a/user-guide/sql/aggregate_functions.html b/user-guide/sql/aggregate_functions.html
index aff2b83430..1220be2d31 100644
--- a/user-guide/sql/aggregate_functions.html
+++ b/user-guide/sql/aggregate_functions.html
@@ -2510,7 +2510,7 @@ This aggregation function can only mix DISTINCT and ORDER BY if the ordering exp
<section id="approx-percentile-cont">
<h3><code class="docutils literal notranslate"><span class="pre">approx_percentile_cont</span></code><a class="headerlink" href="#approx-percentile-cont" title="Link to this heading">¶</a></h3>
<p>Returns the approximate percentile of input values using the t-digest algorithm.</p>
-<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="n">percentile</span><span class="p">,</span><span class="w"> </span><span class="n">centroids</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="p">(</span><span class="k">ORDER</span><span class="w"> </span>< [...]
+<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="n">percentile</span><span class="w"> </span><span class="p">[,</span><span class="w"> </span><span class="n">centroids</span><span class="p">])</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="p">(</span><span class="k">ORDER</span [...]
</pre></div>
</div>
<section id="id68">
@@ -2523,7 +2523,13 @@ This aggregation function can only mix DISTINCT and ORDER BY if the ordering exp
</section>
<section id="id69">
<h4>Example<a class="headerlink" href="#id69" title="Link to this heading">¶</a></h4>
-<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="o">></span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="mi">0</span><span class="p">.</span><span class="mi">75</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class= [...]
+<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="o">></span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="mi">0</span><span class="p">.</span><span class="mi">75</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class [...]
+<span class="o">+</span><span class="c1">------------------------------------------------------------------+</span>
+<span class="o">|</span><span class="w"> </span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="mi">0</span><span class="p">.</span><span class="mi">75</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="p">(</span><span class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="k">column [...]
+<span class="o">+</span><span class="c1">------------------------------------------------------------------+</span>
+<span class="o">|</span><span class="w"> </span><span class="mi">65</span><span class="p">.</span><span class="mi">0</span><span class="w"> </span><span class="o">|</span>
+<span class="o">+</span><span class="c1">------------------------------------------------------------------+</span>
+<span class="o">></span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="mi">0</span><span class="p">.</span><span class="mi">75</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="p"> [...]
<span class="o">+</span><span class="c1">-----------------------------------------------------------------------+</span>
<span class="o">|</span><span class="w"> </span><span class="n">approx_percentile_cont</span><span class="p">(</span><span class="mi">0</span><span class="p">.</span><span class="mi">75</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="p">(</span><span class="k">ORDER</span><span class="w"> </s [...]
<span class="o">+</span><span class="c1">-----------------------------------------------------------------------+</span>
@@ -2536,7 +2542,7 @@ This aggregation function can only mix DISTINCT and ORDER BY if the ordering exp
<section id="approx-percentile-cont-with-weight">
<h3><code class="docutils literal notranslate"><span class="pre">approx_percentile_cont_with_weight</span></code><a class="headerlink" href="#approx-percentile-cont-with-weight" title="Link to this heading">¶</a></h3>
<p>Returns the weighted approximate percentile of input values using the t-digest algorithm.</p>
-<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="n">approx_percentile_cont_with_weight</span><span class="p">(</span><span class="n">weight</span><span class="p">,</span><span class="w"> </span><span class="n">percentile</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="p">(</span><span class="k">ORDER</span><span class="w"> [...]
+<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="n">approx_percentile_cont_with_weight</span><span class="p">(</span><span class="n">weight</span><span class="p">,</span><span class="w"> </span><span class="n">percentile</span><span class="w"> </span><span class="p">[,</span><span class="w"> </span><span class="n">centroids</span><span class="p">])</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k [...]
</pre></div>
</div>
<section id="id70">
@@ -2545,6 +2551,7 @@ This aggregation function can only mix DISTINCT and ORDER BY if the ordering exp
<li><p><strong>expression</strong>: The expression to operate on. Can be a constant, column, or function, and any combination of operators.</p></li>
<li><p><strong>weight</strong>: Expression to use as weight. Can be a constant, column, or function, and any combination of arithmetic operators.</p></li>
<li><p><strong>percentile</strong>: Percentile to compute. Must be a float value between 0 and 1 (inclusive).</p></li>
+<li><p><strong>centroids</strong>: Number of centroids to use in the t-digest algorithm. <em>Default is 100</em>. A higher number results in more accurate approximation but requires more memory.</p></li>
</ul>
</section>
<section id="id71">
@@ -2555,6 +2562,12 @@ This aggregation function can only mix DISTINCT and ORDER BY if the ordering exp
<span class="o">+</span><span class="c1">---------------------------------------------------------------------------------------------+</span>
<span class="o">|</span><span class="w"> </span><span class="mi">78</span><span class="p">.</span><span class="mi">5</span><span class="w"> </span><span class="o">|</span>
<span class="o">+</span><span class="c1">---------------------------------------------------------------------------------------------+</span>
+<span class="o">></span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="n">approx_percentile_cont_with_weight</span><span class="p">(</span><span class="n">weight_column</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">.</span><span class="mi">90</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</s [...]
+<span class="o">+</span><span class="c1">--------------------------------------------------------------------------------------------------+</span>
+<span class="o">|</span><span class="w"> </span><span class="n">approx_percentile_cont_with_weight</span><span class="p">(</span><span class="n">weight_column</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">.</span><span class="mi">90</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">)</span><span class="w"> </span><span class="n">WITHIN</span><span class="w"> </span><span class="k">GROUP</span> [...]
+<span class="o">+</span><span class="c1">--------------------------------------------------------------------------------------------------+</span>
+<span class="o">|</span><span class="w"> </span><span class="mi">78</span><span class="p">.</span><span class="mi">5</span><span class="w"> </span><span class="o">|</span>
+<span class="o">+</span><span class="c1">--------------------------------------------------------------------------------------------------+</span>
</pre></div>
</div>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org