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 72fd153e13 Publish built docs triggered by 
2956ec2962d7af94be53243427f8795d29fa90a3
72fd153e13 is described below

commit 72fd153e13e7726f0a58260cc21c47698fdbb1d3
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Mar 29 13:40:02 2024 +0000

    Publish built docs triggered by 2956ec2962d7af94be53243427f8795d29fa90a3
---
 _sources/user-guide/sql/dml.md.txt | 19 ++++++++++++++-----
 searchindex.js                     |  2 +-
 user-guide/sql/dml.html            | 19 ++++++++++++++-----
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/_sources/user-guide/sql/dml.md.txt 
b/_sources/user-guide/sql/dml.md.txt
index b9614bb8f9..79c36092fd 100644
--- a/_sources/user-guide/sql/dml.md.txt
+++ b/_sources/user-guide/sql/dml.md.txt
@@ -25,11 +25,14 @@ and modifying data in tables.
 ## COPY
 
 Copies the contents of a table or query to file(s). Supported file
-formats are `parquet`, `csv`, and `json` and can be inferred based on
-filename if writing to a single file.
+formats are `parquet`, `csv`, `json`, and `arrow`.
 
 <pre>
-COPY { <i><b>table_name</i></b> | <i><b>query</i></b> } TO 
'<i><b>file_name</i></b>' [ ( <i><b>option</i></b> [, ... ] ) ]
+COPY { <i><b>table_name</i></b> | <i><b>query</i></b> } 
+TO '<i><b>file_name</i></b>'
+[ STORED AS <i><b>format</i></b> ]
+[ PARTITIONED BY <i><b>column_name</i></b> [, ...] ]
+[ OPTIONS( <i><b>option</i></b> [, ... ] ) ]
 </pre>
 
 For a detailed list of valid OPTIONS, see [Write Options](write_options).
@@ -61,7 +64,7 @@ Copy the contents of `source_table` to multiple directories
 of hive-style partitioned parquet files:
 
 ```sql
-> COPY source_table TO 'dir_name' (FORMAT parquet, partition_by 'column1, 
column2');
+> COPY source_table TO 'dir_name' STORED AS parquet, PARTITIONED BY (column1, 
column2);
 +-------+
 | count |
 +-------+
@@ -74,7 +77,7 @@ results (maintaining the order) to a parquet file named
 `output.parquet` with a maximum parquet row group size of 10MB:
 
 ```sql
-> COPY (SELECT * from source ORDER BY time) TO 'output.parquet' 
(ROW_GROUP_LIMIT_BYTES 10000000);
+> COPY (SELECT * from source ORDER BY time) TO 'output.parquet' OPTIONS 
(MAX_ROW_GROUP_SIZE 10000000);
 +-------+
 | count |
 +-------+
