dawidwys commented on a change in pull request #11989: URL: https://github.com/apache/flink/pull/11989#discussion_r419971222
########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java ########## @@ -111,7 +113,15 @@ * * <pre> * {@code - * tab.select('key, 'value.avg + " The average" as 'average) + * tab.select($("key"), $("value").avg(), lit("The average").as("average")) Review comment: I thought this was a mistake of the original expression. Did not know that you can actually use `+` for strings. ########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java ########## @@ -472,14 +564,31 @@ * table.joinLateral("split(c) as (s)").select("a, b, c, s"); * } * </pre> + * @deprecated use {@link #joinLateral(Expression)} */ + @Deprecated Table joinLateral(String tableFunctionCall); /** * Joins this {@link Table} with an user-defined {@link TableFunction}. This join is similar to * a SQL inner join with ON TRUE predicate but works with a table function. Each row of the * table is joined with all rows produced by the table function. * + * <p>Example: + * + * <pre> + * {@code + * class MySplitUDTF extends TableFunction<String> { + * public void eval(String str) { + * str.split("#").forEach(this::collect); + * } + * } + * + * TableFunction<String> split = new MySplitUDTF() + * table.joinLateral(call(split, $("c")).as("s")).select($("a"), $("b"), $("c"), $("s")) Review comment: We do not have the `call(Class<? extends UserDefinedFunction> function, Object... arguments)`. I must have missed that. I will adress that in a follow up if you are fine with that. ########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java ########## @@ -472,14 +564,31 @@ * table.joinLateral("split(c) as (s)").select("a, b, c, s"); * } * </pre> + * @deprecated use {@link #joinLateral(Expression)} */ + @Deprecated Table joinLateral(String tableFunctionCall); /** * Joins this {@link Table} with an user-defined {@link TableFunction}. This join is similar to * a SQL inner join with ON TRUE predicate but works with a table function. Each row of the * table is joined with all rows produced by the table function. * + * <p>Example: + * + * <pre> + * {@code + * class MySplitUDTF extends TableFunction<String> { + * public void eval(String str) { + * str.split("#").forEach(this::collect); + * } + * } + * + * TableFunction<String> split = new MySplitUDTF() + * table.joinLateral(call(split, $("c")).as("s")).select($("a"), $("b"), $("c"), $("s")) Review comment: Follow up issue: https://issues.apache.org/jira/browse/FLINK-17523 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org