This is an automated email from the ASF dual-hosted git repository.

ron pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d934c14e89 [FLINK-36486] [table-api] Remove deprecated methods 
StreamTableEnvironment#registerDataStream
1d934c14e89 is described below

commit 1d934c14e8968ad2479206c43af2f3e876083fbd
Author: shalini <92672329+sn-1...@users.noreply.github.com>
AuthorDate: Wed Jan 8 16:46:21 2025 +0530

    [FLINK-36486] [table-api] Remove deprecated methods 
StreamTableEnvironment#registerDataStream
    
    ---------
    
    Co-authored-by: “shalini-m20” <“shalini....@ibm.com”>
---
 .../api/bridge/java/StreamTableEnvironment.java    | 22 ------
 .../java/internal/StreamTableEnvironmentImpl.java  |  5 --
 .../api/bridge/scala/StreamTableEnvironment.scala  | 91 ----------------------
 .../internal/StreamTableEnvironmentImpl.scala      | 11 ---
 4 files changed, 129 deletions(-)

diff --git 
a/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/StreamTableEnvironment.java
 
b/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/StreamTableEnvironment.java
index 05bf6fabc82..5161566da67 100644
--- 
a/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/StreamTableEnvironment.java
+++ 
b/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/StreamTableEnvironment.java
@@ -699,28 +699,6 @@ public interface StreamTableEnvironment extends 
TableEnvironment {
     @Deprecated
     <T> Table fromDataStream(DataStream<T> dataStream, Expression... fields);
 
-    /**
-     * Creates a view from the given {@link DataStream}. Registered views can 
be referenced in SQL
-     * queries.
-     *
-     * <p>The field names of the {@link Table} are automatically derived from 
the type of the {@link
-     * DataStream}.
-     *
-     * <p>The view is registered in the namespace of the current catalog and 
database. To register
-     * the view in a different catalog use {@link #createTemporaryView(String, 
DataStream)}.
-     *
-     * <p>Temporary objects can shadow permanent ones. If a permanent object 
in a given path exists,
-     * it will be inaccessible in the current session. To make the permanent 
object available again
-     * you can drop the corresponding temporary object.
-     *
-     * @param name The name under which the {@link DataStream} is registered 
in the catalog.
-     * @param dataStream The {@link DataStream} to register.
-     * @param <T> The type of the {@link DataStream} to register.
-     * @deprecated use {@link #createTemporaryView(String, DataStream)}
-     */
-    @Deprecated
-    <T> void registerDataStream(String name, DataStream<T> dataStream);
-
     /**
      * Creates a view from the given {@link DataStream} in a given path with 
specified field names.
      * Registered views can be referenced in SQL queries.
diff --git 
a/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/internal/StreamTableEnvironmentImpl.java
 
b/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/internal/StreamTableEnvironmentImpl.java
index 3b1591f8dee..ac32073679f 100644
--- 
a/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/internal/StreamTableEnvironmentImpl.java
+++ 
b/flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/internal/StreamTableEnvironmentImpl.java
@@ -310,11 +310,6 @@ public final class StreamTableEnvironmentImpl extends 
AbstractStreamTableEnviron
         return createTable(asQueryOperation(dataStream, 
Optional.of(Arrays.asList(fields))));
     }
 
-    @Override
-    public <T> void registerDataStream(String name, DataStream<T> dataStream) {
-        createTemporaryView(name, dataStream);
-    }
-
     @Override
     public <T> void createTemporaryView(
             String path, DataStream<T> dataStream, Expression... fields) {
diff --git 
a/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/StreamTableEnvironment.scala
 
b/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/StreamTableEnvironment.scala
index 1238dc6da77..e5d33d60244 100644
--- 
a/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/StreamTableEnvironment.scala
+++ 
b/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/StreamTableEnvironment.scala
@@ -654,97 +654,6 @@ trait StreamTableEnvironment extends TableEnvironment {
   @deprecated
   def fromDataStream[T](dataStream: DataStream[T], fields: Expression*): Table
 
-  /**
-   * Creates a view from the given [[DataStream]]. Registered views can be 
referenced in SQL
-   * queries.
-   *
-   * The field names of the [[Table]] are automatically derived from the type 
of the [[DataStream]].
-   *
-   * The view is registered in the namespace of the current catalog and 
database. To register the
-   * view in a different catalog use [[createTemporaryView]].
-   *
-   * Temporary objects can shadow permanent ones. If a permanent object in a 
given path exists, it
-   * will be inaccessible in the current session. To make the permanent object 
available again you
-   * can drop the corresponding temporary object.
-   *
-   * @param name
-   *   The name under which the [[DataStream]] is registered in the catalog.
-   * @param dataStream
-   *   The [[DataStream]] to register.
-   * @tparam T
-   *   The type of the [[DataStream]] to register.
-   * @deprecated
-   *   use [[createTemporaryView]]
-   */
-  @deprecated
-  def registerDataStream[T](name: String, dataStream: DataStream[T]): Unit
-
-  /**
-   * Creates a view from the given [[DataStream]] in a given path with 
specified field names.
-   * Registered views can be referenced in SQL queries.
-   *
-   * There are two modes for mapping original fields to the fields of the View:
-   *
-   *   1. Reference input fields by name: All fields in the schema definition 
are referenced by name
-   *      (and possibly renamed using an alias (as). Moreover, we can define 
proctime and rowtime
-   *      attributes at arbitrary positions using arbitrary names (except 
those that exist in the
-   *      result schema). In this mode, fields can be reordered and projected 
out. This mode can be
-   *      used for any input type, including POJOs.
-   *
-   * Example:
-   *
-   * {{{
-   *   val stream: DataStream[(String, Long)] = ...
-   *   tableEnv.registerDataStream(
-   *      "myTable",
-   *      stream,
-   *      $"_2", // reorder and use the original field
-   *      $"rowtime".rowtime, // extract the internally attached timestamp 
into an event-time
-   *                          // attribute named 'rowtime'
-   *      $"_1" as "name" // reorder and give the original field a better name
-   *   )
-   * }}}
-   *
-   * 2. Reference input fields by position: In this mode, fields are simply 
renamed. Event-time
-   * attributes can replace the field on their position in the input data (if 
it is of correct type)
-   * or be appended at the end. Proctime attributes must be appended at the 
end. This mode can only
-   * be used if the input type has a defined field order (tuple, case class, 
Row) and none of the
-   * `fields` references a field of the input type.
-   *
-   * Example:
-   *
-   * {{{
-   *   val stream: DataStream[(String, Long)] = ...
-   *   tableEnv.registerDataStream(
-   *      "myTable",
-   *      stream,
-   *      $"a", // rename the first field to 'a'
-   *      $"b" // rename the second field to 'b'
-   *      $"rowtime".rowtime // adds an event-time attribute named 'rowtime'
-   *   )
-   * }}}
-   *
-   * The view is registered in the namespace of the current catalog and 
database. To register the
-   * view in a different catalog use [[createTemporaryView]].
-   *
-   * Temporary objects can shadow permanent ones. If a permanent object in a 
given path exists, it
-   * will be inaccessible in the current session. To make the permanent object 
available again you
-   * can drop the corresponding temporary object.
-   *
-   * @param name
-   *   The name under which the [[DataStream]] is registered in the catalog.
-   * @param dataStream
-   *   The [[DataStream]] to register.
-   * @param fields
-   *   The fields expressions to map original fields of the DataStream to the 
fields of the View.
-   * @tparam T
-   *   The type of the [[DataStream]] to register.
-   * @deprecated
-   *   use [[createTemporaryView]]
-   */
-  @deprecated
-  def registerDataStream[T](name: String, dataStream: DataStream[T], fields: 
Expression*): Unit
-
   /**
    * Creates a view from the given [[DataStream]] in a given path with 
specified field names.
    * Registered views can be referenced in SQL queries.
diff --git 
a/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/internal/StreamTableEnvironmentImpl.scala
 
b/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/internal/StreamTableEnvironmentImpl.scala
index 1225360a8e7..60b29a9aeaf 100644
--- 
a/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/internal/StreamTableEnvironmentImpl.scala
+++ 
b/flink-table/flink-table-api-scala-bridge/src/main/scala/org/apache/flink/table/api/bridge/scala/internal/StreamTableEnvironmentImpl.scala
@@ -193,17 +193,6 @@ class StreamTableEnvironmentImpl(
     createTable(queryOperation)
   }
 
-  override def registerDataStream[T](name: String, dataStream: DataStream[T]): 
Unit = {
-    registerTable(name, fromDataStream(dataStream))
-  }
-
-  override def registerDataStream[T](
-      name: String,
-      dataStream: DataStream[T],
-      fields: Expression*): Unit = {
-    registerTable(name, fromDataStream(dataStream, fields: _*))
-  }
-
   override def toAppendStream[T: TypeInformation](table: Table): DataStream[T] 
= {
     val returnType = createTypeInformation[T]
 

Reply via email to