Skip to content

Commit

Permalink
[hotfix][table][docs] correct distinct operator doc for table API.
Browse files Browse the repository at this point in the history
this closes apache#8470
  • Loading branch information
sunjincheng121 committed May 19, 2019
1 parent 4fa3871 commit 7036151
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/dev/table/tableApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ orders.groupBy("users").select("users, myUdagg.distinct(points) as myDistinctRes
Table orders = tableEnv.scan("Orders");
Table result = orders.distinct();
{% endhighlight %}
<p><b>Note:</b> For streaming queries the required state to compute the query result might grow infinitely depending on the number of distinct fields. Please provide a query configuration with valid retention interval to prevent excessive state size. See <a href="streaming/query_configuration.html">Query Configuration</a> for details.</p>
<p><b>Note:</b> For streaming queries the required state to compute the query result might grow infinitely depending on the number of distinct fields. Please provide a query configuration with valid retention interval to prevent excessive state size. If state cleaning is enabled, distinct have to emit messages to prevent too early state eviction of downstream operators which makes distinct contains result updating. See <a href="streaming/query_configuration.html">Query Configuration</a> for details.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -743,15 +743,16 @@ orders.groupBy('users).select('users, myUdagg.distinct('points) as 'myDistinctRe
<tr>
<td>
<strong>Distinct</strong><br>
<span class="label label-primary">Batch</span>
<span class="label label-primary">Batch</span> <span class="label label-primary">Streaming</span> <br>
<span class="label label-info">Result Updating</span>
</td>
<td>
<p>Similar to a SQL DISTINCT clause. Returns records with distinct value combinations.</p>
{% highlight scala %}
val orders: Table = tableEnv.scan("Orders")
val result = orders.distinct()
{% endhighlight %}
<p><b>Note:</b> For streaming queries the required state to compute the query result might grow infinitely depending on the number of distinct fields. Please provide a query configuration with valid retention interval to prevent excessive state size. See <a href="streaming/query_configuration.html">Query Configuration</a> for details.</p>
<p><b>Note:</b> For streaming queries the required state to compute the query result might grow infinitely depending on the number of distinct fields. Please provide a query configuration with valid retention interval to prevent excessive state size. If state cleaning is enabled, distinct have to emit messages to prevent too early state eviction of downstream operators which makes distinct contains result updating. See <a href="streaming/query_configuration.html">Query Configuration</a> for details.</p>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 7036151

Please sign in to comment.