sunjincheng121 commented on a change in pull request #8087: 
[FLINK-12029][table] Add column operations for TableApi
URL: https://github.com/apache/flink/pull/8087#discussion_r276875417
 
 

 ##########
 File path: docs/dev/table/functions.md
 ##########
 @@ -5800,3 +5800,284 @@ For Table API, please use `_` for spaces (e.g., 
`DAY_TO_HOUR`).
 |                          | `SQL_TSI_SECOND ` _(SQL-only)_ |
 
 {% top %}
+
+Column Functions
+---------------------------------------
+
+The column functions are used to select or deselect table columns.
+
+| SYNTAX              | DESC                         |
+| :--------------------- | :-------------------------- |
+| columns(...)         | select the specified columns                  |
+| -columns(...)        | deselect the columns specified                  |
+
+The detailed syntax is as follows:
+
+{% highlight text %}
+columnFunction:
+    [-]columns(columnExprs)
+
+columnExprs:
+    columnExpr [, columnExpr]*
+
+columnExpr:
+    columnRef | columnIndex to columnIndex | columnName to columnName
+
+columnRef:
+    columnName(The field name that exists in the table) | columnIndex(a 
positive integer starting from 1)
+{% endhighlight %}
+
+The usage of the column function is illustrated in the following table. 
(Suppose we have a table with 5 columns: `(a: Int, b: Long, c: String, 
d:String, e: String)`):
+
+
+<div class="codetabs" markdown="1">
+<div data-lang="java" markdown="1">
+
+<table class="table table-bordered">
+  <thead>
+    <tr>
+      <th class="text-left" style="width: 20%">Api</th>
+      <th class="text-center">Usage</th>
+      <th class="text-center">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td>
+        columns(*)|*
 
 Review comment:
   We should correct all the name for `columns` and `-columns` for this doc.

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


With regards,
Apache Git Services

Reply via email to