You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/12 09:16:50 UTC

[GitHub] [flink] twalthr commented on a diff in pull request #19436: [FLINK-27201][table] Remove CollectTableSink

twalthr commented on code in PR #19436:
URL: https://github.com/apache/flink/pull/19436#discussion_r848191439


##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/DagOptimizationTest.scala:
##########
@@ -34,67 +33,67 @@ class DagOptimizationTest extends TableTestBase {
   util.addTableSource[(Int, Long, String)]("MyTable", 'a, 'b, 'c)
   util.addTableSource[(Int, Long, String)]("MyTable1", 'd, 'e, 'f)
 
-  val STRING = VarCharType.STRING_TYPE
-  val LONG = new BigIntType()
-  val INT = new IntType()
-  val DOUBLE = new DoubleType()
-  val TIMESTAMP = new TimestampType(3)
+  val STRING = DataTypes.STRING()

Review Comment:
   remove those constants



##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/LegacySinkTest.scala:
##########
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.table.planner.plan.batch.sql
-
-import org.apache.flink.api.scala._
-import org.apache.flink.table.api._
-import org.apache.flink.table.api.config.TableConfigOptions
-import org.apache.flink.table.api.internal.TableEnvironmentInternal
-import org.apache.flink.table.planner.plan.optimize.RelNodeBlockPlanBuilder
-import org.apache.flink.table.planner.utils.TableTestBase
-import org.apache.flink.table.types.logical.{BigIntType, IntType}
-
-import org.junit.Test
-
-class LegacySinkTest extends TableTestBase {

Review Comment:
   isn't this a bit too quick? this test should be removed when the `TableSink` interface is removed



##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/utils/TableTestBase.scala:
##########
@@ -1644,6 +1625,34 @@ object TableTestUtil {
     tEnv.registerTable(name, table)
   }
 
+  // -- Connector utilities
+
+  /**
+   * Create a blackhole sink [[TableDescriptor]]
+   */
+  def createBlackHoleSinkDescriptor(
+    fieldNames: Array[String],

Review Comment:
   let's not offer this method for now, it is nicer to keep name and type next to each other. btw we can also offer `createBlackHoleSinkDescriptor(DataTypes.FIELD(...)*)`



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org