Skip to content

Commit

Permalink
[SPARK-33877][SQL][FOLLOWUP] SQL reference documents for INSERT w/ a …
Browse files Browse the repository at this point in the history
…column list

### What changes were proposed in this pull request?

followup of a3dd8da via suggestion #30888 (comment)
### Why are the changes needed?

doc improvement
### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

passing GA doc

Closes #30909 from yaooqinn/SPARK-33877-F.

Authored-by: Kent Yao <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 368a2c3)
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
yaooqinn authored and dongjoon-hyun committed Dec 23, 2020
1 parent 2bde0bd commit 10cb18f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions docs/sql-ref-syntax-dml-insert-into.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ INSERT INTO [ TABLE ] table_identifier [ partition_spec ] [ ( column_list ) ]

* **column_list**

An optional parameter that specifies a comma-separated list of columns belonging to the `table_identifier` table.
An optional parameter that specifies a comma-separated list of columns belonging to the `table_identifier` table. Spark will reorder the columns of the input query to match the table schema according to the specified column list.

**Note:**The current behaviour has some limitations:
- All specified columns should exist in the table and not be duplicated from each other. It includes all columns except the static partition columns.
- The size of the column list should be exactly the size of the data from `VALUES` clause or query.
- The order of the column list is alterable and determines how the data from `VALUES` clause or query to be inserted by position.

* **VALUES ( { value `|` NULL } [ , ... ] ) [ , ( ... ) ]**

Expand Down
3 changes: 1 addition & 2 deletions docs/sql-ref-syntax-dml-insert-overwrite-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ INSERT OVERWRITE [ TABLE ] table_identifier [ partition_spec [ IF NOT EXISTS ] ]

* **column_list**

An optional parameter that specifies a comma-separated list of columns belonging to the `table_identifier` table.
An optional parameter that specifies a comma-separated list of columns belonging to the `table_identifier` table. Spark will reorder the columns of the input query to match the table schema according to the specified column list.

**Note**

The current behaviour has some limitations:
- All specified columns should exist in the table and not be duplicated from each other. It includes all columns except the static partition columns.
- The size of the column list should be exactly the size of the data from `VALUES` clause or query.
- The order of the column list is alterable and determines how the data from `VALUES` clause or query to be inserted by position.

* **VALUES ( { value `|` NULL } [ , ... ] ) [ , ( ... ) ]**

Expand Down

0 comments on commit 10cb18f

Please sign in to comment.