GitHub PullRequestReviewCommentEvent at 2014-12-15 02:55:53
Repository: maestro
Actor: stephanh
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/CommBank/maestro/pulls/comments/21803345","id":21803345,"diff_hunk":"@@ -0,0 +1,157 @@\n+//   Copyright 2014 Commonwealth Bank of Australia\n+//\n+//   Licensed under the Apache License, Version 2.0 (the \"License\");\n+//   you may not use this file except in compliance with the License.\n+//   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 au.com.cba.omnia.maestro.macros\n+\n+import scala.reflect.macros.Context\n+\n+import com.twitter.scrooge.ThriftStruct\n+\n+import au.com.cba.omnia.maestro.core.transform.Join\n+\n+/**\n+  * Macro to join a Tuple or Product of Thrift structures into one resulting structure.\n+  *\n+  * It produces a function that will copy data from input column to output column.\n+  * Compilation error will be produced if:\n+  * - any of input types is not a Thrift Structure\n+  * - types in input are not unique\n+  * - not all of output fields are included in input types\n+  * - any of input/output fields with the same name have different type\n+  * If multiple types contain column with the same name and type macro will use the value\n+  * from type that is first in types Tuple.\n+  */\n+object JoinMacro {\n+  def impl[A <: Product : c.WeakTypeTag, B <: ThriftStruct : c.WeakTypeTag](c: Context)\n+      : c.Expr[Join[A, B]] = {\n+    import c.universe._\n+    import com.twitter.scrooge.ThriftStruct","path":"maestro-macros/src/main/scala/au/com/cba/omnia/maestro/macros/JoinMacro.scala","position":39,"original_position":39,"commit_id":"26044d40e1fba974b3bc3a826aa83404beb5db7d","original_commit_id":"26044d40e1fba974b3bc3a826aa83404beb5db7d","user":{"login":"stephanh","id":376868,"avatar_url":"https://avatars.githubusercontent.com/u/376868?v=3","gravatar_id":"","url":"https://api.github.com/users/stephanh","html_url":"https://github.com/stephanh","followers_url":"https://api.github.com/users/stephanh/followers","following_url":"https://api.github.com/users/stephanh/following{/other_user}","gists_url":"https://api.github.com/users/stephanh/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanh/subscriptions","organizations_url":"https://api.github.com/users/stephanh/orgs","repos_url":"https://api.github.com/users/stephanh/repos","events_url":"https://api.github.com/users/stephanh/events{/privacy}","received_events_url":"https://api.github.com/users/stephanh/received_events","type":"User","site_admin":false},"body":"It's already imported.","created_at":"2014-12-15T02:55:53Z","updated_at":"2014-12-15T02:55:53Z","html_url":"https://github.com/CommBank/maestro/pull/279#discussion_r21803345","pull_request_url":"https://api.github.com/repos/CommBank/maestro/pulls/279","_links":{"self":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/comments/21803345"},"html":{"href":"https://github.com/CommBank/maestro/pull/279#discussion_r21803345"},"pull_request":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/279"}}},"pull_request":{"url":"https://api.github.com/repos/CommBank/maestro/pulls/279","id":26041925,"html_url":"https://github.com/CommBank/maestro/pull/279","diff_url":"https://github.com/CommBank/maestro/pull/279.diff","patch_url":"https://github.com/CommBank/maestro/pull/279.patch","issue_url":"https://api.github.com/repos/CommBank/maestro/issues/279","number":279,"state":"open","locked":false,"title":"Macro joining Thrift structs.","user":{"login":"huragan","id":3033666,"avatar_url":"https://avatars.githubusercontent.com/u/3033666?v=3","gravatar_id":"","url":"https://api.github.com/users/huragan","html_url":"https://github.com/huragan","followers_url":"https://api.github.com/users/huragan/followers","following_url":"https://api.github.com/users/huragan/following{/other_user}","gists_url":"https://api.github.com/users/huragan/gists{/gist_id}","starred_url":"https://api.github.com/users/huragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huragan/subscriptions","organizations_url":"https://api.github.com/users/huragan/orgs","repos_url":"https://api.github.com/users/huragan/repos","events_url":"https://api.github.com/users/huragan/events{/privacy}","received_events_url":"https://api.github.com/users/huragan/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-15T00:32:43Z","updated_at":"2014-12-15T02:55:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"494fd1d80cc762b013847bda0823e0721b894337","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CommBank/maestro/pulls/279/commits","review_comments_url":"https://api.github.com/repos/CommBank/maestro/pulls/279/comments","review_comment_url":"https://api.github.com/repos/CommBank/maestro/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CommBank/maestro/issues/279/comments","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/26044d40e1fba974b3bc3a826aa83404beb5db7d","head":{"label":"CommBank:join-thrift","ref":"join-thrift","sha":"26044d40e1fba974b3bc3a826aa83404beb5db7d","user":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"repo":{"id":17347463,"name":"maestro","full_name":"CommBank/maestro","owner":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CommBank/maestro","description":"Data Pipelines that are well typed and enforce good convention","fork":false,"url":"https://api.github.com/repos/CommBank/maestro","forks_url":"https://api.github.com/repos/CommBank/maestro/forks","keys_url":"https://api.github.com/repos/CommBank/maestro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CommBank/maestro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CommBank/maestro/teams","hooks_url":"https://api.github.com/repos/CommBank/maestro/hooks","issue_events_url":"https://api.github.com/repos/CommBank/maestro/issues/events{/number}","events_url":"https://api.github.com/repos/CommBank/maestro/events","assignees_url":"https://api.github.com/repos/CommBank/maestro/assignees{/user}","branches_url":"https://api.github.com/repos/CommBank/maestro/branches{/branch}","tags_url":"https://api.github.com/repos/CommBank/maestro/tags","blobs_url":"https://api.github.com/repos/CommBank/maestro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CommBank/maestro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CommBank/maestro/git/refs{/sha}","trees_url":"https://api.github.com/repos/CommBank/maestro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/{sha}","languages_url":"https://api.github.com/repos/CommBank/maestro/languages","stargazers_url":"https://api.github.com/repos/CommBank/maestro/stargazers","contributors_url":"https://api.github.com/repos/CommBank/maestro/contributors","subscribers_url":"https://api.github.com/repos/CommBank/maestro/subscribers","subscription_url":"https://api.github.com/repos/CommBank/maestro/subscription","commits_url":"https://api.github.com/repos/CommBank/maestro/commits{/sha}","git_commits_url":"https://api.github.com/repos/CommBank/maestro/git/commits{/sha}","comments_url":"https://api.github.com/repos/CommBank/maestro/comments{/number}","issue_comment_url":"https://api.github.com/repos/CommBank/maestro/issues/comments/{number}","contents_url":"https://api.github.com/repos/CommBank/maestro/contents/{+path}","compare_url":"https://api.github.com/repos/CommBank/maestro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CommBank/maestro/merges","archive_url":"https://api.github.com/repos/CommBank/maestro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CommBank/maestro/downloads","issues_url":"https://api.github.com/repos/CommBank/maestro/issues{/number}","pulls_url":"https://api.github.com/repos/CommBank/maestro/pulls{/number}","milestones_url":"https://api.github.com/repos/CommBank/maestro/milestones{/number}","notifications_url":"https://api.github.com/repos/CommBank/maestro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CommBank/maestro/labels{/name}","releases_url":"https://api.github.com/repos/CommBank/maestro/releases{/id}","created_at":"2014-03-02T21:34:53Z","updated_at":"2014-12-10T02:21:46Z","pushed_at":"2014-12-15T01:39:46Z","git_url":"git://github.com/CommBank/maestro.git","ssh_url":"git@github.com:CommBank/maestro.git","clone_url":"https://github.com/CommBank/maestro.git","svn_url":"https://github.com/CommBank/maestro","homepage":"https://commbank.github.io/maestro","size":25150,"stargazers_count":23,"watchers_count":23,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":64,"forks":12,"open_issues":64,"watchers":23,"default_branch":"master"}},"base":{"label":"CommBank:master","ref":"master","sha":"368d17ee22130184cf9aa9f97d184fc93e9ec2c7","user":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"repo":{"id":17347463,"name":"maestro","full_name":"CommBank/maestro","owner":{"login":"CommBank","id":4240076,"avatar_url":"https://avatars.githubusercontent.com/u/4240076?v=3","gravatar_id":"","url":"https://api.github.com/users/CommBank","html_url":"https://github.com/CommBank","followers_url":"https://api.github.com/users/CommBank/followers","following_url":"https://api.github.com/users/CommBank/following{/other_user}","gists_url":"https://api.github.com/users/CommBank/gists{/gist_id}","starred_url":"https://api.github.com/users/CommBank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CommBank/subscriptions","organizations_url":"https://api.github.com/users/CommBank/orgs","repos_url":"https://api.github.com/users/CommBank/repos","events_url":"https://api.github.com/users/CommBank/events{/privacy}","received_events_url":"https://api.github.com/users/CommBank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CommBank/maestro","description":"Data Pipelines that are well typed and enforce good convention","fork":false,"url":"https://api.github.com/repos/CommBank/maestro","forks_url":"https://api.github.com/repos/CommBank/maestro/forks","keys_url":"https://api.github.com/repos/CommBank/maestro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CommBank/maestro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CommBank/maestro/teams","hooks_url":"https://api.github.com/repos/CommBank/maestro/hooks","issue_events_url":"https://api.github.com/repos/CommBank/maestro/issues/events{/number}","events_url":"https://api.github.com/repos/CommBank/maestro/events","assignees_url":"https://api.github.com/repos/CommBank/maestro/assignees{/user}","branches_url":"https://api.github.com/repos/CommBank/maestro/branches{/branch}","tags_url":"https://api.github.com/repos/CommBank/maestro/tags","blobs_url":"https://api.github.com/repos/CommBank/maestro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CommBank/maestro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CommBank/maestro/git/refs{/sha}","trees_url":"https://api.github.com/repos/CommBank/maestro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CommBank/maestro/statuses/{sha}","languages_url":"https://api.github.com/repos/CommBank/maestro/languages","stargazers_url":"https://api.github.com/repos/CommBank/maestro/stargazers","contributors_url":"https://api.github.com/repos/CommBank/maestro/contributors","subscribers_url":"https://api.github.com/repos/CommBank/maestro/subscribers","subscription_url":"https://api.github.com/repos/CommBank/maestro/subscription","commits_url":"https://api.github.com/repos/CommBank/maestro/commits{/sha}","git_commits_url":"https://api.github.com/repos/CommBank/maestro/git/commits{/sha}","comments_url":"https://api.github.com/repos/CommBank/maestro/comments{/number}","issue_comment_url":"https://api.github.com/repos/CommBank/maestro/issues/comments/{number}","contents_url":"https://api.github.com/repos/CommBank/maestro/contents/{+path}","compare_url":"https://api.github.com/repos/CommBank/maestro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CommBank/maestro/merges","archive_url":"https://api.github.com/repos/CommBank/maestro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CommBank/maestro/downloads","issues_url":"https://api.github.com/repos/CommBank/maestro/issues{/number}","pulls_url":"https://api.github.com/repos/CommBank/maestro/pulls{/number}","milestones_url":"https://api.github.com/repos/CommBank/maestro/milestones{/number}","notifications_url":"https://api.github.com/repos/CommBank/maestro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CommBank/maestro/labels{/name}","releases_url":"https://api.github.com/repos/CommBank/maestro/releases{/id}","created_at":"2014-03-02T21:34:53Z","updated_at":"2014-12-10T02:21:46Z","pushed_at":"2014-12-15T01:39:46Z","git_url":"git://github.com/CommBank/maestro.git","ssh_url":"git@github.com:CommBank/maestro.git","clone_url":"https://github.com/CommBank/maestro.git","svn_url":"https://github.com/CommBank/maestro","homepage":"https://commbank.github.io/maestro","size":25150,"stargazers_count":23,"watchers_count":23,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":64,"forks":12,"open_issues":64,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/279"},"html":{"href":"https://github.com/CommBank/maestro/pull/279"},"issue":{"href":"https://api.github.com/repos/CommBank/maestro/issues/279"},"comments":{"href":"https://api.github.com/repos/CommBank/maestro/issues/279/comments"},"review_comments":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/279/comments"},"review_comment":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CommBank/maestro/pulls/279/commits"},"statuses":{"href":"https://api.github.com/repos/CommBank/maestro/statuses/26044d40e1fba974b3bc3a826aa83404beb5db7d"}}}}