Github user beyond1920 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3409#discussion_r107059962
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/BatchTableEnvironment.scala
 ---
    @@ -178,4 +178,32 @@ class BatchTableEnvironment(
     
         registerTableFunctionInternal[T](name, tf)
       }
    +
    +  /**
    +    * Scans a table from registered temporary tables and registered 
catalogs.
    +    *
    +    * The table to scan must be registered in the TableEnvironment or
    +    * must exist in registered catalog in the TableEnvironment.
    +    *
    +    * Example:
    +    *
    +    * to scan a registered temporary table
    +    * {{{
    +    *   val tab: Table = tableEnv.scan("tableName")
    +    * }}}
    +    *
    +    * to scan a table from a registered catalog
    +    * {{{
    +    *   val tab: Table = tableEnv.scan("catalogName.dbName.tableName")
    +    * }}}
    +    *
    +    * @param tablePath The path of the table to scan.
    +    * @throws TableException if no table is found using the given table 
path.
    +    * @return The resulting [[Table]].
    +    */
    +  @throws[TableException]
    +  def scan(tablePath: String): Table = {
    --- End diff --
    
    hi, @twalthr,  there already existed scan method which is `def 
scan(tableName: String)`, I added a scan method which is `def scan(catalogName: 
String, dbName: String, tableName: String)` in first commit. Fabian suggest 
that we could extend the previous scan(String) to accept varargs parameters. 
And We would need to push the implementation to the Scala / Java versions of 
BatchTableEnvironment and StreamTableEnvironment because varargs are handled 
differently by Scala and Java. In this way, we could keep the API more concise 
because we only need a single scan() method. I think it's a good idea, so I 
updated the pr in the second commit. Maybe I'm confused something there.  Any 
advice? @fhueske, @twalthr .


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

Reply via email to