Github user yanghua commented on a diff in the pull request: https://github.com/apache/flink/pull/6236#discussion_r199859899 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/BatchTableEnvironment.scala --- @@ -77,15 +90,38 @@ class BatchTableEnvironment( * @return The converted [[Table]]. */ def fromDataSet[T](dataSet: DataSet[T], fields: String): Table = { + + fromDataSet(dataSet, fields, false) + } + + /** + * Converts the given [[DataSet]] into a [[Table]] with specified field names. And could + * also replace the existing table if it is already registered. + * + * Example: + * + * {{{ + * DataSet<Tuple2<String, Long>> set = ... + * Table tab = tableEnv.fromDataSet(set, "a, b", true) + * }}} + * + * @param dataSet The [[DataSet]] to be converted. + * @param fields The field names of the resulting [[Table]]. + * @tparam T The type of the [[DataSet]]. + * @param replace Whether to replace the registered table --- End diff -- end with point.
---