[ 
https://issues.apache.org/jira/browse/FLINK-6749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16041748#comment-16041748
 ] 

ASF GitHub Bot commented on FLINK-6749:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4046#discussion_r120754137
  
    --- Diff: docs/dev/table/sql.md ---
    @@ -163,31 +164,257 @@ For a better definition of SQL queries within a Java 
String, Flink SQL uses a le
     
     {% top %}
     
    -Example Queries
    ----------------
    +Operations
    +--------------------
    +
    +### Scan, Projection, and Filter
     
    -**TODO: Add a examples for different operations with similar structure as 
for the Table API. Add highlighted tags if an operation is not supported by 
stream / batch.**
    -
    -* Scan & Values
    -* Selection & Projection
    -* Aggregations (distinct only Batch)
    -  * GroupBy
    -  * GroupBy Windows (TUMBLE, HOP, SESSION)
    -  * OVER windows (Only Stream)
    -  * Grouping sets, rollup, cube (only batch)
    -  * Having (only batch?)
    -* Joins
    -  * Inner equi joins (only batch)
    -  * Outer equi joins (only batch)
    -  * TableFunction
    -* Set operations (only batch, except Union ALL)
    -* OrderBy + Limit + Offset
    +<div markdown="1">
    +<table class="table table-bordered">
    +  <thead>
    +    <tr>
    +      <th class="text-left" style="width: 20%">Operators</th>
    +      <th class="text-center">Description</th>
    +    </tr>
    +  </thead>
    +  <tbody>
    +   <tr>
    +           <td><strong>Scan / Select / As</strong></td>
    +           <td>
    +{% highlight sql %}
    +SELECT * FROM Orders
    +SELECT a, c AS d FROM Orders
    +{% endhighlight %}
    +      </td>
    +   </tr>
    +    <tr>
    +      <td><strong>Where / Filter</strong></td>
    +      <td>
    +{% highlight sql %}
    +SELECT * FROM Orders WHERE b = 'red'
    +SELECT * FROM Orders WHERE a % 2 = 0
    +{% endhighlight %}
    +      </td>
    +    </tr>
    +    <tr>
    +      <td><strong>User Defined Functions (UDF)</strong></td>
    +      <td>
    +      <p>SQL queries can refer to UDFs provided that they are registered 
in the `TableEnvironment`.</p>
    +{% highlight sql %}
    +SELECT PRETTY_PRINT(user) FROM Orders
    +{% endhighlight %}
    +      </td>
    +    </tr>
    +  </tbody>
    +</table>
    +</div>
     
     {% top %}
     
    -### GroupBy Windows
    +### Aggregations
     
    -**TODO: Integrate this with the examples**
    +<div markdown="1">
    +<table class="table table-bordered">
    +  <thead>
    +    <tr>
    +      <th class="text-left" style="width: 20%">Operators</th>
    +      <th class="text-center">Description</th>
    +    </tr>
    +  </thead>
    +  <tbody>
    +    <tr>
    +      <td><strong>GroupBy</strong></td>
    +      <td>
    +{% highlight sql %}
    +SELECT a, SUM(b) as d FROM Orders GROUP BY a
    +{% endhighlight %}
    +      </td>
    +    </tr>
    +    <tr>
    +           <td><strong>GroupBy Window</strong></td>
    +           <td>
    +        <p>Use a group window to compute a single result row per group. 
(See <a href="#group-windows">Group Windows</a> for more details.)</p>
    +        {% highlight sql %}
    +        SELECT user, SUM(amount) FROM Orders GROUP BY TUMBLE(rowtime, 
INTERVAL '1' DAY), user
    +        {% endhighlight %}
    +      </td>
    +    </tr>
    +    <tr>
    +           <td><strong>Over Window</strong></td>
    --- End diff --
    
    Add a brief description that only all aggregates must be defined over the 
same window, i.e., we do not support aggregates over different windows.


> Table API / SQL Docs: SQL Page
> ------------------------------
>
>                 Key: FLINK-6749
>                 URL: https://issues.apache.org/jira/browse/FLINK-6749
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Documentation, Table API & SQL
>    Affects Versions: 1.3.0
>            Reporter: Fabian Hueske
>            Assignee: Haohui Mai
>
> Update and refine {{./docs/dev/table/sql.md}} in feature branch 
> https://github.com/apache/flink/tree/tableDocs



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to