{"action":"created","comment":{"url":"https://api.github.com/repos/slamdata/quasar/pulls/comments/217725435","pull_request_review_id":155510989,"id":217725435,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzcyNTQzNQ==","diff_hunk":"@@ -0,0 +1,36 @@\n+/*\n+ * Copyright 2014–2018 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.qsu\n+\n+import quasar.fp._\n+import quasar.qscript.RecFreeS._\n+\n+import scalaz.syntax.equal._\n+\n+/** Coalesces adjacent mappable regions of a single root. */\n+final class CoalesceUnaryMappable[T[_[_]]] private () extends QSUTTypes[T] {\n+  def apply(graph: QSUGraph): QSUGraph =\n+    graph rewrite {\n+      case g @ MappableRegion.MaximalUnary(src, fm) if g.root =/= src.root =>\n+        g.overwriteAtRoot(QScriptUniform.Map(src.root, fm.asRec))","path":"qsu/src/main/scala/quasar/qsu/CoalesceUnaryMappable.scala","position":29,"original_position":29,"commit_id":"1ac92c47ef382ae6709806cf12429b7b4f834b4b","original_commit_id":"1ac92c47ef382ae6709806cf12429b7b4f834b4b","user":{"login":"djspiewak","id":752,"node_id":"MDQ6VXNlcjc1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/752?v=4","gravatar_id":"","url":"https://api.github.com/users/djspiewak","html_url":"https://github.com/djspiewak","followers_url":"https://api.github.com/users/djspiewak/followers","following_url":"https://api.github.com/users/djspiewak/following{/other_user}","gists_url":"https://api.github.com/users/djspiewak/gists{/gist_id}","starred_url":"https://api.github.com/users/djspiewak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djspiewak/subscriptions","organizations_url":"https://api.github.com/users/djspiewak/orgs","repos_url":"https://api.github.com/users/djspiewak/repos","events_url":"https://api.github.com/users/djspiewak/events{/privacy}","received_events_url":"https://api.github.com/users/djspiewak/received_events","type":"User","site_admin":false},"body":"Note to self: we should add the following.\r\n\r\n```scala\r\ndef modifyAtRoot(f: Symbol => QSU[Symbol]): QSUGraph\r\ndef modifyAtRootM[F[_]: Functor](f: Symbol => F[QSU[Symbol]]): F[QSUGraph]\r\n```\r\n\r\nIt just occurred to me that this pattern (in various forms) is *insanely* common.","created_at":"2018-09-14T14:09:14Z","updated_at":"2018-09-14T14:13:10Z","html_url":"https://github.com/slamdata/quasar/pull/3802#discussion_r217725435","pull_request_url":"https://api.github.com/repos/slamdata/quasar/pulls/3802","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/comments/217725435"},"html":{"href":"https://github.com/slamdata/quasar/pull/3802#discussion_r217725435"},"pull_request":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/3802"}}},"pull_request":{"url":"https://api.github.com/repos/slamdata/quasar/pulls/3802","id":215415238,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NDE1MjM4","html_url":"https://github.com/slamdata/quasar/pull/3802","diff_url":"https://github.com/slamdata/quasar/pull/3802.diff","patch_url":"https://github.com/slamdata/quasar/pull/3802.patch","issue_url":"https://api.github.com/repos/slamdata/quasar/issues/3802","number":3802,"state":"open","locked":false,"title":"Coalesce mappable regions before ApplyProvenance ","user":{"login":"wemrysi","id":32185,"node_id":"MDQ6VXNlcjMyMTg1","avatar_url":"https://avatars3.githubusercontent.com/u/32185?v=4","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"body":"Inlines nullary regions and coalesces unary ones prior to computing provenance to avoid having to create existentials due to \"dynamic\" project/injects.\r\n\r\nAlso appears to speed up compilation in general due to shrinking the size of the graph earlier on in the process.","created_at":"2018-09-13T21:02:19Z","updated_at":"2018-09-14T14:13:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66c0aa7843dcb9fa4e4e23de56c903875739e8e6","assignee":{"login":"alissapajer","id":1088100,"node_id":"MDQ6VXNlcjEwODgxMDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1088100?v=4","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,"node_id":"MDQ6VXNlcjEwODgxMDA=","avatar_url":"https://avatars2.githubusercontent.com/u/1088100?v=4","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}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":513635755,"node_id":"MDU6TGFiZWw1MTM2MzU3NTU=","url":"https://api.github.com/repos/slamdata/quasar/labels/version:%20revision","name":"version: revision","color":"c5def5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/slamdata/quasar/pulls/3802/commits","review_comments_url":"https://api.github.com/repos/slamdata/quasar/pulls/3802/comments","review_comment_url":"https://api.github.com/repos/slamdata/quasar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slamdata/quasar/issues/3802/comments","statuses_url":"https://api.github.com/repos/slamdata/quasar/statuses/1ac92c47ef382ae6709806cf12429b7b4f834b4b","head":{"label":"wemrysi:feature/ch1466-collapse-mr","ref":"feature/ch1466-collapse-mr","sha":"1ac92c47ef382ae6709806cf12429b7b4f834b4b","user":{"login":"wemrysi","id":32185,"node_id":"MDQ6VXNlcjMyMTg1","avatar_url":"https://avatars3.githubusercontent.com/u/32185?v=4","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"repo":{"id":40374964,"node_id":"MDEwOlJlcG9zaXRvcnk0MDM3NDk2NA==","name":"quasar","full_name":"wemrysi/quasar","owner":{"login":"wemrysi","id":32185,"node_id":"MDQ6VXNlcjMyMTg1","avatar_url":"https://avatars3.githubusercontent.com/u/32185?v=4","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wemrysi/quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/wemrysi/quasar","forks_url":"https://api.github.com/repos/wemrysi/quasar/forks","keys_url":"https://api.github.com/repos/wemrysi/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wemrysi/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wemrysi/quasar/teams","hooks_url":"https://api.github.com/repos/wemrysi/quasar/hooks","issue_events_url":"https://api.github.com/repos/wemrysi/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/wemrysi/quasar/events","assignees_url":"https://api.github.com/repos/wemrysi/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/wemrysi/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/wemrysi/quasar/tags","blobs_url":"https://api.github.com/repos/wemrysi/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wemrysi/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wemrysi/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/wemrysi/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wemrysi/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/wemrysi/quasar/languages","stargazers_url":"https://api.github.com/repos/wemrysi/quasar/stargazers","contributors_url":"https://api.github.com/repos/wemrysi/quasar/contributors","subscribers_url":"https://api.github.com/repos/wemrysi/quasar/subscribers","subscription_url":"https://api.github.com/repos/wemrysi/quasar/subscription","commits_url":"https://api.github.com/repos/wemrysi/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/wemrysi/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/wemrysi/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/wemrysi/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/wemrysi/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/wemrysi/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wemrysi/quasar/merges","archive_url":"https://api.github.com/repos/wemrysi/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wemrysi/quasar/downloads","issues_url":"https://api.github.com/repos/wemrysi/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/wemrysi/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/wemrysi/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/wemrysi/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wemrysi/quasar/labels{/name}","releases_url":"https://api.github.com/repos/wemrysi/quasar/releases{/id}","deployments_url":"https://api.github.com/repos/wemrysi/quasar/deployments","created_at":"2015-08-07T18:29:08Z","updated_at":"2018-06-05T20:10:23Z","pushed_at":"2018-09-14T02:20:12Z","git_url":"git://github.com/wemrysi/quasar.git","ssh_url":"git@github.com:wemrysi/quasar.git","clone_url":"https://github.com/wemrysi/quasar.git","svn_url":"https://github.com/wemrysi/quasar","homepage":null,"size":74386,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"slamdata:master","ref":"master","sha":"90b351ce18d768287de6947c47080a972326edc6","user":{"login":"slamdata","id":5385602,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODU2MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/5385602?v=4","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"repo":{"id":16515058,"node_id":"MDEwOlJlcG9zaXRvcnkxNjUxNTA1OA==","name":"quasar","full_name":"slamdata/quasar","owner":{"login":"slamdata","id":5385602,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODU2MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/5385602?v=4","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slamdata/quasar","description":"A compiler and columnar analytics engine for a SQL dialect with support for heterogeneous structured data","fork":false,"url":"https://api.github.com/repos/slamdata/quasar","forks_url":"https://api.github.com/repos/slamdata/quasar/forks","keys_url":"https://api.github.com/repos/slamdata/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slamdata/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slamdata/quasar/teams","hooks_url":"https://api.github.com/repos/slamdata/quasar/hooks","issue_events_url":"https://api.github.com/repos/slamdata/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/slamdata/quasar/events","assignees_url":"https://api.github.com/repos/slamdata/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/slamdata/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/slamdata/quasar/tags","blobs_url":"https://api.github.com/repos/slamdata/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slamdata/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slamdata/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/slamdata/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slamdata/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/slamdata/quasar/languages","stargazers_url":"https://api.github.com/repos/slamdata/quasar/stargazers","contributors_url":"https://api.github.com/repos/slamdata/quasar/contributors","subscribers_url":"https://api.github.com/repos/slamdata/quasar/subscribers","subscription_url":"https://api.github.com/repos/slamdata/quasar/subscription","commits_url":"https://api.github.com/repos/slamdata/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/slamdata/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/slamdata/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/slamdata/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/slamdata/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/slamdata/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slamdata/quasar/merges","archive_url":"https://api.github.com/repos/slamdata/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slamdata/quasar/downloads","issues_url":"https://api.github.com/repos/slamdata/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/slamdata/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/slamdata/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/slamdata/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slamdata/quasar/labels{/name}","releases_url":"https://api.github.com/repos/slamdata/quasar/releases{/id}","deployments_url":"https://api.github.com/repos/slamdata/quasar/deployments","created_at":"2014-02-04T15:01:27Z","updated_at":"2018-09-14T12:46:09Z","pushed_at":"2018-09-14T13:31:04Z","git_url":"git://github.com/slamdata/quasar.git","ssh_url":"git@github.com:slamdata/quasar.git","clone_url":"https://github.com/slamdata/quasar.git","svn_url":"https://github.com/slamdata/quasar","homepage":"","size":74276,"stargazers_count":679,"watchers_count":679,"language":"Scala","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":100,"mirror_url":null,"archived":false,"open_issues_count":393,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":100,"open_issues":393,"watchers":679,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/3802"},"html":{"href":"https://github.com/slamdata/quasar/pull/3802"},"issue":{"href":"https://api.github.com/repos/slamdata/quasar/issues/3802"},"comments":{"href":"https://api.github.com/repos/slamdata/quasar/issues/3802/comments"},"review_comments":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/3802/comments"},"review_comment":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/3802/commits"},"statuses":{"href":"https://api.github.com/repos/slamdata/quasar/statuses/1ac92c47ef382ae6709806cf12429b7b4f834b4b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"djspiewak"}}