{"action":"created","comment":{"url":"https://api.github.com/repos/quasar-analytics/quasar/pulls/comments/80268059","id":80268059,"diff_hunk":"@@ -0,0 +1,176 @@\n+/*\n+ * Copyright 2014–2016 SlamData Inc.\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+\n+package quasar.qscript\n+\n+import quasar.Predef._\n+import quasar.fp._\n+import quasar.qscript.MapFunc._\n+import quasar.qscript.MapFuncs._\n+\n+import matryoshka._\n+import scalaz._, Scalaz._\n+\n+/** This handles coalescing anything preceded by a QScriptCore node.\n+  */\n+trait Coalesce[IN[_]] {\n+  type IT[F[_]]\n+  type OUT[A]\n+\n+  def coalesce[F[_]: Functor]\n+    (FToOut: PrismNT[F, OUT])\n+    (implicit QC: QScriptCore [IT, ?] :<: OUT)\n+      : IN[IT[F]] => Option[IN[IT[F]]]\n+}\n+\n+object Coalesce {","path":"connector/src/main/scala/quasar/qscript/Coalesce.scala","position":39,"original_position":39,"commit_id":"fe15af80c7622b0884d9fe0f9e0a6f6667db8584","original_commit_id":"fe15af80c7622b0884d9fe0f9e0a6f6667db8584","user":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"body":"And we should `s/optimize/normalize/` at the same time 😉","created_at":"2016-09-23T15:31:01Z","updated_at":"2016-09-23T15:31:01Z","html_url":"https://github.com/quasar-analytics/quasar/pull/1427#discussion_r80268059","pull_request_url":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427","_links":{"self":{"href":"https://api.github.com/repos/quasar-analytics/quasar/pulls/comments/80268059"},"html":{"href":"https://github.com/quasar-analytics/quasar/pull/1427#discussion_r80268059"},"pull_request":{"href":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427"}}},"pull_request":{"url":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427","id":84795267,"html_url":"https://github.com/quasar-analytics/quasar/pull/1427","diff_url":"https://github.com/quasar-analytics/quasar/pull/1427.diff","patch_url":"https://github.com/quasar-analytics/quasar/pull/1427.patch","issue_url":"https://api.github.com/repos/quasar-analytics/quasar/issues/1427","number":1427,"state":"open","locked":false,"title":"Tighten QScript coproduct types","user":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"body":"This is a bunch of changes that finally allow us to use smaller coproducts of QScript. This is the first stage of guarantees that invalid nodes won’t slip through (cf. #1424).\r\n\r\nUnfortunately, we can’t yet apply this to branches, but we _promise_ (rather than guarantee) that types not in the current QScript coproduct won’t show up in branches either.\r\n\r\nThis is “in progress” because it does break some QScript tests, but I should have those fixed shortly.","created_at":"2016-09-11T19:21:58Z","updated_at":"2016-09-23T15:31:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"660ba5fe4b17806a7e32c0a5c4d18865b09f5139","assignee":{"login":"alissapajer","id":1088100,"avatar_url":"https://avatars.githubusercontent.com/u/1088100?v=3","gravatar_id":"","url":"https://api.github.com/users/alissapajer","html_url":"https://github.com/alissapajer","followers_url":"https://api.github.com/users/alissapajer/followers","following_url":"https://api.github.com/users/alissapajer/following{/other_user}","gists_url":"https://api.github.com/users/alissapajer/gists{/gist_id}","starred_url":"https://api.github.com/users/alissapajer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alissapajer/subscriptions","organizations_url":"https://api.github.com/users/alissapajer/orgs","repos_url":"https://api.github.com/users/alissapajer/repos","events_url":"https://api.github.com/users/alissapajer/events{/privacy}","received_events_url":"https://api.github.com/users/alissapajer/received_events","type":"User","site_admin":false},"assignees":[{"login":"alissapajer","id":1088100,"avatar_url":"https://avatars.githubusercontent.com/u/1088100?v=3","gravatar_id":"","url":"https://api.github.com/users/alissapajer","html_url":"https://github.com/alissapajer","followers_url":"https://api.github.com/users/alissapajer/followers","following_url":"https://api.github.com/users/alissapajer/following{/other_user}","gists_url":"https://api.github.com/users/alissapajer/gists{/gist_id}","starred_url":"https://api.github.com/users/alissapajer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alissapajer/subscriptions","organizations_url":"https://api.github.com/users/alissapajer/orgs","repos_url":"https://api.github.com/users/alissapajer/repos","events_url":"https://api.github.com/users/alissapajer/events{/privacy}","received_events_url":"https://api.github.com/users/alissapajer/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427/commits","review_comments_url":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427/comments","review_comment_url":"https://api.github.com/repos/quasar-analytics/quasar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quasar-analytics/quasar/issues/1427/comments","statuses_url":"https://api.github.com/repos/quasar-analytics/quasar/statuses/fe15af80c7622b0884d9fe0f9e0a6f6667db8584","head":{"label":"sellout:tightening-QScript-types","ref":"tightening-QScript-types","sha":"fe15af80c7622b0884d9fe0f9e0a6f6667db8584","user":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"repo":{"id":21178230,"name":"quasar","full_name":"sellout/quasar","owner":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sellout/quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/sellout/quasar","forks_url":"https://api.github.com/repos/sellout/quasar/forks","keys_url":"https://api.github.com/repos/sellout/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sellout/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sellout/quasar/teams","hooks_url":"https://api.github.com/repos/sellout/quasar/hooks","issue_events_url":"https://api.github.com/repos/sellout/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/sellout/quasar/events","assignees_url":"https://api.github.com/repos/sellout/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/sellout/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/sellout/quasar/tags","blobs_url":"https://api.github.com/repos/sellout/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sellout/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sellout/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/sellout/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sellout/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/sellout/quasar/languages","stargazers_url":"https://api.github.com/repos/sellout/quasar/stargazers","contributors_url":"https://api.github.com/repos/sellout/quasar/contributors","subscribers_url":"https://api.github.com/repos/sellout/quasar/subscribers","subscription_url":"https://api.github.com/repos/sellout/quasar/subscription","commits_url":"https://api.github.com/repos/sellout/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/sellout/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/sellout/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/sellout/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/sellout/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/sellout/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sellout/quasar/merges","archive_url":"https://api.github.com/repos/sellout/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sellout/quasar/downloads","issues_url":"https://api.github.com/repos/sellout/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/sellout/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/sellout/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/sellout/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sellout/quasar/labels{/name}","releases_url":"https://api.github.com/repos/sellout/quasar/releases{/id}","deployments_url":"https://api.github.com/repos/sellout/quasar/deployments","created_at":"2014-06-24T19:38:07Z","updated_at":"2016-01-08T04:24:08Z","pushed_at":"2016-09-23T14:32:42Z","git_url":"git://github.com/sellout/quasar.git","ssh_url":"git@github.com:sellout/quasar.git","clone_url":"https://github.com/sellout/quasar.git","svn_url":"https://github.com/sellout/quasar","homepage":null,"size":14744,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"quasar-analytics:master","ref":"master","sha":"5a37edde0bf9bfe61e56aad54e1f0d230f125922","user":{"login":"quasar-analytics","id":15095906,"avatar_url":"https://avatars.githubusercontent.com/u/15095906?v=3","gravatar_id":"","url":"https://api.github.com/users/quasar-analytics","html_url":"https://github.com/quasar-analytics","followers_url":"https://api.github.com/users/quasar-analytics/followers","following_url":"https://api.github.com/users/quasar-analytics/following{/other_user}","gists_url":"https://api.github.com/users/quasar-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/quasar-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quasar-analytics/subscriptions","organizations_url":"https://api.github.com/users/quasar-analytics/orgs","repos_url":"https://api.github.com/users/quasar-analytics/repos","events_url":"https://api.github.com/users/quasar-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/quasar-analytics/received_events","type":"Organization","site_admin":false},"repo":{"id":16515058,"name":"quasar","full_name":"quasar-analytics/quasar","owner":{"login":"quasar-analytics","id":15095906,"avatar_url":"https://avatars.githubusercontent.com/u/15095906?v=3","gravatar_id":"","url":"https://api.github.com/users/quasar-analytics","html_url":"https://github.com/quasar-analytics","followers_url":"https://api.github.com/users/quasar-analytics/followers","following_url":"https://api.github.com/users/quasar-analytics/following{/other_user}","gists_url":"https://api.github.com/users/quasar-analytics/gists{/gist_id}","starred_url":"https://api.github.com/users/quasar-analytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quasar-analytics/subscriptions","organizations_url":"https://api.github.com/users/quasar-analytics/orgs","repos_url":"https://api.github.com/users/quasar-analytics/repos","events_url":"https://api.github.com/users/quasar-analytics/events{/privacy}","received_events_url":"https://api.github.com/users/quasar-analytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quasar-analytics/quasar","description":"A NoSQL analytics engine that embraces post-relational analytics and pushes computation to the data.","fork":false,"url":"https://api.github.com/repos/quasar-analytics/quasar","forks_url":"https://api.github.com/repos/quasar-analytics/quasar/forks","keys_url":"https://api.github.com/repos/quasar-analytics/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quasar-analytics/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quasar-analytics/quasar/teams","hooks_url":"https://api.github.com/repos/quasar-analytics/quasar/hooks","issue_events_url":"https://api.github.com/repos/quasar-analytics/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/quasar-analytics/quasar/events","assignees_url":"https://api.github.com/repos/quasar-analytics/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/quasar-analytics/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/quasar-analytics/quasar/tags","blobs_url":"https://api.github.com/repos/quasar-analytics/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quasar-analytics/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quasar-analytics/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/quasar-analytics/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quasar-analytics/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/quasar-analytics/quasar/languages","stargazers_url":"https://api.github.com/repos/quasar-analytics/quasar/stargazers","contributors_url":"https://api.github.com/repos/quasar-analytics/quasar/contributors","subscribers_url":"https://api.github.com/repos/quasar-analytics/quasar/subscribers","subscription_url":"https://api.github.com/repos/quasar-analytics/quasar/subscription","commits_url":"https://api.github.com/repos/quasar-analytics/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/quasar-analytics/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/quasar-analytics/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/quasar-analytics/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/quasar-analytics/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/quasar-analytics/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quasar-analytics/quasar/merges","archive_url":"https://api.github.com/repos/quasar-analytics/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quasar-analytics/quasar/downloads","issues_url":"https://api.github.com/repos/quasar-analytics/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/quasar-analytics/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/quasar-analytics/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/quasar-analytics/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quasar-analytics/quasar/labels{/name}","releases_url":"https://api.github.com/repos/quasar-analytics/quasar/releases{/id}","deployments_url":"https://api.github.com/repos/quasar-analytics/quasar/deployments","created_at":"2014-02-04T15:01:27Z","updated_at":"2016-09-23T06:10:16Z","pushed_at":"2016-09-23T15:15:59Z","git_url":"git://github.com/quasar-analytics/quasar.git","ssh_url":"git@github.com:quasar-analytics/quasar.git","clone_url":"https://github.com/quasar-analytics/quasar.git","svn_url":"https://github.com/quasar-analytics/quasar","homepage":"http://quasar-analytics.org","size":17333,"stargazers_count":302,"watchers_count":302,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":72,"forks":51,"open_issues":72,"watchers":302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427"},"html":{"href":"https://github.com/quasar-analytics/quasar/pull/1427"},"issue":{"href":"https://api.github.com/repos/quasar-analytics/quasar/issues/1427"},"comments":{"href":"https://api.github.com/repos/quasar-analytics/quasar/issues/1427/comments"},"review_comments":{"href":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427/comments"},"review_comment":{"href":"https://api.github.com/repos/quasar-analytics/quasar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quasar-analytics/quasar/pulls/1427/commits"},"statuses":{"href":"https://api.github.com/repos/quasar-analytics/quasar/statuses/fe15af80c7622b0884d9fe0f9e0a6f6667db8584"}}}}
{"actor":{"display_login":"sellout"}}