{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/69017659","id":69017659,"diff_hunk":"@@ -236,6 +236,32 @@ case class Aggregate(\n   }\n }\n \n+case class SetMinus(left: LogicalNode, right: LogicalNode, all: Boolean) extends BinaryNode {\n+  override def output: Seq[Attribute] = left.output\n+\n+  override protected[logical] def construct(relBuilder: RelBuilder): RelBuilder = {\n+    left.construct(relBuilder)\n+    right.construct(relBuilder)\n+    relBuilder.minus(all)\n+  }\n+\n+  override def validate(tableEnv: TableEnvironment): LogicalNode = {\n+    val resolvedMinus = super.validate(tableEnv).asInstanceOf[SetMinus]\n+    if (left.output.length != right.output.length) {\n+      failValidation(s\"Set minus two table of different column sizes:\" +\n+        s\" ${left.output.size} and ${right.output.size}\")\n+    }\n+    val sameSchema = left.output.zip(right.output).forall { case (l, r) =>\n+      l.resultType == r.resultType && l.name == r.name }","path":"flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/logical/operators.scala","position":20,"original_position":20,"commit_id":"861d83d8b0041a6193a5e7240620d247cd76d0e5","original_commit_id":"861d83d8b0041a6193a5e7240620d247cd76d0e5","user":{"login":"mushketyk","id":592286,"avatar_url":"https://avatars.githubusercontent.com/u/592286?v=3","gravatar_id":"","url":"https://api.github.com/users/mushketyk","html_url":"https://github.com/mushketyk","followers_url":"https://api.github.com/users/mushketyk/followers","following_url":"https://api.github.com/users/mushketyk/following{/other_user}","gists_url":"https://api.github.com/users/mushketyk/gists{/gist_id}","starred_url":"https://api.github.com/users/mushketyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushketyk/subscriptions","organizations_url":"https://api.github.com/users/mushketyk/orgs","repos_url":"https://api.github.com/users/mushketyk/repos","events_url":"https://api.github.com/users/mushketyk/events{/privacy}","received_events_url":"https://api.github.com/users/mushketyk/received_events","type":"User","site_admin":false},"body":"I don't think it makes much sense to perform minus between sets {(1, 2, 3), (4, 5, 6)} and {(1, 2, 3, 10, 20), (4, 5, 6, 50, 60)}. Such operation would likely be a sign of a user error and it seems to me that it's better to throw an exception than silently do something surprising. Therefore I don't think that testMinusDifferentFieldsNames should pass.\r\n\r\nAs for a case when we have different names but identical field count and type I don't see any difference between a union and minus. It seems to me that both union and minus are just set operations on tuples and technically both can work in case when we have tables with different field names.\r\n\r\n@fhueske What do you think about it?","created_at":"2016-06-29T20:08:57Z","updated_at":"2016-06-29T20:08:57Z","html_url":"https://github.com/apache/flink/pull/2169#discussion_r69017659","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/2169","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/69017659"},"html":{"href":"https://github.com/apache/flink/pull/2169#discussion_r69017659"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/2169"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/2169","id":75368574,"html_url":"https://github.com/apache/flink/pull/2169","diff_url":"https://github.com/apache/flink/pull/2169.diff","patch_url":"https://github.com/apache/flink/pull/2169.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/2169","number":2169,"state":"open","locked":false,"title":"[FLINK-3943] Add support for EXCEPT operator","user":{"login":"mushketyk","id":592286,"avatar_url":"https://avatars.githubusercontent.com/u/592286?v=3","gravatar_id":"","url":"https://api.github.com/users/mushketyk","html_url":"https://github.com/mushketyk","followers_url":"https://api.github.com/users/mushketyk/followers","following_url":"https://api.github.com/users/mushketyk/following{/other_user}","gists_url":"https://api.github.com/users/mushketyk/gists{/gist_id}","starred_url":"https://api.github.com/users/mushketyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushketyk/subscriptions","organizations_url":"https://api.github.com/users/mushketyk/orgs","repos_url":"https://api.github.com/users/mushketyk/repos","events_url":"https://api.github.com/users/mushketyk/events{/privacy}","received_events_url":"https://api.github.com/users/mushketyk/received_events","type":"User","site_admin":false},"body":"Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.\r\nIf your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).\r\nIn addition to going through the list, please provide a meaningful description of your changes.\r\n\r\n- [x] General\r\n  - The pull request references the related JIRA issue (\"[FLINK-XXX] Jira title text\")\r\n  - The pull request addresses only one issue\r\n  - Each commit in the PR has a meaningful commit message (including the JIRA id)\r\n\r\n- [x] Documentation\r\n  - Documentation has been added for new functionality\r\n  - Old documentation affected by the pull request has been updated\r\n  - JavaDoc for public methods has been added\r\n\r\n- [x] Tests & Build\r\n  - Functionality added by the pull request is covered by tests\r\n  - `mvn clean verify` has been executed successfully locally or a Travis build has passed\r\n","created_at":"2016-06-27T19:47:08Z","updated_at":"2016-06-29T20:08:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb3c6bde40ed4fe474927a7cc6ce59ba81edec25","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/2169/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/2169/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/2169/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/861d83d8b0041a6193a5e7240620d247cd76d0e5","head":{"label":"mushketyk:except-2","ref":"except-2","sha":"861d83d8b0041a6193a5e7240620d247cd76d0e5","user":{"login":"mushketyk","id":592286,"avatar_url":"https://avatars.githubusercontent.com/u/592286?v=3","gravatar_id":"","url":"https://api.github.com/users/mushketyk","html_url":"https://github.com/mushketyk","followers_url":"https://api.github.com/users/mushketyk/followers","following_url":"https://api.github.com/users/mushketyk/following{/other_user}","gists_url":"https://api.github.com/users/mushketyk/gists{/gist_id}","starred_url":"https://api.github.com/users/mushketyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushketyk/subscriptions","organizations_url":"https://api.github.com/users/mushketyk/orgs","repos_url":"https://api.github.com/users/mushketyk/repos","events_url":"https://api.github.com/users/mushketyk/events{/privacy}","received_events_url":"https://api.github.com/users/mushketyk/received_events","type":"User","site_admin":false},"repo":{"id":61241085,"name":"flink","full_name":"mushketyk/flink","owner":{"login":"mushketyk","id":592286,"avatar_url":"https://avatars.githubusercontent.com/u/592286?v=3","gravatar_id":"","url":"https://api.github.com/users/mushketyk","html_url":"https://github.com/mushketyk","followers_url":"https://api.github.com/users/mushketyk/followers","following_url":"https://api.github.com/users/mushketyk/following{/other_user}","gists_url":"https://api.github.com/users/mushketyk/gists{/gist_id}","starred_url":"https://api.github.com/users/mushketyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mushketyk/subscriptions","organizations_url":"https://api.github.com/users/mushketyk/orgs","repos_url":"https://api.github.com/users/mushketyk/repos","events_url":"https://api.github.com/users/mushketyk/events{/privacy}","received_events_url":"https://api.github.com/users/mushketyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mushketyk/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/mushketyk/flink","forks_url":"https://api.github.com/repos/mushketyk/flink/forks","keys_url":"https://api.github.com/repos/mushketyk/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mushketyk/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mushketyk/flink/teams","hooks_url":"https://api.github.com/repos/mushketyk/flink/hooks","issue_events_url":"https://api.github.com/repos/mushketyk/flink/issues/events{/number}","events_url":"https://api.github.com/repos/mushketyk/flink/events","assignees_url":"https://api.github.com/repos/mushketyk/flink/assignees{/user}","branches_url":"https://api.github.com/repos/mushketyk/flink/branches{/branch}","tags_url":"https://api.github.com/repos/mushketyk/flink/tags","blobs_url":"https://api.github.com/repos/mushketyk/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mushketyk/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mushketyk/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/mushketyk/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mushketyk/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/mushketyk/flink/languages","stargazers_url":"https://api.github.com/repos/mushketyk/flink/stargazers","contributors_url":"https://api.github.com/repos/mushketyk/flink/contributors","subscribers_url":"https://api.github.com/repos/mushketyk/flink/subscribers","subscription_url":"https://api.github.com/repos/mushketyk/flink/subscription","commits_url":"https://api.github.com/repos/mushketyk/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/mushketyk/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/mushketyk/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/mushketyk/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/mushketyk/flink/contents/{+path}","compare_url":"https://api.github.com/repos/mushketyk/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mushketyk/flink/merges","archive_url":"https://api.github.com/repos/mushketyk/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mushketyk/flink/downloads","issues_url":"https://api.github.com/repos/mushketyk/flink/issues{/number}","pulls_url":"https://api.github.com/repos/mushketyk/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/mushketyk/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/mushketyk/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mushketyk/flink/labels{/name}","releases_url":"https://api.github.com/repos/mushketyk/flink/releases{/id}","deployments_url":"https://api.github.com/repos/mushketyk/flink/deployments","created_at":"2016-06-15T21:08:43Z","updated_at":"2016-06-15T21:09:09Z","pushed_at":"2016-06-27T21:33:39Z","git_url":"git://github.com/mushketyk/flink.git","ssh_url":"git@github.com:mushketyk/flink.git","clone_url":"https://github.com/mushketyk/flink.git","svn_url":"https://github.com/mushketyk/flink","homepage":null,"size":91591,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"90cfe0a7b499832cebc2a53f7b066f83dde17de5","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"name":"flink","full_name":"apache/flink","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2016-06-29T18:42:31Z","pushed_at":"2016-06-29T18:35:53Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":120704,"stargazers_count":1393,"watchers_count":1393,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":903,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":122,"forks":903,"open_issues":122,"watchers":1393,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/2169"},"html":{"href":"https://github.com/apache/flink/pull/2169"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/2169"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/2169/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/2169/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/2169/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/861d83d8b0041a6193a5e7240620d247cd76d0e5"}}}}
{"actor":{"display_login":"mushketyk"}}