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/09/22 12:31:49 UTC

[arrow-datafusion] branch asf-site updated (443af7d651 -> 3e06bd50be)

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


 discard 443af7d651 Publish built docs triggered by 963680dd23f952c55ebf8ff973f8d8fa7d0070a1
     new 3e06bd50be Publish built docs triggered by 4569939b3850a74eb8daa0225ebf6390f99c6422

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (443af7d651)
            \
             N -- N -- N   refs/heads/asf-site (3e06bd50be)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 _sources/user-guide/sql/scalar_functions.md.txt | 34 +++++++++++++++--
 searchindex.js                                  |  2 +-
 user-guide/sql/scalar_functions.html            | 50 ++++++++++++++++++++++---
 3 files changed, 76 insertions(+), 10 deletions(-)


[arrow-datafusion] 01/01: Publish built docs triggered by 4569939b3850a74eb8daa0225ebf6390f99c6422

Posted by gi...@apache.org.
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

commit 3e06bd50be886ca1c64cabafab8da177b69f75b3
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Fri Sep 22 12:31:43 2023 +0000

    Publish built docs triggered by 4569939b3850a74eb8daa0225ebf6390f99c6422
---
 _sources/user-guide/cli.md.txt                  | 47 +++++++++++++++++------
 _sources/user-guide/sql/scalar_functions.md.txt | 34 +++++++++++++++--
 searchindex.js                                  |  2 +-
 user-guide/cli.html                             | 47 +++++++++++++++++------
 user-guide/sql/scalar_functions.html            | 50 ++++++++++++++++++++++---
 5 files changed, 148 insertions(+), 32 deletions(-)

diff --git a/_sources/user-guide/cli.md.txt b/_sources/user-guide/cli.md.txt
index e1f332baf3..05b4165e61 100644
--- a/_sources/user-guide/cli.md.txt
+++ b/_sources/user-guide/cli.md.txt
@@ -75,17 +75,42 @@ USAGE:
     datafusion-cli [OPTIONS]
 
 OPTIONS:
