You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ji...@apache.org on 2019/01/16 06:56:17 UTC
[flink] branch release-1.7 updated: [FLINK-11331][table][docs] Fix
errors in tableApi.md and functions.md
This is an automated email from the ASF dual-hosted git repository.
jincheng pushed a commit to branch release-1.7
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.7 by this push:
new aa728c5 [FLINK-11331][table][docs] Fix errors in tableApi.md and functions.md
aa728c5 is described below
commit aa728c53281b35aecd37d9a158ad61f1015f7a28
Author: hequn8128 <ch...@gmail.com>
AuthorDate: Tue Jan 15 18:31:57 2019 +0800
[FLINK-11331][table][docs] Fix errors in tableApi.md and functions.md
This closes #7494
---
docs/dev/table/functions.md | 52 ++++++++++++++++++++++++++++++++++++++++++++-
docs/dev/table/tableApi.md | 4 ++--
2 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/docs/dev/table/functions.md b/docs/dev/table/functions.md
index 682f519..f41139d 100644
--- a/docs/dev/table/functions.md
+++ b/docs/dev/table/functions.md
@@ -3573,7 +3573,18 @@ NUMERIC.years
<p>Creates an interval of months for <i>NUMERIC</i> years.</p>
</td>
</tr>
-
+ <tr>
+ <td>
+ {% highlight java %}
+NUMERIC.quarter
+NUMERIC.quarters
+{% endhighlight %}
+ </td>
+ <td>
+ <p>Creates an interval of months for <i>NUMERIC</i> quarters.</p>
+ <p>E.g., <code>2.quarters</code> returns 6.</p>
+ </td>
+ </tr>
<tr>
<td>
{% highlight java %}
@@ -3589,6 +3600,19 @@ NUMERIC.months
<tr>
<td>
{% highlight java %}
+NUMERIC.week
+NUMERIC.weeks
+{% endhighlight %}
+ </td>
+ <td>
+ <p>Creates an interval of milliseconds for <i>NUMERIC</i> weeks.</p>
+ <p>E.g., <code>2.weeks</code> returns 1209600000.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ {% highlight java %}
NUMERIC.day
NUMERIC.days
{% endhighlight %}
@@ -3834,6 +3858,19 @@ NUMERIC.years
<tr>
<td>
{% highlight scala %}
+NUMERIC.quarter
+NUMERIC.quarters
+{% endhighlight %}
+ </td>
+ <td>
+ <p>Creates an interval of months for <i>NUMERIC</i> quarters.</p>
+ <p>E.g., <code>2.quarters</code> returns 6.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ {% highlight scala %}
NUMERIC.month
NUMERIC.months
{% endhighlight %}
@@ -3846,6 +3883,19 @@ NUMERIC.months
<tr>
<td>
{% highlight scala %}
+NUMERIC.week
+NUMERIC.weeks
+{% endhighlight %}
+ </td>
+ <td>
+ <p>Creates an interval of milliseconds for <i>NUMERIC</i> weeks.</p>
+ <p>E.g., <code>2.weeks</code> returns 1209600000.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ {% highlight scala %}
NUMERIC.day
NUMERIC.days
{% endhighlight %}
diff --git a/docs/dev/table/tableApi.md b/docs/dev/table/tableApi.md
index 45ee5a4..9bd720c 100644
--- a/docs/dev/table/tableApi.md
+++ b/docs/dev/table/tableApi.md
@@ -109,7 +109,7 @@ Table orders = tEnv.scan("Orders"); // schema (a, b, c, rowtime)
Table result = orders
.filter("a.isNotNull && b.isNotNull && c.isNotNull")
- .select("a.lowerCase(), b, rowtime")
+ .select("a.lowerCase() as a, b, rowtime")
.window(Tumble.over("1.hour").on("rowtime").as("hourlyWindow"))
.groupBy("hourlyWindow, a")
.select("a, hourlyWindow.end as hour, b.avg as avgBillingAmount");
@@ -128,7 +128,7 @@ val orders: Table = tEnv.scan("Orders") // schema (a, b, c, rowtime)
val result: Table = orders
.filter('a.isNotNull && 'b.isNotNull && 'c.isNotNull)
- .select('a.lowerCase(), 'b, 'rowtime)
+ .select('a.lowerCase() as 'a, 'b, 'rowtime)
.window(Tumble over 1.hour on 'rowtime as 'hourlyWindow)
.groupBy('hourlyWindow, 'a)
.select('a, 'hourlyWindow.end as 'hour, 'b.avg as 'avgBillingAmount)