You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by gi...@apache.org on 2023/11/14 16:57:46 UTC
(arrow-datafusion) branch asf-site updated: Publish built docs triggered by 31e54f00c71da3e4441cf59a5deee7fc1d2727f2
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/arrow-datafusion.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 0a739638b4 Publish built docs triggered by 31e54f00c71da3e4441cf59a5deee7fc1d2727f2
0a739638b4 is described below
commit 0a739638b41725e993b1ff8b31f0597ccc999126
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Tue Nov 14 16:57:39 2023 +0000
Publish built docs triggered by 31e54f00c71da3e4441cf59a5deee7fc1d2727f2
---
_sources/user-guide/expressions.md.txt | 1 +
_sources/user-guide/sql/scalar_functions.md.txt | 15 ++++
searchindex.js | 2 +-
user-guide/expressions.html | 5 +-
user-guide/sql/scalar_functions.html | 97 ++++++++++++++++---------
5 files changed, 85 insertions(+), 35 deletions(-)
diff --git a/_sources/user-guide/expressions.md.txt b/_sources/user-guide/expressions.md.txt
index bec3ba9bb2..6b2ab46eb3 100644
--- a/_sources/user-guide/expressions.md.txt
+++ b/_sources/user-guide/expressions.md.txt
@@ -236,6 +236,7 @@ Unlike to some databases the math functions in Datafusion works the same way as
| array_union(array1, array2) | Returns an array of the elements in the union of array1 and array2 without duplicates. `array_union([1, 2, 3, 4], [5, 6, 3, 4]) -> [1, 2, 3, 4, 5, 6]` |
| cardinality(array) | Returns the total number of elements in the array. `cardinality([[1, 2, 3], [4, 5, 6]]) -> 6` |
| make_array(value1, [value2 [, ...]]) | Returns an Arrow array using the specified input expressions. `make_array(1, 2, 3) -> [1, 2, 3]` |
+| range(start [, stop, step]) | Returns an Arrow array between start and stop with step. `SELECT range(2, 10, 3) -> [2, 5, 8]` |
| trim_array(array, n) | Deprecated |
## Regular Expressions
diff --git a/_sources/user-guide/sql/scalar_functions.md.txt b/_sources/user-guide/sql/scalar_functions.md.txt
index 099c903122..826782e1a0 100644
--- a/_sources/user-guide/sql/scalar_functions.md.txt
+++ b/_sources/user-guide/sql/scalar_functions.md.txt
@@ -1560,6 +1560,7 @@ from_unixtime(expression)
- [string_to_array](#string_to_array)
- [string_to_list](#string_to_list)
- [trim_array](#trim_array)
+- [range](#range)
### `array_append`
@@ -2481,6 +2482,20 @@ trim_array(array, n)
Can be a constant, column, or function, and any combination of array operators.
- **n**: Element to trim the array.
+### `range`
+
+Returns an Arrow array between start and stop with step. `SELECT range(2, 10, 3) -> [2, 5, 8]`
+
+The range start..end contains all values with start <= x < end. It is empty if start >= end.
+
+Step can not be 0 (then the range will be nonsense.).
+
+#### Arguments
+
+- **start**: start of the range
+- **end**: end of the range (not included)
+- **step**: increase by step (can not be 0)
+
## Struct Functions
- [struct](#struct)
diff --git a/searchindex.js b/searchindex.js
index a00beebea2..7843a30d39 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["contributor-guide/architecture", "contributor-guide/communication", "contributor-guide/index", "contributor-guide/quarterly_roadmap", "contributor-guide/roadmap", "contributor-guide/specification/index", "contributor-guide/specification/invariants", "contributor-guide/specification/output-field-name-semantic", "index", "library-user-guide/adding-udfs", "library-user-guide/building-logical-plans", "library-user-guide/catalogs", "library-user-guide/custom-tab [...]
\ No newline at end of file
+Search.setIndex({"docnames": ["contributor-guide/architecture", "contributor-guide/communication", "contributor-guide/index", "contributor-guide/quarterly_roadmap", "contributor-guide/roadmap", "contributor-guide/specification/index", "contributor-guide/specification/invariants", "contributor-guide/specification/output-field-name-semantic", "index", "library-user-guide/adding-udfs", "library-user-guide/building-logical-plans", "library-user-guide/catalogs", "library-user-guide/custom-tab [...]
\ No newline at end of file
diff --git a/user-guide/expressions.html b/user-guide/expressions.html
index c1ffb6e063..577036af4b 100644
--- a/user-guide/expressions.html
+++ b/user-guide/expressions.html
@@ -994,7 +994,10 @@ but these operators always return a <code class="docutils literal notranslate"><
<tr class="row-even"><td><p>make_array(value1, [value2 [, …]])</p></td>
<td><p>Returns an Arrow array using the specified input expressions. <code class="docutils literal notranslate"><span class="pre">make_array(1,</span> <span class="pre">2,</span> <span class="pre">3)</span> <span class="pre">-></span> <span class="pre">[1,</span> <span class="pre">2,</span> <span class="pre">3]</span></code></p></td>
</tr>
-<tr class="row-odd"><td><p>trim_array(array, n)</p></td>
+<tr class="row-odd"><td><p>range(start [, stop, step])</p></td>
+<td><p>Returns an Arrow array between start and stop with step. <code class="docutils literal notranslate"><span class="pre">SELECT</span> <span class="pre">range(2,</span> <span class="pre">10,</span> <span class="pre">3)</span> <span class="pre">-></span> <span class="pre">[2,</span> <span class="pre">5,</span> <span class="pre">8]</span></code></p></td>
+</tr>
+<tr class="row-even"><td><p>trim_array(array, n)</p></td>
<td><p>Deprecated</p></td>
</tr>
</tbody>
diff --git a/user-guide/sql/scalar_functions.html b/user-guide/sql/scalar_functions.html
index 12be71a28b..02966c8644 100644
--- a/user-guide/sql/scalar_functions.html
+++ b/user-guide/sql/scalar_functions.html
@@ -2752,6 +2752,22 @@
</li>
</ul>
</li>
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#range">
+ <code class="docutils literal notranslate">
+ <span class="pre">
+ range
+ </span>
+ </code>
+ </a>
+ <ul class="nav section-nav flex-column">
+ <li class="toc-h4 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#id152">
+ Arguments
+ </a>
+ </li>
+ </ul>
+ </li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry">
@@ -2769,7 +2785,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id152">
+ <a class="reference internal nav-link" href="#id153">
Arguments
</a>
</li>
@@ -2792,7 +2808,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id153">
+ <a class="reference internal nav-link" href="#id154">
Arguments
</a>
</li>
@@ -2808,7 +2824,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id154">
+ <a class="reference internal nav-link" href="#id155">
Arguments
</a>
</li>
@@ -2824,7 +2840,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id155">
+ <a class="reference internal nav-link" href="#id156">
Arguments
</a>
</li>
@@ -2840,7 +2856,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id156">
+ <a class="reference internal nav-link" href="#id157">
Arguments
</a>
</li>
@@ -2856,7 +2872,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id157">
+ <a class="reference internal nav-link" href="#id158">
Arguments
</a>
</li>
@@ -2872,7 +2888,7 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id158">
+ <a class="reference internal nav-link" href="#id159">
Arguments
</a>
</li>
@@ -2895,12 +2911,12 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id159">
+ <a class="reference internal nav-link" href="#id160">
Arguments
</a>
</li>
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id160">
+ <a class="reference internal nav-link" href="#id161">
Example
</a>
</li>
@@ -2916,12 +2932,12 @@
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id161">
+ <a class="reference internal nav-link" href="#id162">
Arguments
</a>
</li>
<li class="toc-h4 nav-item toc-entry">
- <a class="reference internal nav-link" href="#id162">
+ <a class="reference internal nav-link" href="#id163">
Example
</a>
</li>
@@ -4589,6 +4605,7 @@ Can be a constant, column, or function, and any combination of arithmetic operat
<li><p><a class="reference internal" href="#string-to-array">string_to_array</a></p></li>
<li><p><a class="reference internal" href="#string-to-list">string_to_list</a></p></li>
<li><p><a class="reference internal" href="#trim-array">trim_array</a></p></li>
+<li><p><a class="reference internal" href="#range">range</a></p></li>
</ul>
<section id="array-append">
<h3><code class="docutils literal notranslate"><span class="pre">array_append</span></code><a class="headerlink" href="#array-append" title="Link to this heading">¶</a></h3>
@@ -5575,6 +5592,20 @@ Can be a constant, column, or function, and any combination of array operators.<
</ul>
</section>
</section>
+<section id="range">
+<h3><code class="docutils literal notranslate"><span class="pre">range</span></code><a class="headerlink" href="#range" title="Link to this heading">¶</a></h3>
+<p>Returns an Arrow array between start and stop with step. <code class="docutils literal notranslate"><span class="pre">SELECT</span> <span class="pre">range(2,</span> <span class="pre">10,</span> <span class="pre">3)</span> <span class="pre">-></span> <span class="pre">[2,</span> <span class="pre">5,</span> <span class="pre">8]</span></code></p>
+<p>The range start..end contains all values with start <= x < end. It is empty if start >= end.</p>
+<p>Step can not be 0 (then the range will be nonsense.).</p>
+<section id="id152">
+<h4>Arguments<a class="headerlink" href="#id152" title="Link to this heading">¶</a></h4>
+<ul class="simple">
+<li><p><strong>start</strong>: start of the range</p></li>
+<li><p><strong>end</strong>: end of the range (not included)</p></li>
+<li><p><strong>step</strong>: increase by step (can not be 0)</p></li>
+</ul>
+</section>
+</section>
</section>
<section id="struct-functions">
<h2>Struct Functions<a class="headerlink" href="#struct-functions" title="Link to this heading">¶</a></h2>
@@ -5608,8 +5639,8 @@ a struct type of fields <code class="docutils literal notranslate"><span class="
<span class="o">+</span><span class="c1">-----------------+</span>
</pre></div>
</div>
-<section id="id152">
-<h4>Arguments<a class="headerlink" href="#id152" title="Link to this heading">¶</a></h4>
+<section id="id153">
+<h4>Arguments<a class="headerlink" href="#id153" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression_n</strong>: Expression to include in the output struct.
Can be a constant, column, or function, and any combination of arithmetic or
@@ -5634,8 +5665,8 @@ string operators.</p></li>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">digest</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">algorithm</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id153">
-<h4>Arguments<a class="headerlink" href="#id153" title="Link to this heading">¶</a></h4>
+<section id="id154">
+<h4>Arguments<a class="headerlink" href="#id154" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string operators.</p></li>
@@ -5661,8 +5692,8 @@ Must be one of:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">md5</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id154">
-<h4>Arguments<a class="headerlink" href="#id154" title="Link to this heading">¶</a></h4>
+<section id="id155">
+<h4>Arguments<a class="headerlink" href="#id155" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string operators.</p></li>
@@ -5675,8 +5706,8 @@ Can be a constant, column, or function, and any combination of string operators.
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sha224</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id155">
-<h4>Arguments<a class="headerlink" href="#id155" title="Link to this heading">¶</a></h4>
+<section id="id156">
+<h4>Arguments<a class="headerlink" href="#id156" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string operators.</p></li>
@@ -5689,8 +5720,8 @@ Can be a constant, column, or function, and any combination of string operators.
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sha256</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id156">
-<h4>Arguments<a class="headerlink" href="#id156" title="Link to this heading">¶</a></h4>
+<section id="id157">
+<h4>Arguments<a class="headerlink" href="#id157" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string operators.</p></li>
@@ -5703,8 +5734,8 @@ Can be a constant, column, or function, and any combination of string operators.
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sha384</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id157">
-<h4>Arguments<a class="headerlink" href="#id157" title="Link to this heading">¶</a></h4>
+<section id="id158">
+<h4>Arguments<a class="headerlink" href="#id158" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string operators.</p></li>
@@ -5717,8 +5748,8 @@ Can be a constant, column, or function, and any combination of string operators.
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sha512</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id158">
-<h4>Arguments<a class="headerlink" href="#id158" title="Link to this heading">¶</a></h4>
+<section id="id159">
+<h4>Arguments<a class="headerlink" href="#id159" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: String expression to operate on.
Can be a constant, column, or function, and any combination of string operators.</p></li>
@@ -5738,8 +5769,8 @@ Can be a constant, column, or function, and any combination of string operators.
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">arrow_cast</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">datatype</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id159">
-<h4>Arguments<a class="headerlink" href="#id159" title="Link to this heading">¶</a></h4>
+<section id="id160">
+<h4>Arguments<a class="headerlink" href="#id160" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: Expression to cast.
Can be a constant, column, or function, and any combination of arithmetic or
@@ -5748,8 +5779,8 @@ string operators.</p></li>
to cast to, as a string. The format is the same as that returned by [<code class="docutils literal notranslate"><span class="pre">arrow_typeof</span></code>]</p></li>
</ul>
</section>
-<section id="id160">
-<h4>Example<a class="headerlink" href="#id160" title="Link to this heading">¶</a></h4>
+<section id="id161">
+<h4>Example<a class="headerlink" href="#id161" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>❯ select arrow_cast(-5, 'Int8') as a,
arrow_cast('foo', 'Dictionary(Int32, Utf8)') as b,
arrow_cast('bar', 'LargeUtf8') as c,
@@ -5771,16 +5802,16 @@ to cast to, as a string. The format is the same as that returned by [<code class
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">arrow_typeof</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
</pre></div>
</div>
-<section id="id161">
-<h4>Arguments<a class="headerlink" href="#id161" title="Link to this heading">¶</a></h4>
+<section id="id162">
+<h4>Arguments<a class="headerlink" href="#id162" title="Link to this heading">¶</a></h4>
<ul class="simple">
<li><p><strong>expression</strong>: Expression to evaluate.
Can be a constant, column, or function, and any combination of arithmetic or
string operators.</p></li>
</ul>
</section>
-<section id="id162">
-<h4>Example<a class="headerlink" href="#id162" title="Link to this heading">¶</a></h4>
+<section id="id163">
+<h4>Example<a class="headerlink" href="#id163" title="Link to this heading">¶</a></h4>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>❯ select arrow_typeof('foo'), arrow_typeof(1);
+---------------------------+------------------------+
| arrow_typeof(Utf8("foo")) | arrow_typeof(Int64(1)) |