You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by twalthr <gi...@git.apache.org> on 2017/05/17 09:42:52 UTC

[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 <tw...@apache.org>
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by fhueske <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by fhueske <gi...@git.apache.org>.
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: 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]].
    +    * @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by fhueske <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by asfgit <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by fhueske <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/3929
  
    Will fix the remaining issues and merge this for RC2 of Flink 1.3.0.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3929: [FLINK-6543] [table] Deprecate toDataStream

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/3929
  
    I forgot to update the documentation. Will do this later.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---