This is an automated email from the ASF dual-hosted git repository. twalthr pushed a commit to branch release-1.6 in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.6 by this push: new 3b81265 [FLINK-11119][docs] Correct Scala example for Table Function in User-defined Functions docs. 3b81265 is described below commit 3b8126531b8dfa4f6ce592afbd61cd6e06f0f8ed Author: wenhuitang <wenhui_t...@yeah.net> AuthorDate: Sat Dec 29 18:50:31 2018 +0800 [FLINK-11119][docs] Correct Scala example for Table Function in User-defined Functions docs. This closes #7379. --- docs/dev/table/udfs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/table/udfs.md b/docs/dev/table/udfs.md index 20bf49d..47c44da 100644 --- a/docs/dev/table/udfs.md +++ b/docs/dev/table/udfs.md @@ -190,7 +190,7 @@ tableEnv.sqlQuery("SELECT a, word, length FROM MyTable LEFT JOIN LATERAL TABLE(s class Split(separator: String) extends TableFunction[(String, Int)] { def eval(str: String): Unit = { // use collect(...) to emit a row. - str.split(separator).foreach(x -> collect((x, x.length)) + str.split(separator).foreach(x => collect((x, x.length))) } } @@ -210,7 +210,7 @@ tableEnv.registerFunction("split", new Split("#")) // CROSS JOIN a table function (equivalent to "join" in Table API) tableEnv.sqlQuery("SELECT a, word, length FROM MyTable, LATERAL TABLE(split(a)) as T(word, length)") // LEFT JOIN a table function (equivalent to "leftOuterJoin" in Table API) -tableEnv.sqlQuery("SELECT a, word, length FROM MyTable LEFT JOIN TABLE(split(a)) as T(word, length) ON TRUE") +tableEnv.sqlQuery("SELECT a, word, length FROM MyTable LEFT JOIN LATERAL TABLE(split(a)) as T(word, length) ON TRUE") {% endhighlight %} **IMPORTANT:** Do not implement TableFunction as a Scala object. Scala object is a singleton and will cause concurrency issues. </div>