You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/10 01:23:04 UTC

[GitHub] [spark] nchammas commented on a change in pull request #27779: [SPARK-30962][SQL][DOC]Documentation for Alter table command phase 2

nchammas commented on a change in pull request #27779: [SPARK-30962][SQL][DOC]Documentation for Alter table command phase 2
URL: https://github.com/apache/spark/pull/27779#discussion_r390046066
 
 

 ##########
 File path: docs/sql-ref-syntax-ddl-alter-table.md
 ##########
 @@ -83,6 +82,110 @@ ALTER TABLE table_identifier ADD COLUMNS ( col_spec [ , col_spec ... ] )
 </dl>
 
 
+### ALTER OR CHANGE COLUMN
+`ALTER TABLE ALTER COLUMN` or `ALTER TABLE CHANGE COLUMN` statement changes column's comment.
+
+#### Syntax
+{% highlight sql %}
+ALTER TABLE table_identifier { ALTER | CHANGE } [COLUMN] col_spec alterColumnAction
+{% endhighlight %}
+
+#### Parameters
+<dl>
+  <dt><code><em>table_identifier</em></code></dt>
+  <dd>
+    Specifies a table name, which may be optionally qualified with a database name.<br><br>
+    <b>Syntax:</b>
+      <code>
+        [ database_name. ] table_name
+      </code>
+  </dd>
+</dl>
+
+<dl>
+  <dt><code><em>COLUMN col_spec</em></code></dt>
+  <dd>Specifies the column to be altered or be changed.</dd>
+</dl>
+
+<dl>
+  <dt><code><em>alterColumnAction</em></code></dt>
+   <dd>
+     Change the comment string.<br><br>
+     <b>Syntax:</b>
+        <code>
+            COMMENT STRING
+        </code>     
+   </dd>     
+</dl>
+
+
+### ADD AND DROP PARTITION
+
+#### ADD PARTITION
+`ALTER TABLE ADD` statement adds partition to the partitioned table.
+
+##### Syntax
+{% highlight sql %}
+ALTER TABLE table_identifier ADD [IF NOT EXISTS] 
+  PARTITION <partition_spec> 
+  [ PARTITION <partition_spec> ...]
 
 Review comment:
   `,` is not part of the syntax in Spark.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org