twalthr commented on a change in pull request #11527: [FLINK-16035] Updated
Stream/BatchTableEnvironment.java to use Java's Expression DSL
URL: https://github.com/apache/flink/pull/11527#discussion_r398709784
##########
File path:
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/java/BatchTableEnvironment.java
##########
@@ -105,9 +106,30 @@
* @param fields The field names of the resulting {@link Table}.
* @param <T> The type of the {@link DataSet}.
* @return The converted {@link Table}.
+ * @deprecated use {@link #fromDataSet(DataSet, Expression...)}
*/
+ @Deprecated
<T> Table fromDataSet(DataSet<T> dataSet, String fields);
+ /**
+ * Converts the given {@link DataSet} into a {@link Table} with
specified field names.
+ *
+ * Example:
+ *
+ * <pre>
+ * {@code
+ * DataSet<Tuple2<String, Long>> set = ...
+ * Table tab = tableEnv.fromDataSet(set, $("a"), $("b").as("name"),
$("timestamp").rowtime());
+ * }
+ * </pre>
+ *
+ * @param dataSet The {@link DataSet} to be converted.
+ * @param fields The field names of the resulting {@link Table}.
Review comment:
not only names
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services