{"action":"created","comment":{"url":"https://api.github.com/repos/petermattis/opttoy/pulls/comments/144679598","pull_request_review_id":69376468,"id":144679598,"diff_hunk":"@@ -0,0 +1,182 @@\n+package v3\n+\n+import (\n+\t\"fmt\"\n+)\n+\n+type operator int16\n+\n+const (\n+\tunknownOp operator = iota\n+\n+\tscanOp\n+\n+\tunionOp\n+\tintersectOp\n+\texceptOp\n+\n+\tinnerJoinOp\n+\tleftJoinOp\n+\trightJoinOp\n+\tcrossJoinOp\n+\tsemiJoinOp\n+\tantiJoinOp\n+\n+\tprojectOp\n+\tselectOp\n+\n+\tgroupByOp\n+\torderByOp\n+\tdistinctOp\n+\n+\tvariableOp\n+\tconstOp\n+\n+\texistsOp\n+\n+\tandOp\n+\torOp\n+\tnotOp\n+\n+\teqOp\n+\tltOp\n+\tgtOp\n+\tleOp\n+\tgeOp\n+\tneOp\n+\tinOp\n+\tnotInOp\n+\tlikeOp\n+\tnotLikeOp\n+\tiLikeOp\n+\tnotILikeOp\n+\tsimilarToOp\n+\tnotSimilarToOp\n+\tregMatchOp\n+\tnotRegMatchOp\n+\tregIMatchOp\n+\tnotRegIMatchOp\n+\tisDistinctFromOp\n+\tisNotDistinctFromOp\n+\tisOp\n+\tisNotOp\n+\tanyOp\n+\tsomeOp\n+\tallOp\n+\n+\tbitandOp\n+\tbitorOp\n+\tbitxorOp\n+\tplusOp\n+\tminusOp\n+\tmultOp\n+\tdivOp\n+\tfloorDivOp\n+\tmodOp\n+\tpowOp\n+\tconcatOp\n+\tlShiftOp\n+\trShiftOp\n+\n+\tunaryPlusOp\n+\tunaryMinusOp\n+\tunaryComplementOp\n+)\n+\n+type operatorInfo struct {\n+\tname             string\n+\tcolumns          func(e *expr) []bitmapIndex\n+\tupdateProperties func(e *expr)\n+}\n+\n+func scalarInfo(name string) operatorInfo {\n+\treturn operatorInfo{\n+\t\tname: name,\n+\t\tcolumns: func(expr *expr) []bitmapIndex {\n+\t\t\treturn nil\n+\t\t},\n+\t\tupdateProperties: func(expr *expr) {\n+\t\t\t// For a scalar operation the required input variables is the union of the\n+\t\t\t// required input variables of its inputs. There are no output variables.\n+\t\t\texpr.inputVars = 0\n+\t\t\texpr.outputVars = 0\n+\t\t\tfor _, input := range expr.inputs() {\n+\t\t\t\texpr.inputVars |= input.inputVars\n+\t\t\t}\n+\t\t},\n+\t}\n+}\n+\n+var operatorTab = [...]operatorInfo{","path":"v3/operator.go","position":110,"original_position":110,"commit_id":"c47f15fc79764ec0437dd9caf0d04cbc0d2dc7c0","original_commit_id":"c47f15fc79764ec0437dd9caf0d04cbc0d2dc7c0","user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"body":"@albler Notice how the `operatorInfo` for a particular operator is accessed via `expr.info()`. There is a minor bit of centralization here, but it isn't too bad. I think the centralization could be removed with a bit more effort. ","created_at":"2017-10-14T00:21:23Z","updated_at":"2017-10-14T00:21:23Z","html_url":"https://github.com/petermattis/opttoy/pull/15#discussion_r144679598","pull_request_url":"https://api.github.com/repos/petermattis/opttoy/pulls/15","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/petermattis/opttoy/pulls/comments/144679598"},"html":{"href":"https://github.com/petermattis/opttoy/pull/15#discussion_r144679598"},"pull_request":{"href":"https://api.github.com/repos/petermattis/opttoy/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/petermattis/opttoy/pulls/15","id":146576837,"html_url":"https://github.com/petermattis/opttoy/pull/15","diff_url":"https://github.com/petermattis/opttoy/pull/15.diff","patch_url":"https://github.com/petermattis/opttoy/pull/15.patch","issue_url":"https://api.github.com/repos/petermattis/opttoy/issues/15","number":15,"state":"open","locked":false,"title":"Split up opttoy.go into more digestible pieces","user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"body":"And added selectOp and projectOp. Still a lot of crufty code here.","created_at":"2017-10-14T00:16:50Z","updated_at":"2017-10-14T00:21:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ba2c7cd6a54be4af10f1702f79917a875ab99c4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/petermattis/opttoy/pulls/15/commits","review_comments_url":"https://api.github.com/repos/petermattis/opttoy/pulls/15/comments","review_comment_url":"https://api.github.com/repos/petermattis/opttoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/petermattis/opttoy/issues/15/comments","statuses_url":"https://api.github.com/repos/petermattis/opttoy/statuses/c47f15fc79764ec0437dd9caf0d04cbc0d2dc7c0","head":{"label":"petermattis:pmattis/v3","ref":"pmattis/v3","sha":"c47f15fc79764ec0437dd9caf0d04cbc0d2dc7c0","user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"repo":{"id":100378796,"name":"opttoy","full_name":"petermattis/opttoy","owner":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petermattis/opttoy","description":null,"fork":false,"url":"https://api.github.com/repos/petermattis/opttoy","forks_url":"https://api.github.com/repos/petermattis/opttoy/forks","keys_url":"https://api.github.com/repos/petermattis/opttoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petermattis/opttoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petermattis/opttoy/teams","hooks_url":"https://api.github.com/repos/petermattis/opttoy/hooks","issue_events_url":"https://api.github.com/repos/petermattis/opttoy/issues/events{/number}","events_url":"https://api.github.com/repos/petermattis/opttoy/events","assignees_url":"https://api.github.com/repos/petermattis/opttoy/assignees{/user}","branches_url":"https://api.github.com/repos/petermattis/opttoy/branches{/branch}","tags_url":"https://api.github.com/repos/petermattis/opttoy/tags","blobs_url":"https://api.github.com/repos/petermattis/opttoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petermattis/opttoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petermattis/opttoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/petermattis/opttoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petermattis/opttoy/statuses/{sha}","languages_url":"https://api.github.com/repos/petermattis/opttoy/languages","stargazers_url":"https://api.github.com/repos/petermattis/opttoy/stargazers","contributors_url":"https://api.github.com/repos/petermattis/opttoy/contributors","subscribers_url":"https://api.github.com/repos/petermattis/opttoy/subscribers","subscription_url":"https://api.github.com/repos/petermattis/opttoy/subscription","commits_url":"https://api.github.com/repos/petermattis/opttoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/petermattis/opttoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/petermattis/opttoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/petermattis/opttoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/petermattis/opttoy/contents/{+path}","compare_url":"https://api.github.com/repos/petermattis/opttoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petermattis/opttoy/merges","archive_url":"https://api.github.com/repos/petermattis/opttoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petermattis/opttoy/downloads","issues_url":"https://api.github.com/repos/petermattis/opttoy/issues{/number}","pulls_url":"https://api.github.com/repos/petermattis/opttoy/pulls{/number}","milestones_url":"https://api.github.com/repos/petermattis/opttoy/milestones{/number}","notifications_url":"https://api.github.com/repos/petermattis/opttoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petermattis/opttoy/labels{/name}","releases_url":"https://api.github.com/repos/petermattis/opttoy/releases{/id}","deployments_url":"https://api.github.com/repos/petermattis/opttoy/deployments","created_at":"2017-08-15T13:13:10Z","updated_at":"2017-08-15T13:13:35Z","pushed_at":"2017-10-14T00:16:51Z","git_url":"git://github.com/petermattis/opttoy.git","ssh_url":"git@github.com:petermattis/opttoy.git","clone_url":"https://github.com/petermattis/opttoy.git","svn_url":"https://github.com/petermattis/opttoy","homepage":null,"size":41,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"petermattis:master","ref":"master","sha":"c24d2982b389d1778ba9405e5ddf3a44ebb6fa25","user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"repo":{"id":100378796,"name":"opttoy","full_name":"petermattis/opttoy","owner":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petermattis/opttoy","description":null,"fork":false,"url":"https://api.github.com/repos/petermattis/opttoy","forks_url":"https://api.github.com/repos/petermattis/opttoy/forks","keys_url":"https://api.github.com/repos/petermattis/opttoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petermattis/opttoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petermattis/opttoy/teams","hooks_url":"https://api.github.com/repos/petermattis/opttoy/hooks","issue_events_url":"https://api.github.com/repos/petermattis/opttoy/issues/events{/number}","events_url":"https://api.github.com/repos/petermattis/opttoy/events","assignees_url":"https://api.github.com/repos/petermattis/opttoy/assignees{/user}","branches_url":"https://api.github.com/repos/petermattis/opttoy/branches{/branch}","tags_url":"https://api.github.com/repos/petermattis/opttoy/tags","blobs_url":"https://api.github.com/repos/petermattis/opttoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petermattis/opttoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petermattis/opttoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/petermattis/opttoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petermattis/opttoy/statuses/{sha}","languages_url":"https://api.github.com/repos/petermattis/opttoy/languages","stargazers_url":"https://api.github.com/repos/petermattis/opttoy/stargazers","contributors_url":"https://api.github.com/repos/petermattis/opttoy/contributors","subscribers_url":"https://api.github.com/repos/petermattis/opttoy/subscribers","subscription_url":"https://api.github.com/repos/petermattis/opttoy/subscription","commits_url":"https://api.github.com/repos/petermattis/opttoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/petermattis/opttoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/petermattis/opttoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/petermattis/opttoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/petermattis/opttoy/contents/{+path}","compare_url":"https://api.github.com/repos/petermattis/opttoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petermattis/opttoy/merges","archive_url":"https://api.github.com/repos/petermattis/opttoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petermattis/opttoy/downloads","issues_url":"https://api.github.com/repos/petermattis/opttoy/issues{/number}","pulls_url":"https://api.github.com/repos/petermattis/opttoy/pulls{/number}","milestones_url":"https://api.github.com/repos/petermattis/opttoy/milestones{/number}","notifications_url":"https://api.github.com/repos/petermattis/opttoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petermattis/opttoy/labels{/name}","releases_url":"https://api.github.com/repos/petermattis/opttoy/releases{/id}","deployments_url":"https://api.github.com/repos/petermattis/opttoy/deployments","created_at":"2017-08-15T13:13:10Z","updated_at":"2017-08-15T13:13:35Z","pushed_at":"2017-10-14T00:16:51Z","git_url":"git://github.com/petermattis/opttoy.git","ssh_url":"git@github.com:petermattis/opttoy.git","clone_url":"https://github.com/petermattis/opttoy.git","svn_url":"https://github.com/petermattis/opttoy","homepage":null,"size":41,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/petermattis/opttoy/pulls/15"},"html":{"href":"https://github.com/petermattis/opttoy/pull/15"},"issue":{"href":"https://api.github.com/repos/petermattis/opttoy/issues/15"},"comments":{"href":"https://api.github.com/repos/petermattis/opttoy/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/petermattis/opttoy/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/petermattis/opttoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/petermattis/opttoy/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/petermattis/opttoy/statuses/c47f15fc79764ec0437dd9caf0d04cbc0d2dc7c0"}},"author_association":"OWNER"}}
{"actor":{"display_login":"petermattis"}}