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 264d9cff09 Publish built docs triggered by
747001a41481e0cf39dc758a85d1bdb64fdeb7c0
264d9cff09 is described below
commit 264d9cff091462969bb94a217fe51acedceb6ef1
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Oct 16 06:54:01 2024 +0000
Publish built docs triggered by 747001a41481e0cf39dc758a85d1bdb64fdeb7c0
---
.../user-guide/sql/window_functions_new.md.txt | 27 ++++++++++++
searchindex.js | 2 +-
user-guide/sql/window_functions_new.html | 51 ++++++++++++++++++++++
3 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/_sources/user-guide/sql/window_functions_new.md.txt
b/_sources/user-guide/sql/window_functions_new.md.txt
index ee981911f5..462fc900d1 100644
--- a/_sources/user-guide/sql/window_functions_new.md.txt
+++ b/_sources/user-guide/sql/window_functions_new.md.txt
@@ -157,8 +157,35 @@ All [aggregate functions](aggregate_functions.md) can be
used as window function
## Ranking Functions
+- [dense_rank](#dense_rank)
+- [percent_rank](#percent_rank)
+- [rank](#rank)
- [row_number](#row_number)
+### `dense_rank`
+
+Returns the rank of the current row without gaps. This function ranks rows in
a dense manner, meaning consecutive ranks are assigned even for identical
values.
+
+```
+dense_rank()
+```
+
+### `percent_rank`
+
+Returns the percentage rank of the current row within its partition. The value
ranges from 0 to 1 and is computed as `(rank - 1) / (total_rows - 1)`.
+
+```
+percent_rank()
+```
+
+### `rank`
+
+Returns the rank of the current row within its partition, allowing gaps
between ranks. This function provides a ranking similar to `row_number`, but
skips ranks for identical values.
+
+```
+rank()
+```
+
### `row_number`
Number of the current row within its partition, counting from 1.
diff --git a/searchindex.js b/searchindex.js
index ec966f4e48..13416e194d 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"!=": [[47, "op-neq"]], "!~": [[47,
"op-re-not-match"]], "!~*": [[47, "op-re-not-match-i"]], "!~~": [[47, "id18"]],
"!~~*": [[47, "id19"]], "#": [[47, "op-bit-xor"]], "%": [[47, "op-modulo"]],
"&": [[47, "op-bit-and"]], "(relation, name) tuples in logical fields and
logical columns are unique": [[9,
"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]], "*":
[[47, "op-multiply"]], "+": [[47, "op-plus"]], "-": [[47, "op-minus"]], "/":
[[4 [...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"!=": [[47, "op-neq"]], "!~": [[47,
"op-re-not-match"]], "!~*": [[47, "op-re-not-match-i"]], "!~~": [[47, "id18"]],
"!~~*": [[47, "id19"]], "#": [[47, "op-bit-xor"]], "%": [[47, "op-modulo"]],
"&": [[47, "op-bit-and"]], "(relation, name) tuples in logical fields and
logical columns are unique": [[9,
"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]], "*":
[[47, "op-multiply"]], "+": [[47, "op-plus"]], "-": [[47, "op-minus"]], "/":
[[4 [...]
\ No newline at end of file
diff --git a/user-guide/sql/window_functions_new.html
b/user-guide/sql/window_functions_new.html
index 37d076051c..47a6dd32f4 100644
--- a/user-guide/sql/window_functions_new.html
+++ b/user-guide/sql/window_functions_new.html
@@ -518,6 +518,33 @@
Ranking Functions
</a>
<ul class="nav section-nav flex-column">
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#dense-rank">
+ <code class="docutils literal notranslate">
+ <span class="pre">
+ dense_rank
+ </span>
+ </code>
+ </a>
+ </li>
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#percent-rank">
+ <code class="docutils literal notranslate">
+ <span class="pre">
+ percent_rank
+ </span>
+ </code>
+ </a>
+ </li>
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#rank">
+ <code class="docutils literal notranslate">
+ <span class="pre">
+ rank
+ </span>
+ </code>
+ </a>
+ </li>
<li class="toc-h3 nav-item toc-entry">
<a class="reference internal nav-link" href="#row-number">
<code class="docutils literal notranslate">
@@ -695,8 +722,32 @@ Instead, the rows retain their separate identities. Behind
the scenes, the windo
<section id="ranking-functions">
<h2>Ranking Functions<a class="headerlink" href="#ranking-functions"
title="Link to this heading">¶</a></h2>
<ul class="simple">
+<li><p><a class="reference internal" href="#dense-rank">dense_rank</a></p></li>
+<li><p><a class="reference internal"
href="#percent-rank">percent_rank</a></p></li>
+<li><p><a class="reference internal" href="#rank">rank</a></p></li>
<li><p><a class="reference internal" href="#row-number">row_number</a></p></li>
</ul>
+<section id="dense-rank">
+<h3><code class="docutils literal notranslate"><span
class="pre">dense_rank</span></code><a class="headerlink" href="#dense-rank"
title="Link to this heading">¶</a></h3>
+<p>Returns the rank of the current row without gaps. This function ranks rows
in a dense manner, meaning consecutive ranks are assigned even for identical
values.</p>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">dense_rank</span><span
class="p">()</span>
+</pre></div>
+</div>
+</section>
+<section id="percent-rank">
+<h3><code class="docutils literal notranslate"><span
class="pre">percent_rank</span></code><a class="headerlink"
href="#percent-rank" title="Link to this heading">¶</a></h3>
+<p>Returns the percentage rank of the current row within its partition. The
value ranges from 0 to 1 and is computed as <code class="docutils literal
notranslate"><span class="pre">(rank</span> <span class="pre">-</span> <span
class="pre">1)</span> <span class="pre">/</span> <span
class="pre">(total_rows</span> <span class="pre">-</span> <span
class="pre">1)</span></code>.</p>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">percent_rank</span><span
class="p">()</span>
+</pre></div>
+</div>
+</section>
+<section id="rank">
+<h3><code class="docutils literal notranslate"><span
class="pre">rank</span></code><a class="headerlink" href="#rank" title="Link to
this heading">¶</a></h3>
+<p>Returns the rank of the current row within its partition, allowing gaps
between ranks. This function provides a ranking similar to <code
class="docutils literal notranslate"><span
class="pre">row_number</span></code>, but skips ranks for identical values.</p>
+<div class="highlight-default notranslate"><div
class="highlight"><pre><span></span><span class="n">rank</span><span
class="p">()</span>
+</pre></div>
+</div>
+</section>
<section id="row-number">
<h3><code class="docutils literal notranslate"><span
class="pre">row_number</span></code><a class="headerlink" href="#row-number"
title="Link to this heading">¶</a></h3>
<p>Number of the current row within its partition, counting from 1.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]