flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wuchong <...@git.apache.org>
Subject [GitHub] flink pull request #3418: [FLINK-5776][Table API & SQL]Improve XXMapRunner s...
Date Mon, 27 Feb 2017 02:21:17 GMT
Github user wuchong commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/MapRunnerTest.scala
    @@ -0,0 +1,156 @@
    + * 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.runtime
    +import org.apache.flink.api.scala._
    +import org.apache.flink.api.common.functions.{MapFunction, FlatMapFunction, RichFlatMapFunction,
    +import org.apache.flink.api.common.typeinfo.TypeInformation
    +import org.apache.flink.api.common.typeinfo.BasicTypeInfo
    +import org.apache.flink.table.api.TableConfig
    +import org.apache.flink.table.api.scala.stream.utils.StreamITCase
    +import org.apache.flink.table.runtime.MapRunnerTest.StringSink
    +import org.apache.flink.table.codegen.CodeGenerator
    +import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment}
    +import org.apache.flink.streaming.api.functions.sink.RichSinkFunction
    +import org.apache.flink.streaming.util.StreamingMultipleProgramsTestBase
    +import org.junit.Test
    +import org.junit.Assert.{assertEquals, _}
    +import java.util.Collections
    +import scala.collection.mutable
    +import scala.collection.JavaConverters._
    +class MapRunnerTest extends StreamingMultipleProgramsTestBase {
    --- End diff --
    Actually, tests in this class will setup a local cluster to execute. So `MapRunnerITCase`
maybe better than `MapRunnerTest`. 
    IMHO, adding two IT cases to test this functionality is a little heavy. The logic is very
simple and most of the code is covered by CorrelateITCase. So maybe we can not add tests for
this issue. Or add unit test that code generate a map/flatmap wrapped in the runner, can directly
call the runner without setup a cluster. 

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message