[hotfix] [table] Add missing semicolons to Table API Java examples. This closes #3754.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/db31ca3f Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/db31ca3f Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/db31ca3f Branch: refs/heads/master Commit: db31ca3f820fee43e3b3cdc3da3ffa49be1f7bf8 Parents: 3b4542b Author: Ken Geis <geis....@gmail.com> Authored: Fri Apr 21 11:09:25 2017 -0700 Committer: Fabian Hueske <fhue...@apache.org> Committed: Fri Apr 21 21:32:38 2017 +0200 ---------------------------------------------------------------------- docs/dev/table_api.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/db31ca3f/docs/dev/table_api.md ---------------------------------------------------------------------- diff --git a/docs/dev/table_api.md b/docs/dev/table_api.md index 2a838c7..3d77b85 100644 --- a/docs/dev/table_api.md +++ b/docs/dev/table_api.md @@ -68,7 +68,7 @@ ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env); // register the DataSet cust as table "Customers" with fields derived from the dataset -tableEnv.registerDataSet("Customers", cust) +tableEnv.registerDataSet("Customers", cust); // register the DataSet ord as table "Orders" with fields user, product, and amount tableEnv.registerDataSet("Orders", ord, "user, product, amount"); @@ -102,7 +102,7 @@ StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironm StreamTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env); // register the DataStream cust as table "Customers" with fields derived from the datastream -tableEnv.registerDataStream("Customers", cust) +tableEnv.registerDataStream("Customers", cust); // register the DataStream ord as table "Orders" with fields user, product, and amount tableEnv.registerDataStream("Orders", ord, "user, product, amount"); @@ -140,10 +140,10 @@ BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env); Table custT = tableEnv .toTable(custDs, "name, zipcode") .where("zipcode = '12345'") - .select("name") + .select("name"); // register the Table custT as table "custNames" -tableEnv.registerTable("custNames", custT) +tableEnv.registerTable("custNames", custT); {% endhighlight %} </div> @@ -178,10 +178,10 @@ An external table is registered in a `TableEnvironment` using a `TableSource` as ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env); -TableSource custTS = new CsvTableSource("/path/to/file", ...) +TableSource custTS = new CsvTableSource("/path/to/file", ...); // register a `TableSource` as external table "Customers" -tableEnv.registerTableSource("Customers", custTS) +tableEnv.registerTableSource("Customers", custTS); {% endhighlight %} </div> @@ -1047,7 +1047,7 @@ The following example shows how to define a window aggregation on a table. Table table = input .window([Window w].as("w")) // define window with alias w .groupBy("w") // group the table by window w - .select("b.sum") // aggregate + .select("b.sum"); // aggregate {% endhighlight %} </div> @@ -1070,7 +1070,7 @@ The following example shows how to define a window aggregation with additional g Table table = input .window([Window w].as("w")) // define window with alias w .groupBy("w, a") // group the table by attribute a and window w - .select("a, b.sum") // aggregate + .select("a, b.sum"); // aggregate {% endhighlight %} </div> @@ -1092,7 +1092,7 @@ The `Window` parameter defines how rows are mapped to windows. `Window` is not a Table table = input .window([Window w].as("w")) // define window with alias w .groupBy("w, a") // group the table by attribute a and window w - .select("a, w.start, w.end, b.count") // aggregate and add window start and end timestamps + .select("a, w.start, w.end, b.count"); // aggregate and add window start and end timestamps {% endhighlight %} </div> @@ -1144,13 +1144,13 @@ Tumbling windows are defined by using the `Tumble` class as follows: <div data-lang="java" markdown="1"> {% highlight java %} // Tumbling Event-time Window -.window(Tumble.over("10.minutes").on("rowtime").as("w")) +.window(Tumble.over("10.minutes").on("rowtime").as("w")); // Tumbling Processing-time Window -.window(Tumble.over("10.minutes").as("w")) +.window(Tumble.over("10.minutes").as("w")); // Tumbling Row-count Window -.window(Tumble.over("10.rows").as("w")) +.window(Tumble.over("10.rows").as("w")); {% endhighlight %} </div> @@ -1211,13 +1211,13 @@ Sliding windows are defined by using the `Slide` class as follows: <div data-lang="java" markdown="1"> {% highlight java %} // Sliding Event-time Window -.window(Slide.over("10.minutes").every("5.minutes").on("rowtime").as("w")) +.window(Slide.over("10.minutes").every("5.minutes").on("rowtime").as("w")); // Sliding Processing-time window -.window(Slide.over("10.minutes").every("5.minutes").as("w")) +.window(Slide.over("10.minutes").every("5.minutes").as("w")); // Sliding Row-count window -.window(Slide.over("10.rows").every("5.rows").as("w")) +.window(Slide.over("10.rows").every("5.rows").as("w")); {% endhighlight %} </div> @@ -1273,10 +1273,10 @@ A session window is defined by using the `Session` class as follows: <div data-lang="java" markdown="1"> {% highlight java %} // Session Event-time Window -.window(Session.withGap("10.minutes").on("rowtime").as("w")) +.window(Session.withGap("10.minutes").on("rowtime").as("w")); // Session Processing-time Window -.window(Session.withGap("10.minutes").as("w")) +.window(Session.withGap("10.minutes").as("w")); {% endhighlight %} </div> @@ -4952,7 +4952,7 @@ public class HashCode extends ScalarFunction { BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env); // register the function -tableEnv.registerFunction("hashCode", new HashCode(10)) +tableEnv.registerFunction("hashCode", new HashCode(10)); // use the function in Java Table API myTable.select("string, string.hashCode(), hashCode(string)"); @@ -5194,7 +5194,7 @@ conf.setString("hashcode_factor", "31"); env.getConfig().setGlobalJobParameters(conf); // register the function -tableEnv.registerFunction("hashCode", new HashCode()) +tableEnv.registerFunction("hashCode", new HashCode()); // use the function in Java Table API myTable.select("string, string.hashCode(), hashCode(string)");