{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/67054034","id":67054034,"diff_hunk":"@@ -0,0 +1,184 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.apache.flink.api.operator\n+\n+import org.apache.flink.api.common.InvalidProgramException\n+import org.apache.flink.api.common.typeinfo.BasicTypeInfo\n+import org.apache.flink.api.java.tuple.{Tuple, Tuple5}\n+import org.apache.flink.api.java.typeutils.TupleTypeInfo\n+import org.apache.flink.api.scala.ExecutionEnvironment\n+import org.apache.flink.api.scala._\n+import org.junit.Test\n+import org.junit.Assert;\n+\n+class MinByOperatorTest {\n+  private val emptyTupleData = List[Tuple5[Integer, Long, String, Long, Integer]]()\n+  private val customTypeData = List[CustomType](new CustomType())\n+  private val tupleTypeInfo: TupleTypeInfo[Tuple5[Integer, Long, String, Long, Integer]] =","path":"flink-scala/src/test/scala/org/apache/flink/api/operator/MinByOperatorTest.scala","position":32,"original_position":32,"commit_id":"9429074763149e134125bd8be1afa4b229ed9640","original_commit_id":"9429074763149e134125bd8be1afa4b229ed9640","user":{"login":"fhueske","id":2388347,"avatar_url":"https://avatars.githubusercontent.com/u/2388347?v=3","gravatar_id":"","url":"https://api.github.com/users/fhueske","html_url":"https://github.com/fhueske","followers_url":"https://api.github.com/users/fhueske/followers","following_url":"https://api.github.com/users/fhueske/following{/other_user}","gists_url":"https://api.github.com/users/fhueske/gists{/gist_id}","starred_url":"https://api.github.com/users/fhueske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhueske/subscriptions","organizations_url":"https://api.github.com/users/fhueske/orgs","repos_url":"https://api.github.com/users/fhueske/repos","events_url":"https://api.github.com/users/fhueske/events{/privacy}","received_events_url":"https://api.github.com/users/fhueske/received_events","type":"User","site_admin":false},"body":"`tupleTypeInfo` is not used. Please check the compiler warnings of your IDE.","created_at":"2016-06-14T20:50:19Z","updated_at":"2016-06-14T20:50:19Z","html_url":"https://github.com/apache/flink/pull/1856#discussion_r67054034","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/1856","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/67054034"},"html":{"href":"https://github.com/apache/flink/pull/1856#discussion_r67054034"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/1856"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/1856","id":65416597,"html_url":"https://github.com/apache/flink/pull/1856","diff_url":"https://github.com/apache/flink/pull/1856.diff","patch_url":"https://github.com/apache/flink/pull/1856.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/1856","number":1856,"state":"open","locked":false,"title":"FLINK-3650 Add maxBy/minBy to Scala DataSet API","user":{"login":"ramkrish86","id":3690658,"avatar_url":"https://avatars.githubusercontent.com/u/3690658?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrish86","html_url":"https://github.com/ramkrish86","followers_url":"https://api.github.com/users/ramkrish86/followers","following_url":"https://api.github.com/users/ramkrish86/following{/other_user}","gists_url":"https://api.github.com/users/ramkrish86/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrish86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrish86/subscriptions","organizations_url":"https://api.github.com/users/ramkrish86/orgs","repos_url":"https://api.github.com/users/ramkrish86/repos","events_url":"https://api.github.com/users/ramkrish86/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrish86/received_events","type":"User","site_admin":false},"body":"I have tried to expose the maxBy/minBy API to scala DataSet. But one thing to note is that in the existing scala DataSet API code groupBy() API returns a GroupedDataSet whereas in the case of java DataSet API it is UnsortedGrouping. The code in scala DataSet is\r\n\r\n`  //  public UnsortedGrouping<T> groupBy(String... fields) {\r\n  //    new UnsortedGrouping<T>(this, new Keys.ExpressionKeys<T>(fields, getType()));\r\n  //  }\r\n`\r\nalready commented out. The UnsortedGrouping internally has maxBy and minBy. So in this PR I have not tried to change those and hence the test case also does not cover groupBy() clause followed by maxBy and minBy ( they are now available only in java based MAxOperatorTest class).\r\nPlease review and provide valuable feedback.\r\nPlease note the change done to SelectByMaxFunction and SelectByMinFunction to support all Tuples but the API itself checks if the type is of type Tuple. ","created_at":"2016-04-06T06:38:51Z","updated_at":"2016-06-14T20:50:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51f61beda74a846f50bf34d9d38413c5fe1a276e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/1856/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/1856/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/1856/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/9429074763149e134125bd8be1afa4b229ed9640","head":{"label":"ramkrish86:FLINK-3650","ref":"FLINK-3650","sha":"9429074763149e134125bd8be1afa4b229ed9640","user":{"login":"ramkrish86","id":3690658,"avatar_url":"https://avatars.githubusercontent.com/u/3690658?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrish86","html_url":"https://github.com/ramkrish86","followers_url":"https://api.github.com/users/ramkrish86/followers","following_url":"https://api.github.com/users/ramkrish86/following{/other_user}","gists_url":"https://api.github.com/users/ramkrish86/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrish86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrish86/subscriptions","organizations_url":"https://api.github.com/users/ramkrish86/orgs","repos_url":"https://api.github.com/users/ramkrish86/repos","events_url":"https://api.github.com/users/ramkrish86/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrish86/received_events","type":"User","site_admin":false},"repo":{"id":50035316,"name":"flink","full_name":"ramkrish86/flink","owner":{"login":"ramkrish86","id":3690658,"avatar_url":"https://avatars.githubusercontent.com/u/3690658?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrish86","html_url":"https://github.com/ramkrish86","followers_url":"https://api.github.com/users/ramkrish86/followers","following_url":"https://api.github.com/users/ramkrish86/following{/other_user}","gists_url":"https://api.github.com/users/ramkrish86/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrish86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrish86/subscriptions","organizations_url":"https://api.github.com/users/ramkrish86/orgs","repos_url":"https://api.github.com/users/ramkrish86/repos","events_url":"https://api.github.com/users/ramkrish86/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrish86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ramkrish86/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/ramkrish86/flink","forks_url":"https://api.github.com/repos/ramkrish86/flink/forks","keys_url":"https://api.github.com/repos/ramkrish86/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramkrish86/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramkrish86/flink/teams","hooks_url":"https://api.github.com/repos/ramkrish86/flink/hooks","issue_events_url":"https://api.github.com/repos/ramkrish86/flink/issues/events{/number}","events_url":"https://api.github.com/repos/ramkrish86/flink/events","assignees_url":"https://api.github.com/repos/ramkrish86/flink/assignees{/user}","branches_url":"https://api.github.com/repos/ramkrish86/flink/branches{/branch}","tags_url":"https://api.github.com/repos/ramkrish86/flink/tags","blobs_url":"https://api.github.com/repos/ramkrish86/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramkrish86/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramkrish86/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramkrish86/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramkrish86/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/ramkrish86/flink/languages","stargazers_url":"https://api.github.com/repos/ramkrish86/flink/stargazers","contributors_url":"https://api.github.com/repos/ramkrish86/flink/contributors","subscribers_url":"https://api.github.com/repos/ramkrish86/flink/subscribers","subscription_url":"https://api.github.com/repos/ramkrish86/flink/subscription","commits_url":"https://api.github.com/repos/ramkrish86/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramkrish86/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramkrish86/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramkrish86/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramkrish86/flink/contents/{+path}","compare_url":"https://api.github.com/repos/ramkrish86/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramkrish86/flink/merges","archive_url":"https://api.github.com/repos/ramkrish86/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramkrish86/flink/downloads","issues_url":"https://api.github.com/repos/ramkrish86/flink/issues{/number}","pulls_url":"https://api.github.com/repos/ramkrish86/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/ramkrish86/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/ramkrish86/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramkrish86/flink/labels{/name}","releases_url":"https://api.github.com/repos/ramkrish86/flink/releases{/id}","deployments_url":"https://api.github.com/repos/ramkrish86/flink/deployments","created_at":"2016-01-20T14:27:43Z","updated_at":"2016-01-20T14:27:55Z","pushed_at":"2016-06-03T18:59:50Z","git_url":"git://github.com/ramkrish86/flink.git","ssh_url":"git@github.com:ramkrish86/flink.git","clone_url":"https://github.com/ramkrish86/flink.git","svn_url":"https://github.com/ramkrish86/flink","homepage":null,"size":86351,"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":"5a60ae4a9ccbe1b677e0b5125e494040da8a5dda","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-14T18:32:27Z","pushed_at":"2016-06-14T17:32:27Z","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":118553,"stargazers_count":1357,"watchers_count":1357,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":869,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":108,"forks":869,"open_issues":108,"watchers":1357,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/1856"},"html":{"href":"https://github.com/apache/flink/pull/1856"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/1856"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/1856/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/1856/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/1856/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/9429074763149e134125bd8be1afa4b229ed9640"}}}}
{"actor":{"display_login":"fhueske"}}