dongjoon-hyun commented on a change in pull request #30888:
URL: https://github.com/apache/spark/pull/30888#discussion_r547561127
##########
File path: docs/sql-ref-syntax-dml-insert-overwrite-table.md
##########
@@ -169,6 +180,34 @@ SELECT * FROM students;
+-----------+-------------------------+----------+
```
+#### Insert with a column list
+
+```sql
+INSERT OVERWRITE students (address, name, student_id) VALUES
+ ('Hangzhou, China', 'Kent Yao', 11215016);
+
+SELECT * FROM students WHERE name = 'Kent Yao';
++---------+----------------------+----------+
+| name| address|student_id|
++---------+----------------------+----------+
+|Kent Yao |Hangzhou, China | 11215016|
++---------+----------------------+----------+
+```
+
+#### Insert with both a partition spec and a column list
+
+```sql
+INSERT OVERWRITE students PARTITION (student_id = 11215017) (address, name)
VALUES
+ ('Hangzhou, China', 'Kent Yao Jr.');
+
+SELECT * FROM students WHERE student_id = '11215017';
Review comment:
Since this is an example for INSERT OVERWRITE, we had better
**overwrite** the data. So, could you use `student_id = '11215016'` instead of
`student_id = '11215017'`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]