[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream
Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3929 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3929#discussion_r117045613 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/StreamTableEnvironment.scala --- @@ -144,13 +144,119 @@ class StreamTableEnvironment( * types: Fields are mapped by position, field types must match. * - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. * +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param clazz The class of the type of the resulting [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + @Deprecated + def toDataStream[T](table: Table, clazz: Class[T]): DataStream[T] = toAppendStream(table, clazz) + + /** +* Converts the given [[Table]] into an append [[DataStream]] of a specified type. +* +* The [[Table]] must only have insert (append) changes. If the [[Table]] is also modified +* by update or delete changes, the conversion will fail. +* +* The fields of the [[Table]] are mapped to [[DataStream]] fields as follows: +* - [[org.apache.flink.types.Row]] and [[org.apache.flink.api.java.tuple.Tuple]] +* types: Fields are mapped by position, field types must match. +* - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. +* +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param typeInfo The [[TypeInformation]] that specifies the type of the [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + def toDataStream[T](table: Table, typeInfo: TypeInformation[T]): DataStream[T] = --- End diff -- add `@Deprecated` annotation --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3929#discussion_r117045701 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/StreamTableEnvironment.scala --- @@ -144,13 +144,119 @@ class StreamTableEnvironment( * types: Fields are mapped by position, field types must match. * - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. * +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param clazz The class of the type of the resulting [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + @Deprecated + def toDataStream[T](table: Table, clazz: Class[T]): DataStream[T] = toAppendStream(table, clazz) + + /** +* Converts the given [[Table]] into an append [[DataStream]] of a specified type. +* +* The [[Table]] must only have insert (append) changes. If the [[Table]] is also modified +* by update or delete changes, the conversion will fail. +* +* The fields of the [[Table]] are mapped to [[DataStream]] fields as follows: +* - [[org.apache.flink.types.Row]] and [[org.apache.flink.api.java.tuple.Tuple]] +* types: Fields are mapped by position, field types must match. +* - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. +* +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param typeInfo The [[TypeInformation]] that specifies the type of the [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + def toDataStream[T](table: Table, typeInfo: TypeInformation[T]): DataStream[T] = +toAppendStream(table, typeInfo) + + /** +* Converts the given [[Table]] into an append [[DataStream]] of a specified type. +* +* The [[Table]] must only have insert (append) changes. If the [[Table]] is also modified +* by update or delete changes, the conversion will fail. +* +* The fields of the [[Table]] are mapped to [[DataStream]] fields as follows: +* - [[org.apache.flink.types.Row]] and [[org.apache.flink.api.java.tuple.Tuple]] +* types: Fields are mapped by position, field types must match. +* - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. +* +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param clazz The class of the type of the resulting [[DataStream]]. +* @param queryConfig The configuration of the query to generate. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + def toDataStream[T]( + table: Table, + clazz: Class[T], + queryConfig: StreamQueryConfig): DataStream[T] = toAppendStream(table, clazz, queryConfig) + + /** +* Converts the given [[Table]] into an append [[DataStream]] of a specified type. +* +* The [[Table]] must only have insert (append) changes. If the [[Table]] is also modified +* by update or delete changes, the conversion will fail. +* +* The fields of the [[Table]] are mapped to [[DataStream]] fields as follows: +* - [[org.apache.flink.types.Row]] and [[org.apache.flink.api.java.tuple.Tuple]] +* types: F
[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3929#discussion_r117050100 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/StreamTableEnvironment.scala --- @@ -144,13 +144,119 @@ class StreamTableEnvironment( * types: Fields are mapped by position, field types must match. * - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. * +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param clazz The class of the type of the resulting [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + @Deprecated + def toDataStream[T](table: Table, clazz: Class[T]): DataStream[T] = toAppendStream(table, clazz) --- End diff -- This method is still referenced from the `java` `package-info.java` file and the `java` `SqlITCase`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3929#discussion_r117045675 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/StreamTableEnvironment.scala --- @@ -144,13 +144,119 @@ class StreamTableEnvironment( * types: Fields are mapped by position, field types must match. * - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. * +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param clazz The class of the type of the resulting [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + @Deprecated + def toDataStream[T](table: Table, clazz: Class[T]): DataStream[T] = toAppendStream(table, clazz) + + /** +* Converts the given [[Table]] into an append [[DataStream]] of a specified type. +* +* The [[Table]] must only have insert (append) changes. If the [[Table]] is also modified +* by update or delete changes, the conversion will fail. +* +* The fields of the [[Table]] are mapped to [[DataStream]] fields as follows: +* - [[org.apache.flink.types.Row]] and [[org.apache.flink.api.java.tuple.Tuple]] +* types: Fields are mapped by position, field types must match. +* - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. +* +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param typeInfo The [[TypeInformation]] that specifies the type of the [[DataStream]]. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + def toDataStream[T](table: Table, typeInfo: TypeInformation[T]): DataStream[T] = +toAppendStream(table, typeInfo) + + /** +* Converts the given [[Table]] into an append [[DataStream]] of a specified type. +* +* The [[Table]] must only have insert (append) changes. If the [[Table]] is also modified +* by update or delete changes, the conversion will fail. +* +* The fields of the [[Table]] are mapped to [[DataStream]] fields as follows: +* - [[org.apache.flink.types.Row]] and [[org.apache.flink.api.java.tuple.Tuple]] +* types: Fields are mapped by position, field types must match. +* - POJO [[DataStream]] types: Fields are mapped by field name, field types must match. +* +* NOTE: This method only supports conversion of append-only tables. In order to make this +* more explicit in the future, please use [[toAppendStream()]] instead. +* If add and retract messages are required, use [[toRetractStream()]]. +* +* @param table The [[Table]] to convert. +* @param clazz The class of the type of the resulting [[DataStream]]. +* @param queryConfig The configuration of the query to generate. +* @tparam T The type of the resulting [[DataStream]]. +* @return The converted [[DataStream]]. +* @deprecated This method only supports conversion of append-only tables. In order to +*make this more explicit in the future, please use toAppendStream() instead. +*/ + def toDataStream[T]( --- End diff -- add `@Deprecated` annotation --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream
GitHub user twalthr opened a pull request: https://github.com/apache/flink/pull/3929 [FLINK-6543] [table] Deprecate toDataStream This deprecates toDataStream in Scala and Java Table API. You can merge this pull request into a Git repository by running: $ git pull https://github.com/twalthr/flink FLINK-6543 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3929.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3929 commit 63832055301a47dff10c9802b9500040457d9d75 Author: twalthr Date: 2017-05-17T09:31:33Z [FLINK-6543] [table] Deprecate toDataStream --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---