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

wenchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new d929c0d  [SPARK-31133][SQL][DOC] fix sql ref doc for DML
d929c0d is described below

commit d929c0dfe8ec4899dbbddbf2d29a6553580fcdec
Author: Wenchen Fan <[email protected]>
AuthorDate: Mon Mar 23 22:00:50 2020 +0800

    [SPARK-31133][SQL][DOC] fix sql ref doc for DML
    
    ### What changes were proposed in this pull request?
    
    `INSERT OVERWRITE DIRECTORY` can only use file format (class implements 
`org.apache.spark.sql.execution.datasources.FileFormat`). This PR fixes it and 
other minor improvement.
    
    ### Why are the changes needed?
    
    ### Does this PR introduce any user-facing change?
    
    ### How was this patch tested?
    
    Closes #27891 from cloud-fan/doc.
    
    Authored-by: Wenchen Fan <[email protected]>
    Signed-off-by: Wenchen Fan <[email protected]>
---
 docs/sql-ref-syntax-dml-insert-overwrite-directory.md | 10 +++++-----
 docs/sql-ref-syntax-dml-insert-overwrite-table.md     |  6 +++---
 docs/sql-ref-syntax-dml-load.md                       | 10 +++++-----
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/docs/sql-ref-syntax-dml-insert-overwrite-directory.md 
b/docs/sql-ref-syntax-dml-insert-overwrite-directory.md
index 6f19c62..7f3224d 100644
--- a/docs/sql-ref-syntax-dml-insert-overwrite-directory.md
+++ b/docs/sql-ref-syntax-dml-insert-overwrite-directory.md
@@ -9,9 +9,9 @@ license: |
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
- 
+
      http://www.apache.org/licenses/LICENSE-2.0
- 
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@ license: |
   limitations under the License.
 ---
 ### Description
-The `INSERT OVERWRITE DIRECTORY` statement overwrites the existing data in the 
directory with the new values using Spark native format. The inserted rows can 
be specified by value expressions or result from a query.
+The `INSERT OVERWRITE DIRECTORY` statement overwrites the existing data in the 
directory with the new values using a given Spark file format. The inserted 
rows can be specified by value expressions or result from a query.
 
 ### Syntax
 {% highlight sql %}
@@ -39,13 +39,13 @@ INSERT OVERWRITE [ LOCAL ] DIRECTORY [ directory_path ]
 <dl>
   <dt><code><em>file_format</em></code></dt>
   <dd>
-  Specifies the file format to use for the insert. Valid options are 
<code>TEXT</code>, <code>CSV</code>, <code>JSON</code>, <code>JDBC</code>, 
<code>PARQUET</code>, <code>ORC</code>, <code>HIVE</code>, <code>DELTA</code>, 
<code>LIBSVM</code>, or a fully qualified class name of a custom implementation 
of <code>org.apache.spark.sql.sources.DataSourceRegister</code>.
+  Specifies the file format to use for the insert. Valid options are 
<code>TEXT</code>, <code>CSV</code>, <code>JSON</code>, <code>JDBC</code>, 
<code>PARQUET</code>, <code>ORC</code>, <code>HIVE</code>, <code>LIBSVM</code>, 
or a fully qualified class name of a custom implementation of 
<code>org.apache.spark.sql.execution.datasources.FileFormat</code>.
   </dd>
 </dl>
 
 <dl>
   <dt><code><em>OPTIONS ( key = val [ , ... ] )</em></code></dt>
-  <dd>Specifies one or more table property key and value pairs.</dd>
+  <dd>Specifies one or more options for the writing of the file format.</dd>
 </dl>
 
 <dl>
diff --git a/docs/sql-ref-syntax-dml-insert-overwrite-table.md 
b/docs/sql-ref-syntax-dml-insert-overwrite-table.md
index 1f32342..2318a8b 100644
--- a/docs/sql-ref-syntax-dml-insert-overwrite-table.md
+++ b/docs/sql-ref-syntax-dml-insert-overwrite-table.md
@@ -9,9 +9,9 @@ license: |
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
- 
+
      http://www.apache.org/licenses/LICENSE-2.0
- 
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -178,7 +178,7 @@ INSERT OVERWRITE [ TABLE ] table_identifier [ 
partition_spec [ IF NOT EXISTS ] ]
      | Jason Wang     | 908 Bird St, Saratoga          | 121212         | true 
          |
      + -------------- + ------------------------------ + -------------- + 
-------------- +
 
- INSERT OVERWRITE students;
+ INSERT OVERWRITE students
       FROM applicants SELECT name, address, id applicants WHERE qualified = 
true;
 
  SELECT * FROM students;
diff --git a/docs/sql-ref-syntax-dml-load.md b/docs/sql-ref-syntax-dml-load.md
index aadfd70..090c49d 100644
--- a/docs/sql-ref-syntax-dml-load.md
+++ b/docs/sql-ref-syntax-dml-load.md
@@ -9,9 +9,9 @@ license: |
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
- 
+
      http://www.apache.org/licenses/LICENSE-2.0
- 
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@ license: |
 ---
 
 ### Description
-`LOAD DATA` statement loads the data into a table from the user specified 
directory or file. If a directory is specified then all the files from the 
directory are loaded. If a file is specified then only the single file is 
loaded. Additionally the `LOAD DATA` statement takes an optional partition 
specification. When a partition is specified, the data files (when input source 
is a directory) or the single file (when input source is a file) are loaded 
into the partition of the target table.
+`LOAD DATA` statement loads the data into a Hive serde table from the user 
specified directory or file. If a directory is specified then all the files 
from the directory are loaded. If a file is specified then only the single file 
is loaded. Additionally the `LOAD DATA` statement takes an optional partition 
specification. When a partition is specified, the data files (when input source 
is a directory) or the single file (when input source is a file) are loaded 
into the partition of the t [...]
 
 ### Syntax
 {% highlight sql %}
@@ -78,7 +78,7 @@ LOAD DATA [ LOCAL ] INPATH path [ OVERWRITE ] INTO TABLE 
table_identifier [ part
      | Amy Smith      | 123 Park Ave, San Jose         | 111111         |
      + -------------- + ------------------------------ + -------------- +
 
- CREATE TABLE test_load (name VARCHAR(64), address VARCHAR(64), student_id 
INT);
+ CREATE TABLE test_load (name VARCHAR(64), address VARCHAR(64), student_id 
INT) USING HIVE;
 
  -- Assuming the students table is in '/user/hive/warehouse/'
  LOAD DATA LOCAL INPATH '/user/hive/warehouse/students' OVERWRITE INTO TABLE 
test_load;
@@ -92,7 +92,7 @@ LOAD DATA [ LOCAL ] INPATH path [ OVERWRITE ] INTO TABLE 
table_identifier [ part
      + -------------- + ------------------------------ + -------------- +
 
  -- Example with partition specification.
- CREATE TABLE test_partition (c1 INT, c2 INT, c3 INT) USING HIVE PARTITIONED 
BY (c2, c3);
+ CREATE TABLE test_partition (c1 INT, c2 INT, c3 INT) PARTITIONED BY (c2, c3);
 
  INSERT INTO test_partition PARTITION (c2 = 2, c3 = 3) VALUES (1);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to