-    -c, --batch-size <BATCH_SIZE>           The batch size of each query, or use DataFusion default
-    -f, --file <FILE>...                    Execute commands from file(s), then exit
-        --format <FORMAT>                   [default: table] [possible values: csv, tsv, table, json,
-                                            nd-json]
-    -h, --help                              Print help information
-    -m, --memory-limit <MEMORY_LIMIT>       The memory pool limitation (e.g. '10g'), default to None (no limit)
-        --mem-pool-type <MEM_POOL_TYPE>     Specify the memory pool type 'greedy' or 'fair', default to 'greedy'
-    -p, --data-path <DATA_PATH>             Path to your data, default to current directory
-    -q, --quiet                             Reduce printing other than the results and work quietly
-    -r, --rc <RC>...                        Run the provided files on startup instead of ~/.datafusionrc
-    -V, --version                           Print version information
+    -b, --batch-size <BATCH_SIZE>
+            The batch size of each query, or use DataFusion default
+
+    -c, --command <COMMAND>...
+            Execute the given command string(s), then exit
+
+    -f, --file <FILE>...
+            Execute commands from file(s), then exit
+
+        --format <FORMAT>
+            [default: table] [possible values: csv, tsv, table, json, nd-json]
+
+    -h, --help
+            Print help information
+
+    -m, --memory-limit <MEMORY_LIMIT>
+            The memory pool limitation (e.g. '10g'), default to None (no limit)
+
+        --maxrows <MAXROWS>
+            The max number of rows to display for 'Table' format
+            [default: 40] [possible values: numbers(0/10/...), inf(no limit)]
+
+        --mem-pool-type <MEM_POOL_TYPE>
+            Specify the memory pool type 'greedy' or 'fair', default to 'greedy'
+
+    -p, --data-path <DATA_PATH>
+            Path to your data, default to current directory
+
+    -q, --quiet
+            Reduce printing other than the results and work quietly
+
+    -r, --rc <RC>...
+            Run the provided files on startup instead of ~/.datafusionrc
+
+    -V, --version
+            Print version information
 ```
 
 ## Querying data from the files directly
diff --git a/_sources/user-guide/sql/scalar_functions.md.txt b/_sources/user-guide/sql/scalar_functions.md.txt
index b68cac5cb7..d5717b9c21 100644
--- a/_sources/user-guide/sql/scalar_functions.md.txt
+++ b/_sources/user-guide/sql/scalar_functions.md.txt
@@ -2566,12 +2566,28 @@ arrow_cast(expression, datatype)
 - **expression**: Expression to cast.
   Can be a constant, column, or function, and any combination of arithmetic or
   string operators.
-- **datatype**: [Arrow data type](https://arrow.apache.org/datafusion/user-guide/sql/data_types.html)
-  to cast to.
+- **datatype**: [Arrow data type](https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html) name
+  to cast to, as a string. The format is the same as that returned by [`arrow_typeof`]
+
+#### Example
+
+```
+❯ select arrow_cast(-5, 'Int8') as a,
+  arrow_cast('foo', 'Dictionary(Int32, Utf8)') as b,
+  arrow_cast('bar', 'LargeUtf8') as c,
+  arrow_cast('2023-01-02T12:53:02', 'Timestamp(Microsecond, Some("+08:00"))') as d
+  ;
++----+-----+-----+---------------------------+
+| a  | b   | c   | d                         |
++----+-----+-----+---------------------------+
+| -5 | foo | bar | 2023-01-02T12:53:02+08:00 |
++----+-----+-----+---------------------------+
+1 row in set. Query took 0.001 seconds.
+```
 
 ### `arrow_typeof`
 
-Returns the underlying Arrow data type of the expression:
+Returns the name of the underlying [Arrow data type](https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html) of the expression:
 
 ```
 arrow_typeof(expression)
@@ -2582,3 +2598,15 @@ arrow_typeof(expression)
 - **expression**: Expression to evaluate.
   Can be a constant, column, or function, and any combination of arithmetic or
   string operators.
+
+#### Example
+
+```
+❯ select arrow_typeof('foo'), arrow_typeof(1);
++---------------------------+------------------------+
+| arrow_typeof(Utf8("foo")) | arrow_typeof(Int64(1)) |
++---------------------------+------------------------+
+| Utf8                      | Int64                  |
++---------------------------+------------------------+
+1 row in set. Query took 0.001 seconds.
+```
diff --git a/searchindex.js b/searchindex.js
index d829a8e584..717d541bda 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/cli.html b/user-guide/cli.html
index 857acb8420..035f146c77 100644
--- a/user-guide/cli.html
+++ b/user-guide/cli.html
@@ -522,17 +522,42 @@ USAGE:
 <span class="w">    </span>datafusion-cli<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
 
 OPTIONS:
