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

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

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

    https://github.com/apache/flink/pull/2169#discussion_r69043528
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java 
---
    @@ -1193,21 +1196,46 @@ public long count() throws Exception {
                operation.setInput(this);
                return operation.createResult();
        }
    -   
    +
        // 
--------------------------------------------------------------------------------------------
        //  Union
        // 
--------------------------------------------------------------------------------------------
     
        /**
         * Creates a union of this DataSet with an other DataSet. The other 
DataSet must be of the same data type.
    -    * 
    +    *
         * @param other The other DataSet which is unioned with the current 
DataSet.
         * @return The resulting DataSet.
         */
        public UnionOperator<T> union(DataSet<T> other){
                return new UnionOperator<>(this, other, 
Utils.getCallLocationName());
        }
     
    +   /**
    +   * Creates a set minus of this DataSet with an other DataSet. The other 
DataSet must be of the same data type.
    +   *
    +   * @param other The other DataSet which is set minus with the current 
DataSet.
    +   * @return The resulting DataSet.
    +   */
    +   public CoGroupOperator<T, T, T> minus(DataSet<T> other){
    --- End diff --
    
    This issue is about adding `EXCEPT` to the Table. The DataSet API which is 
touched here is a rather low level API and we are quite careful about adding 
new operators. Therefore, changes to the DataSet API should go through a 
separate JIRA issue. Please move this code to `DataSetMinus` class and revert 
the changes to this file. You can open a JIRA issue to discuss adding a `minus` 
operator to the DataSet API. Thank you.


> Add support for EXCEPT (set minus)
> ----------------------------------
>
>                 Key: FLINK-3943
>                 URL: https://issues.apache.org/jira/browse/FLINK-3943
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>    Affects Versions: 1.1.0
>            Reporter: Fabian Hueske
>            Assignee: Ivan Mushketyk
>            Priority: Minor
>
> Currently, the Table API and SQL do not support EXCEPT.
> EXCEPT can be executed as a coGroup on all fields that forwards records of 
> the first input if the second input is empty.
> In order to add support for EXCEPT to the Table API and SQL we need to:
> - Implement a {{DataSetMinus}} class that translates an EXCEPT into a DataSet 
> API program using a coGroup on all fields.
> - Implement a {{DataSetMinusRule}} that translates a Calcite {{LogicalMinus}} 
> into a {{DataSetMinus}}.
> - Extend the Table API (and validation phase) to provide an except() method.



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

Reply via email to