flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #3829: [FLINK-6442] [table] Extend TableAPI Support Sink ...
Date Mon, 18 Sep 2017 20:52:14 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3829#discussion_r139529681
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala
---
    @@ -762,13 +763,10 @@ class Table(
         * @tparam T The data type that the [[TableSink]] expects.
         */
       def writeToSink[T](sink: TableSink[T]): Unit = {
    -
    -    def queryConfig = this.tableEnv match {
    -      case s: StreamTableEnvironment => s.queryConfig
    -      case b: BatchTableEnvironment => new BatchQueryConfig
    -      case _ => null
    +    val queryConfig = Option(this.tableEnv) match {
    --- End diff --
    
    `tableEnv` should never be `null`. Can we make this `def queryConfig = this.tableEnv.queryConfig`?


---

Mime
View raw message