-<span class="w">    </span>-c,<span class="w"> </span>--batch-size<span class="w"> </span>&lt;BATCH_SIZE&gt;<span class="w">           </span>The<span class="w"> </span>batch<span class="w"> </span>size<span class="w"> </span>of<span class="w"> </span>each<span class="w"> </span>query,<span class="w"> </span>or<span class="w"> </span>use<span class="w"> </span>DataFusion<span class="w"> </span>default
-<span class="w">    </span>-f,<span class="w"> </span>--file<span class="w"> </span>&lt;FILE&gt;...<span class="w">                    </span>Execute<span class="w"> </span>commands<span class="w"> </span>from<span class="w"> </span>file<span class="o">(</span>s<span class="o">)</span>,<span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="nb">exit</span>
-<span class="w">        </span>--format<span class="w"> </span>&lt;FORMAT&gt;<span class="w">                   </span><span class="o">[</span>default:<span class="w"> </span>table<span class="o">]</span><span class="w"> </span><span class="o">[</span>possible<span class="w"> </span>values:<span class="w"> </span>csv,<span class="w"> </span>tsv,<span class="w"> </span>table,<span class="w"> </span>json,
-<span class="w">                                            </span>nd-json<span class="o">]</span>
-<span class="w">    </span>-h,<span class="w"> </span>--help<span class="w">                              </span>Print<span class="w"> </span><span class="nb">help</span><span class="w"> </span>information
-<span class="w">    </span>-m,<span class="w"> </span>--memory-limit<span class="w"> </span>&lt;MEMORY_LIMIT&gt;<span class="w">       </span>The<span class="w"> </span>memory<span class="w"> </span>pool<span class="w"> </span>limitation<span class="w"> </span><span class="o">(</span>e.g.<span class="w"> </span><span class="s1">&#39;10g&#39;</span><span class="o">)</span>,<span class="w"> </span>default<span class="w"> </span>to<span class="w"> </span>None<span class="w"> </span><span cl [...]
-<span class="w">        </span>--mem-pool-type<span class="w"> </span>&lt;MEM_POOL_TYPE&gt;<span class="w">     </span>Specify<span class="w"> </span>the<span class="w"> </span>memory<span class="w"> </span>pool<span class="w"> </span><span class="nb">type</span><span class="w"> </span><span class="s1">&#39;greedy&#39;</span><span class="w"> </span>or<span class="w"> </span><span class="s1">&#39;fair&#39;</span>,<span class="w"> </span>default<span class="w"> </span>to<span class="w"> </ [...]
-<span class="w">    </span>-p,<span class="w"> </span>--data-path<span class="w"> </span>&lt;DATA_PATH&gt;<span class="w">             </span>Path<span class="w"> </span>to<span class="w"> </span>your<span class="w"> </span>data,<span class="w"> </span>default<span class="w"> </span>to<span class="w"> </span>current<span class="w"> </span>directory
-<span class="w">    </span>-q,<span class="w"> </span>--quiet<span class="w">                             </span>Reduce<span class="w"> </span>printing<span class="w"> </span>other<span class="w"> </span>than<span class="w"> </span>the<span class="w"> </span>results<span class="w"> </span>and<span class="w"> </span>work<span class="w"> </span>quietly
-<span class="w">    </span>-r,<span class="w"> </span>--rc<span class="w"> </span>&lt;RC&gt;...<span class="w">                        </span>Run<span class="w"> </span>the<span class="w"> </span>provided<span class="w"> </span>files<span class="w"> </span>on<span class="w"> </span>startup<span class="w"> </span>instead<span class="w"> </span>of<span class="w"> </span>~/.datafusionrc
-<span class="w">    </span>-V,<span class="w"> </span>--version<span class="w">                           </span>Print<span class="w"> </span>version<span class="w"> </span>information
+<span class="w">    </span>-b,<span class="w"> </span>--batch-size<span class="w"> </span>&lt;BATCH_SIZE&gt;
+<span class="w">            </span>The<span class="w"> </span>batch<span class="w"> </span>size<span class="w"> </span>of<span class="w"> </span>each<span class="w"> </span>query,<span class="w"> </span>or<span class="w"> </span>use<span class="w"> </span>DataFusion<span class="w"> </span>default
+
+<span class="w">    </span>-c,<span class="w"> </span>--command<span class="w"> </span>&lt;COMMAND&gt;...
+<span class="w">            </span>Execute<span class="w"> </span>the<span class="w"> </span>given<span class="w"> </span><span class="nb">command</span><span class="w"> </span>string<span class="o">(</span>s<span class="o">)</span>,<span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="nb">exit</span>
+
+<span class="w">    </span>-f,<span class="w"> </span>--file<span class="w"> </span>&lt;FILE&gt;...
+<span class="w">            </span>Execute<span class="w"> </span>commands<span class="w"> </span>from<span class="w"> </span>file<span class="o">(</span>s<span class="o">)</span>,<span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="nb">exit</span>
+
+<span class="w">        </span>--format<span class="w"> </span>&lt;FORMAT&gt;
+<span class="w">            </span><span class="o">[</span>default:<span class="w"> </span>table<span class="o">]</span><span class="w"> </span><span class="o">[</span>possible<span class="w"> </span>values:<span class="w"> </span>csv,<span class="w"> </span>tsv,<span class="w"> </span>table,<span class="w"> </span>json,<span class="w"> </span>nd-json<span class="o">]</span>
+
+<span class="w">    </span>-h,<span class="w"> </span>--help
+<span class="w">            </span>Print<span class="w"> </span><span class="nb">help</span><span class="w"> </span>information
+
+<span class="w">    </span>-m,<span class="w"> </span>--memory-limit<span class="w"> </span>&lt;MEMORY_LIMIT&gt;
+<span class="w">            </span>The<span class="w"> </span>memory<span class="w"> </span>pool<span class="w"> </span>limitation<span class="w"> </span><span class="o">(</span>e.g.<span class="w"> </span><span class="s1">&#39;10g&#39;</span><span class="o">)</span>,<span class="w"> </span>default<span class="w"> </span>to<span class="w"> </span>None<span class="w"> </span><span class="o">(</span>no<span class="w"> </span>limit<span class="o">)</span>
+
+<span class="w">        </span>--maxrows<span class="w"> </span>&lt;MAXROWS&gt;
+<span class="w">            </span>The<span class="w"> </span>max<span class="w"> </span>number<span class="w"> </span>of<span class="w"> </span>rows<span class="w"> </span>to<span class="w"> </span>display<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="s1">&#39;Table&#39;</span><span class="w"> </span>format
+<span class="w">            </span><span class="o">[</span>default:<span class="w"> </span><span class="m">40</span><span class="o">]</span><span class="w"> </span><span class="o">[</span>possible<span class="w"> </span>values:<span class="w"> </span>numbers<span class="o">(</span><span class="m">0</span>/10/...<span class="o">)</span>,<span class="w"> </span>inf<span class="o">(</span>no<span class="w"> </span>limit<span class="o">)]</span>
+
+<span class="w">        </span>--mem-pool-type<span class="w"> </span>&lt;MEM_POOL_TYPE&gt;
+<span class="w">            </span>Specify<span class="w"> </span>the<span class="w"> </span>memory<span class="w"> </span>pool<span class="w"> </span><span class="nb">type</span><span class="w"> </span><span class="s1">&#39;greedy&#39;</span><span class="w"> </span>or<span class="w"> </span><span class="s1">&#39;fair&#39;</span>,<span class="w"> </span>default<span class="w"> </span>to<span class="w"> </span><span class="s1">&#39;greedy&#39;</span>
+
+<span class="w">    </span>-p,<span class="w"> </span>--data-path<span class="w"> </span>&lt;DATA_PATH&gt;
+<span class="w">            </span>Path<span class="w"> </span>to<span class="w"> </span>your<span class="w"> </span>data,<span class="w"> </span>default<span class="w"> </span>to<span class="w"> </span>current<span class="w"> </span>directory
+
+<span class="w">    </span>-q,<span class="w"> </span>--quiet
+<span class="w">            </span>Reduce<span class="w"> </span>printing<span class="w"> </span>other<span class="w"> </span>than<span class="w"> </span>the<span class="w"> </span>results<span class="w"> </span>and<span class="w"> </span>work<span class="w"> </span>quietly
+
+<span class="w">    </span>-r,<span class="w"> </span>--rc<span class="w"> </span>&lt;RC&gt;...
+<span class="w">            </span>Run<span class="w"> </span>the<span class="w"> </span>provided<span class="w"> </span>files<span class="w"> </span>on<span class="w"> </span>startup<span class="w"> </span>instead<span class="w"> </span>of<span class="w"> </span>~/.datafusionrc
+
+<span class="w">    </span>-V,<span class="w"> </span>--version
+<span class="w">            </span>Print<span class="w"> </span>version<span class="w"> </span>information
 </pre></div>
 </div>
 </section>
diff --git a/user-guide/sql/scalar_functions.html b/user-guide/sql/scalar_functions.html
index a0e4d5785d..80b60165ef 100644
--- a/user-guide/sql/scalar_functions.html
+++ b/user-guide/sql/scalar_functions.html
@@ -2848,6 +2848,11 @@
        Arguments
       </a>
      </li>
+     <li class="toc-h4 nav-item toc-entry">
+      <a class="reference internal nav-link" href="#id156">
+       Example
+      </a>
+     </li>
     </ul>
    </li>
    <li class="toc-h3 nav-item toc-entry">
@@ -2860,10 +2865,15 @@
     </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>
+     <li class="toc-h4 nav-item toc-entry">
+      <a class="reference internal nav-link" href="#id158">
+       Example
+      </a>
+     </li>
     </ul>
    </li>
   </ul>
@@ -5609,25 +5619,53 @@ Can be a constant, column, or function, and any combination of string operators.
 <li><p><strong>expression</strong>: Expression to cast.
 Can be a constant, column, or function, and any combination of arithmetic or
 string operators.</p></li>
-<li><p><strong>datatype</strong>: <a class="reference external" href="https://arrow.apache.org/datafusion/user-guide/sql/data_types.html">Arrow data type</a>
-to cast to.</p></li>
+<li><p><strong>datatype</strong>: <a class="reference external" href="https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html">Arrow data type</a> name
+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="id156">
+<h4>Example<a class="headerlink" href="#id156" title="Link to this heading">¶</a></h4>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>❯ select arrow_cast(-5, &#39;Int8&#39;) as a,
+  arrow_cast(&#39;foo&#39;, &#39;Dictionary(Int32, Utf8)&#39;) as b,
+  arrow_cast(&#39;bar&#39;, &#39;LargeUtf8&#39;) as c,
+  arrow_cast(&#39;2023-01-02T12:53:02&#39;, &#39;Timestamp(Microsecond, Some(&quot;+08:00&quot;))&#39;) as d
+  ;
++----+-----+-----+---------------------------+
+| a  | b   | c   | d                         |
++----+-----+-----+---------------------------+
+| -5 | foo | bar | 2023-01-02T12:53:02+08:00 |
++----+-----+-----+---------------------------+
+1 row in set. Query took 0.001 seconds.
+</pre></div>
+</div>
+</section>
 </section>
 <section id="arrow-typeof">
 <h3><code class="docutils literal notranslate"><span class="pre">arrow_typeof</span></code><a class="headerlink" href="#arrow-typeof" title="Link to this heading">¶</a></h3>
-<p>Returns the underlying Arrow data type of the expression:</p>
+<p>Returns the name of the underlying <a class="reference external" href="https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html">Arrow data type</a> of the expression:</p>
 <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="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>: Expression to evaluate.
 Can be a constant, column, or function, and any combination of arithmetic or
 string operators.</p></li>
 </ul>
 </section>
+<section id="id158">
+<h4>Example<a class="headerlink" href="#id158" title="Link to this heading">¶</a></h4>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>❯ select arrow_typeof(&#39;foo&#39;), arrow_typeof(1);
++---------------------------+------------------------+
+| arrow_typeof(Utf8(&quot;foo&quot;)) | arrow_typeof(Int64(1)) |
++---------------------------+------------------------+
+| Utf8                      | Int64                  |
++---------------------------+------------------------+
+1 row in set. Query took 0.001 seconds.
+</pre></div>
+</div>
+</section>
 </section>
 </section>
 </section>