@@ -82,6 +85,12 @@ results (maintaining the order) to a parquet file named
 +-------+
 ```
 
+The output format is determined by the first match of the following rules:
+
+1. Value of `STORED AS`
+2. Value of the `OPTION (FORMAT ..)`
+3. Filename extension (e.g. `foo.parquet` implies `PARQUET` format)
+
 ## INSERT
 
 Insert values into a table.
diff --git a/searchindex.js b/searchindex.js
index 7cf25a9887..c504e337d4 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/sql/dml.html b/user-guide/sql/dml.html
index 937cd8a279..2b48fdb9c6 100644
--- a/user-guide/sql/dml.html
+++ b/user-guide/sql/dml.html
@@ -420,10 +420,13 @@ and modifying data in tables.</p>
 <section id="copy">
 <h2>COPY<a class="headerlink" href="#copy" title="Link to this 
heading">¶</a></h2>
 <p>Copies the contents of a table or query to file(s). Supported file
-formats are <code class="docutils literal notranslate"><span 
class="pre">parquet</span></code>, <code class="docutils literal 
notranslate"><span class="pre">csv</span></code>, and <code class="docutils 
literal notranslate"><span class="pre">json</span></code> and can be inferred 
based on
-filename if writing to a single file.</p>
+formats are <code class="docutils literal notranslate"><span 
class="pre">parquet</span></code>, <code class="docutils literal 
notranslate"><span class="pre">csv</span></code>, <code class="docutils literal 
notranslate"><span class="pre">json</span></code>, and <code class="docutils 
literal notranslate"><span class="pre">arrow</span></code>.</p>
 <pre>
-COPY { <i><b>table_name</i></b> | <i><b>query</i></b> } TO 
'<i><b>file_name</i></b>' [ ( <i><b>option</i></b> [, ... ] ) ]
+COPY { <i><b>table_name</i></b> | <i><b>query</i></b> } 
+TO '<i><b>file_name</i></b>'
+[ STORED AS <i><b>format</i></b> ]
+[ PARTITIONED BY <i><b>column_name</i></b> [, ...] ]
+[ OPTIONS( <i><b>option</i></b> [, ... ] ) ]
 </pre>
 <p>For a detailed list of valid OPTIONS, see <a class="reference internal" 
href="write_options.html"><span class="doc std std-doc">Write 
Options</span></a>.</p>
 <p>Copy the contents of <code class="docutils literal notranslate"><span 
class="pre">source_table</span></code> to <code class="docutils literal 
notranslate"><span class="pre">file_name.json</span></code> in JSON format:</p>
@@ -447,7 +450,7 @@ files in the <code class="docutils literal 
notranslate"><span class="pre">dir_na
 </div>
 <p>Copy the contents of <code class="docutils literal notranslate"><span 
class="pre">source_table</span></code> to multiple directories
 of hive-style partitioned parquet files:</p>
-<div class="highlight-sql notranslate"><div 
class="highlight"><pre><span></span><span class="o">&gt;</span><span class="w"> 
</span><span class="k">COPY</span><span class="w"> </span><span 
class="n">source_table</span><span class="w"> </span><span 
class="k">TO</span><span class="w"> </span><span 
class="s1">&#39;dir_name&#39;</span><span class="w"> </span><span 
class="p">(</span><span class="n">FORMAT</span><span class="w"> </span><span 
class="n">parquet</span><span class="p">,</span><span [...]
+<div class="highlight-sql notranslate"><div 
class="highlight"><pre><span></span><span class="o">&gt;</span><span class="w"> 
</span><span class="k">COPY</span><span class="w"> </span><span 
class="n">source_table</span><span class="w"> </span><span 
class="k">TO</span><span class="w"> </span><span 
class="s1">&#39;dir_name&#39;</span><span class="w"> </span><span 
class="n">STORED</span><span class="w"> </span><span class="k">AS</span><span 
class="w"> </span><span class="n">parquet</span><spa [...]
 <span class="o">+</span><span class="c1">-------+</span>
 <span class="o">|</span><span class="w"> </span><span 
class="k">count</span><span class="w"> </span><span class="o">|</span>
 <span class="o">+</span><span class="c1">-------+</span>
@@ -458,7 +461,7 @@ of hive-style partitioned parquet files:</p>
 <p>Run the query <code class="docutils literal notranslate"><span 
class="pre">SELECT</span> <span class="pre">*</span> <span 
class="pre">from</span> <span class="pre">source</span> <span 
class="pre">ORDER</span> <span class="pre">BY</span> <span 
class="pre">time</span></code> and write the
 results (maintaining the order) to a parquet file named
 <code class="docutils literal notranslate"><span 
class="pre">output.parquet</span></code> with a maximum parquet row group size 
of 10MB:</p>
-<div class="highlight-sql notranslate"><div 
class="highlight"><pre><span></span><span class="o">&gt;</span><span class="w"> 
</span><span class="k">COPY</span><span class="w"> </span><span 
class="p">(</span><span class="k">SELECT</span><span class="w"> </span><span 
class="o">*</span><span class="w"> </span><span class="k">from</span><span 
class="w"> </span><span class="k">source</span><span class="w"> </span><span 
class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><spa 
[...]
+<div class="highlight-sql notranslate"><div 
class="highlight"><pre><span></span><span class="o">&gt;</span><span class="w"> 
</span><span class="k">COPY</span><span class="w"> </span><span 
class="p">(</span><span class="k">SELECT</span><span class="w"> </span><span 
class="o">*</span><span class="w"> </span><span class="k">from</span><span 
class="w"> </span><span class="k">source</span><span class="w"> </span><span 
class="k">ORDER</span><span class="w"> </span><span class="k">BY</span><spa 
[...]
 <span class="o">+</span><span class="c1">-------+</span>
 <span class="o">|</span><span class="w"> </span><span 
class="k">count</span><span class="w"> </span><span class="o">|</span>
 <span class="o">+</span><span class="c1">-------+</span>
@@ -466,6 +469,12 @@ results (maintaining the order) to a parquet file named
 <span class="o">+</span><span class="c1">-------+</span>
 </pre></div>
 </div>
+<p>The output format is determined by the first match of the following 
rules:</p>
+<ol class="arabic simple">
+<li><p>Value of <code class="docutils literal notranslate"><span 
class="pre">STORED</span> <span class="pre">AS</span></code></p></li>
+<li><p>Value of the <code class="docutils literal notranslate"><span 
class="pre">OPTION</span> <span class="pre">(FORMAT</span> <span 
class="pre">..)</span></code></p></li>
+<li><p>Filename extension (e.g. <code class="docutils literal 
notranslate"><span class="pre">foo.parquet</span></code> implies <code 
class="docutils literal notranslate"><span class="pre">PARQUET</span></code> 
format)</p></li>
+</ol>
 </section>
 <section id="insert">
 <h2>INSERT<a class="headerlink" href="#insert" title="Link to this 
heading">¶</a></h2>

Reply via email to