[ 
https://issues.apache.org/jira/browse/FLINK-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15348828#comment-15348828
 ] 

ASF GitHub Bot commented on FLINK-3942:
---------------------------------------

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

    https://github.com/apache/flink/pull/2159#discussion_r68474420
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/api/scala/batch/sql/IntersectITCase.scala
 ---
    @@ -0,0 +1,108 @@
    +/*
    + * 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.api.scala.batch.sql
    +
    +import org.apache.flink.api.scala._
    +import org.apache.flink.api.scala.batch.utils.TableProgramsTestBase
    +import 
org.apache.flink.api.scala.batch.utils.TableProgramsTestBase.TableConfigMode
    +import org.apache.flink.api.scala.table._
    +import org.apache.flink.api.scala.util.CollectionDataSets
    +import org.apache.flink.api.table.{Row, TableEnvironment}
    +import 
org.apache.flink.test.util.MultipleProgramsTestBase.TestExecutionMode
    +import org.apache.flink.test.util.TestBaseUtils
    +import org.junit._
    +import org.junit.runner.RunWith
    +import org.junit.runners.Parameterized
    +
    +import scala.collection.JavaConverters._
    +import scala.collection.mutable
    +import scala.util.Random
    +
    +@RunWith(classOf[Parameterized])
    +class IntersectITCase(
    +    mode: TestExecutionMode,
    +    configMode: TableConfigMode)
    +  extends TableProgramsTestBase(mode, configMode) {
    +
    +  @Test
    +  def testIntersect(): Unit = {
    --- End diff --
    
    I think we need only this test to verify that intersect works correctly. 
However, for each test class (child of `TableProgramsTestBase`) a new test 
cluster is started which causes significant overhead. Can you add this test to 
`UnionITCase` and rename it to `SetOperatorsITCase`?


> Add support for INTERSECT
> -------------------------
>
>                 Key: FLINK-3942
>                 URL: https://issues.apache.org/jira/browse/FLINK-3942
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>    Affects Versions: 1.1.0
>            Reporter: Fabian Hueske
>            Assignee: Jark Wu
>            Priority: Minor
>
> Currently, the Table API and SQL do not support INTERSECT.
> INTERSECT can be executed as join on all fields.
> In order to add support for INTERSECT to the Table API and SQL we need to:
> - Implement a {{DataSetIntersect}} class that translates an INTERSECT into a 
> DataSet API program using a join on all fields.
> - Implement a {{DataSetIntersectRule}} that translates a Calcite 
> {{LogicalIntersect}} into a {{DataSetIntersect}}.
> - Extend the Table API (and validation phase) to provide an intersect() 
> method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to