zjuwangg commented on a change in pull request #9971: [FLINK-14490][table] Add 
methods for interacting with temporary objects
URL: https://github.com/apache/flink/pull/9971#discussion_r338461464
 
 

 ##########
 File path: 
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/java/BatchTableEnvironment.java
 ##########
 @@ -108,24 +108,38 @@
        <T> Table fromDataSet(DataSet<T> dataSet, String fields);
 
        /**
-        * Registers the given {@link DataSet} as table in the
-        * {@link TableEnvironment}'s catalog.
+        * Registers the given {@link DataSet} as table in the {@link 
TableEnvironment}'s catalog.
         * Registered tables can be referenced in SQL queries.
         *
-        * The field names of the {@link Table} are automatically derived from 
the type of the{@link DataSet}.
+        * <p>The field names of the {@link Table} are automatically derived
+        * from the type of the {@link DataSet}.
+        *
+        * <p>The view is registered in the current catalog & database. To 
register the view in
+        * a different catalog use {@link #createTemporaryView(String, 
DataSet)}.
         *
         * @param name The name under which the {@link DataSet} is registered 
in the catalog.
         * @param dataSet The {@link DataSet} to register.
         * @param <T> The type of the {@link DataSet} to register.
+        * @deprecated use {@link #createTemporaryView(String, DataSet)}
         */
+       @Deprecated
        <T> void registerDataSet(String name, DataSet<T> dataSet);
 
        /**
-        * Registers the given {@link DataSet} as table with specified field 
names in the
-        * {@link TableEnvironment}'s catalog.
-        * Registered tables can be referenced in SQL queries.
+        * Registers the given {@link DataSet} as a temporary view with 
specified field names in the
+        * {@link TableEnvironment}. Registered views can be referenced in SQL 
queries.
         *
-        * Example:
+        * @param path The path under which the {@link DataSet} is created.
 
 Review comment:
   Maybe it's better to mention if one permanent table already exists in the 
current path, the new temporary will override its path in this session.

----------------------------------------------------------------
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

Reply via email to