{"action":"created","comment":{"url":"https://api.github.com/repos/pilosa/pilosa/pulls/comments/124801061","pull_request_review_id":47124983,"id":124801061,"diff_hunk":"@@ -254,6 +265,56 @@ type InputDefinitionInfo struct {\n \tFields []InputDefinitionField `json:\"fields\"`\n }\n \n+// Validate the InputDefinitionInfo data\n+func (i *InputDefinitionInfo) Validate(columnLabel string) error {\n+\tnumPrimaryKey := 0\n+\taccountRowID := make(map[string]uint64)\n+\n+\tif len(i.Frames) == 0 {\n+\t\treturn fmt.Errorf(\"At least one frame is required per Input Definition\")\n+\t}\n+\n+\tfor _, frame := range i.Frames {\n+\t\tif err := frame.Validate(); err != nil {","path":"input_definition.go","position":122,"original_position":122,"commit_id":"6028b50b067874a2e117cf708fcc2f5ad1e2eedd","original_commit_id":"6028b50b067874a2e117cf708fcc2f5ad1e2eedd","user":{"login":"raskle","id":585044,"avatar_url":"https://avatars2.githubusercontent.com/u/585044?v=3","gravatar_id":"","url":"https://api.github.com/users/raskle","html_url":"https://github.com/raskle","followers_url":"https://api.github.com/users/raskle/followers","following_url":"https://api.github.com/users/raskle/following{/other_user}","gists_url":"https://api.github.com/users/raskle/gists{/gist_id}","starred_url":"https://api.github.com/users/raskle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raskle/subscriptions","organizations_url":"https://api.github.com/users/raskle/orgs","repos_url":"https://api.github.com/users/raskle/repos","events_url":"https://api.github.com/users/raskle/events{/privacy}","received_events_url":"https://api.github.com/users/raskle/received_events","type":"User","site_admin":false},"body":"I'd like to keep the validate in the input frame.  Then we can add a FrameOption validate and do that in one place.","created_at":"2017-06-29T13:36:25Z","updated_at":"2017-06-29T13:36:25Z","html_url":"https://github.com/pilosa/pilosa/pull/696#discussion_r124801061","pull_request_url":"https://api.github.com/repos/pilosa/pilosa/pulls/696","_links":{"self":{"href":"https://api.github.com/repos/pilosa/pilosa/pulls/comments/124801061"},"html":{"href":"https://github.com/pilosa/pilosa/pull/696#discussion_r124801061"},"pull_request":{"href":"https://api.github.com/repos/pilosa/pilosa/pulls/696"}}},"pull_request":{"url":"https://api.github.com/repos/pilosa/pilosa/pulls/696","id":128025591,"html_url":"https://github.com/pilosa/pilosa/pull/696","diff_url":"https://github.com/pilosa/pilosa/pull/696.diff","patch_url":"https://github.com/pilosa/pilosa/pull/696.patch","issue_url":"https://api.github.com/repos/pilosa/pilosa/issues/696","number":696,"state":"open","locked":false,"title":"Validate incoming input definitions through the InputDefinitionInfo V…","user":{"login":"raskle","id":585044,"avatar_url":"https://avatars2.githubusercontent.com/u/585044?v=3","gravatar_id":"","url":"https://api.github.com/users/raskle","html_url":"https://github.com/raskle","followers_url":"https://api.github.com/users/raskle/followers","following_url":"https://api.github.com/users/raskle/following{/other_user}","gists_url":"https://api.github.com/users/raskle/gists{/gist_id}","starred_url":"https://api.github.com/users/raskle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raskle/subscriptions","organizations_url":"https://api.github.com/users/raskle/orgs","repos_url":"https://api.github.com/users/raskle/repos","events_url":"https://api.github.com/users/raskle/events{/privacy}","received_events_url":"https://api.github.com/users/raskle/received_events","type":"User","site_admin":false},"body":"## Overview\r\nValidate incoming input definitions through the InputDefinitionInfo Validate rather than through Encode and piecemeal throughout the code.\r\n\r\n- [x] I have read the [contributing guide](https://github.com/pilosa/pilosa/blob/master/CONTRIBUTING.md).\r\n- [x] I have agreed to the [Contributor License Agreement](https://cla-assistant.io/pilosa/pilosa).\r\n- [ ] I have updated the [documentation](https://github.com/pilosa/pilosa/tree/master/docs).\r\n- [x] I have resolved any merge conflicts.\r\n- [x] I have included tests that cover my changes.\r\n- [x] All new and existing tests pass.\r\n\r\n## Code review checklist\r\nThis is the checklist that the reviewer will follow while reviewing your pull request. You do not need to do anything with this checklist, but be aware of what the reviewer will be looking for.\r\n\r\n- [ ] Ensure that any changes to external docs have been included in this pull request.\r\n- [ ] If the changes require that minor/major versions need to be updated, tag the PR appropriately.\r\n- [ ] Ensure the new code is [properly commented](https://github.com/golang/go/wiki/CodeReviewComments#doc-comments) and follows [Idiomatic Go](https://dmitri.shuralyov.com/idiomatic-go).\r\n- [ ] Check that tests have been written and that they cover the new functionality.\r\n- [ ] Run tests and ensure they pass.\r\n- [ ] Build and run the code, performing any applicable integration testing.\r\n","created_at":"2017-06-28T21:35:55Z","updated_at":"2017-06-29T13:36:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84416f7db0f91b0febf14db6f274391a9902b903","assignee":{"login":"travisturner","id":410544,"avatar_url":"https://avatars0.githubusercontent.com/u/410544?v=3","gravatar_id":"","url":"https://api.github.com/users/travisturner","html_url":"https://github.com/travisturner","followers_url":"https://api.github.com/users/travisturner/followers","following_url":"https://api.github.com/users/travisturner/following{/other_user}","gists_url":"https://api.github.com/users/travisturner/gists{/gist_id}","starred_url":"https://api.github.com/users/travisturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisturner/subscriptions","organizations_url":"https://api.github.com/users/travisturner/orgs","repos_url":"https://api.github.com/users/travisturner/repos","events_url":"https://api.github.com/users/travisturner/events{/privacy}","received_events_url":"https://api.github.com/users/travisturner/received_events","type":"User","site_admin":false},"assignees":[{"login":"travisturner","id":410544,"avatar_url":"https://avatars0.githubusercontent.com/u/410544?v=3","gravatar_id":"","url":"https://api.github.com/users/travisturner","html_url":"https://github.com/travisturner","followers_url":"https://api.github.com/users/travisturner/followers","following_url":"https://api.github.com/users/travisturner/following{/other_user}","gists_url":"https://api.github.com/users/travisturner/gists{/gist_id}","starred_url":"https://api.github.com/users/travisturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisturner/subscriptions","organizations_url":"https://api.github.com/users/travisturner/orgs","repos_url":"https://api.github.com/users/travisturner/repos","events_url":"https://api.github.com/users/travisturner/events{/privacy}","received_events_url":"https://api.github.com/users/travisturner/received_events","type":"User","site_admin":false},{"login":"linhvo","id":1574856,"avatar_url":"https://avatars3.githubusercontent.com/u/1574856?v=3","gravatar_id":"","url":"https://api.github.com/users/linhvo","html_url":"https://github.com/linhvo","followers_url":"https://api.github.com/users/linhvo/followers","following_url":"https://api.github.com/users/linhvo/following{/other_user}","gists_url":"https://api.github.com/users/linhvo/gists{/gist_id}","starred_url":"https://api.github.com/users/linhvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linhvo/subscriptions","organizations_url":"https://api.github.com/users/linhvo/orgs","repos_url":"https://api.github.com/users/linhvo/repos","events_url":"https://api.github.com/users/linhvo/events{/privacy}","received_events_url":"https://api.github.com/users/linhvo/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"travisturner","id":410544,"avatar_url":"https://avatars0.githubusercontent.com/u/410544?v=3","gravatar_id":"","url":"https://api.github.com/users/travisturner","html_url":"https://github.com/travisturner","followers_url":"https://api.github.com/users/travisturner/followers","following_url":"https://api.github.com/users/travisturner/following{/other_user}","gists_url":"https://api.github.com/users/travisturner/gists{/gist_id}","starred_url":"https://api.github.com/users/travisturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisturner/subscriptions","organizations_url":"https://api.github.com/users/travisturner/orgs","repos_url":"https://api.github.com/users/travisturner/repos","events_url":"https://api.github.com/users/travisturner/events{/privacy}","received_events_url":"https://api.github.com/users/travisturner/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pilosa/pilosa/pulls/696/commits","review_comments_url":"https://api.github.com/repos/pilosa/pilosa/pulls/696/comments","review_comment_url":"https://api.github.com/repos/pilosa/pilosa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pilosa/pilosa/issues/696/comments","statuses_url":"https://api.github.com/repos/pilosa/pilosa/statuses/6028b50b067874a2e117cf708fcc2f5ad1e2eedd","head":{"label":"raskle:input-definition-validation","ref":"input-definition-validation","sha":"6028b50b067874a2e117cf708fcc2f5ad1e2eedd","user":{"login":"raskle","id":585044,"avatar_url":"https://avatars2.githubusercontent.com/u/585044?v=3","gravatar_id":"","url":"https://api.github.com/users/raskle","html_url":"https://github.com/raskle","followers_url":"https://api.github.com/users/raskle/followers","following_url":"https://api.github.com/users/raskle/following{/other_user}","gists_url":"https://api.github.com/users/raskle/gists{/gist_id}","starred_url":"https://api.github.com/users/raskle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raskle/subscriptions","organizations_url":"https://api.github.com/users/raskle/orgs","repos_url":"https://api.github.com/users/raskle/repos","events_url":"https://api.github.com/users/raskle/events{/privacy}","received_events_url":"https://api.github.com/users/raskle/received_events","type":"User","site_admin":false},"repo":{"id":79463801,"name":"pilosa","full_name":"raskle/pilosa","owner":{"login":"raskle","id":585044,"avatar_url":"https://avatars2.githubusercontent.com/u/585044?v=3","gravatar_id":"","url":"https://api.github.com/users/raskle","html_url":"https://github.com/raskle","followers_url":"https://api.github.com/users/raskle/followers","following_url":"https://api.github.com/users/raskle/following{/other_user}","gists_url":"https://api.github.com/users/raskle/gists{/gist_id}","starred_url":"https://api.github.com/users/raskle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raskle/subscriptions","organizations_url":"https://api.github.com/users/raskle/orgs","repos_url":"https://api.github.com/users/raskle/repos","events_url":"https://api.github.com/users/raskle/events{/privacy}","received_events_url":"https://api.github.com/users/raskle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raskle/pilosa","description":null,"fork":true,"url":"https://api.github.com/repos/raskle/pilosa","forks_url":"https://api.github.com/repos/raskle/pilosa/forks","keys_url":"https://api.github.com/repos/raskle/pilosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raskle/pilosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raskle/pilosa/teams","hooks_url":"https://api.github.com/repos/raskle/pilosa/hooks","issue_events_url":"https://api.github.com/repos/raskle/pilosa/issues/events{/number}","events_url":"https://api.github.com/repos/raskle/pilosa/events","assignees_url":"https://api.github.com/repos/raskle/pilosa/assignees{/user}","branches_url":"https://api.github.com/repos/raskle/pilosa/branches{/branch}","tags_url":"https://api.github.com/repos/raskle/pilosa/tags","blobs_url":"https://api.github.com/repos/raskle/pilosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raskle/pilosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raskle/pilosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/raskle/pilosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raskle/pilosa/statuses/{sha}","languages_url":"https://api.github.com/repos/raskle/pilosa/languages","stargazers_url":"https://api.github.com/repos/raskle/pilosa/stargazers","contributors_url":"https://api.github.com/repos/raskle/pilosa/contributors","subscribers_url":"https://api.github.com/repos/raskle/pilosa/subscribers","subscription_url":"https://api.github.com/repos/raskle/pilosa/subscription","commits_url":"https://api.github.com/repos/raskle/pilosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/raskle/pilosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/raskle/pilosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/raskle/pilosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/raskle/pilosa/contents/{+path}","compare_url":"https://api.github.com/repos/raskle/pilosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raskle/pilosa/merges","archive_url":"https://api.github.com/repos/raskle/pilosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raskle/pilosa/downloads","issues_url":"https://api.github.com/repos/raskle/pilosa/issues{/number}","pulls_url":"https://api.github.com/repos/raskle/pilosa/pulls{/number}","milestones_url":"https://api.github.com/repos/raskle/pilosa/milestones{/number}","notifications_url":"https://api.github.com/repos/raskle/pilosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raskle/pilosa/labels{/name}","releases_url":"https://api.github.com/repos/raskle/pilosa/releases{/id}","deployments_url":"https://api.github.com/repos/raskle/pilosa/deployments","created_at":"2017-01-19T14:56:05Z","updated_at":"2017-05-01T15:13:59Z","pushed_at":"2017-06-28T21:33:37Z","git_url":"git://github.com/raskle/pilosa.git","ssh_url":"git@github.com:raskle/pilosa.git","clone_url":"https://github.com/raskle/pilosa.git","svn_url":"https://github.com/raskle/pilosa","homepage":null,"size":8428,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"pilosa:input-definition","ref":"input-definition","sha":"78d40694c6f007bb92c0367f23dd3aed7084baec","user":{"login":"pilosa","id":24233787,"avatar_url":"https://avatars2.githubusercontent.com/u/24233787?v=3","gravatar_id":"","url":"https://api.github.com/users/pilosa","html_url":"https://github.com/pilosa","followers_url":"https://api.github.com/users/pilosa/followers","following_url":"https://api.github.com/users/pilosa/following{/other_user}","gists_url":"https://api.github.com/users/pilosa/gists{/gist_id}","starred_url":"https://api.github.com/users/pilosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilosa/subscriptions","organizations_url":"https://api.github.com/users/pilosa/orgs","repos_url":"https://api.github.com/users/pilosa/repos","events_url":"https://api.github.com/users/pilosa/events{/privacy}","received_events_url":"https://api.github.com/users/pilosa/received_events","type":"Organization","site_admin":false},"repo":{"id":40127179,"name":"pilosa","full_name":"pilosa/pilosa","owner":{"login":"pilosa","id":24233787,"avatar_url":"https://avatars2.githubusercontent.com/u/24233787?v=3","gravatar_id":"","url":"https://api.github.com/users/pilosa","html_url":"https://github.com/pilosa","followers_url":"https://api.github.com/users/pilosa/followers","following_url":"https://api.github.com/users/pilosa/following{/other_user}","gists_url":"https://api.github.com/users/pilosa/gists{/gist_id}","starred_url":"https://api.github.com/users/pilosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilosa/subscriptions","organizations_url":"https://api.github.com/users/pilosa/orgs","repos_url":"https://api.github.com/users/pilosa/repos","events_url":"https://api.github.com/users/pilosa/events{/privacy}","received_events_url":"https://api.github.com/users/pilosa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pilosa/pilosa","description":"Pilosa is an open source, distributed bitmap index that dramatically accelerates queries across multiple, massive data sets.","fork":false,"url":"https://api.github.com/repos/pilosa/pilosa","forks_url":"https://api.github.com/repos/pilosa/pilosa/forks","keys_url":"https://api.github.com/repos/pilosa/pilosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pilosa/pilosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pilosa/pilosa/teams","hooks_url":"https://api.github.com/repos/pilosa/pilosa/hooks","issue_events_url":"https://api.github.com/repos/pilosa/pilosa/issues/events{/number}","events_url":"https://api.github.com/repos/pilosa/pilosa/events","assignees_url":"https://api.github.com/repos/pilosa/pilosa/assignees{/user}","branches_url":"https://api.github.com/repos/pilosa/pilosa/branches{/branch}","tags_url":"https://api.github.com/repos/pilosa/pilosa/tags","blobs_url":"https://api.github.com/repos/pilosa/pilosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pilosa/pilosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pilosa/pilosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/pilosa/pilosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pilosa/pilosa/statuses/{sha}","languages_url":"https://api.github.com/repos/pilosa/pilosa/languages","stargazers_url":"https://api.github.com/repos/pilosa/pilosa/stargazers","contributors_url":"https://api.github.com/repos/pilosa/pilosa/contributors","subscribers_url":"https://api.github.com/repos/pilosa/pilosa/subscribers","subscription_url":"https://api.github.com/repos/pilosa/pilosa/subscription","commits_url":"https://api.github.com/repos/pilosa/pilosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/pilosa/pilosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/pilosa/pilosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/pilosa/pilosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/pilosa/pilosa/contents/{+path}","compare_url":"https://api.github.com/repos/pilosa/pilosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pilosa/pilosa/merges","archive_url":"https://api.github.com/repos/pilosa/pilosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pilosa/pilosa/downloads","issues_url":"https://api.github.com/repos/pilosa/pilosa/issues{/number}","pulls_url":"https://api.github.com/repos/pilosa/pilosa/pulls{/number}","milestones_url":"https://api.github.com/repos/pilosa/pilosa/milestones{/number}","notifications_url":"https://api.github.com/repos/pilosa/pilosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pilosa/pilosa/labels{/name}","releases_url":"https://api.github.com/repos/pilosa/pilosa/releases{/id}","deployments_url":"https://api.github.com/repos/pilosa/pilosa/deployments","created_at":"2015-08-03T13:48:08Z","updated_at":"2017-06-28T17:21:16Z","pushed_at":"2017-06-28T22:37:38Z","git_url":"git://github.com/pilosa/pilosa.git","ssh_url":"git@github.com:pilosa/pilosa.git","clone_url":"https://github.com/pilosa/pilosa.git","svn_url":"https://github.com/pilosa/pilosa","homepage":"https://www.pilosa.com","size":2913,"stargazers_count":1032,"watchers_count":1032,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":97,"forks":56,"open_issues":97,"watchers":1032,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pilosa/pilosa/pulls/696"},"html":{"href":"https://github.com/pilosa/pilosa/pull/696"},"issue":{"href":"https://api.github.com/repos/pilosa/pilosa/issues/696"},"comments":{"href":"https://api.github.com/repos/pilosa/pilosa/issues/696/comments"},"review_comments":{"href":"https://api.github.com/repos/pilosa/pilosa/pulls/696/comments"},"review_comment":{"href":"https://api.github.com/repos/pilosa/pilosa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pilosa/pilosa/pulls/696/commits"},"statuses":{"href":"https://api.github.com/repos/pilosa/pilosa/statuses/6028b50b067874a2e117cf708fcc2f5ad1e2eedd"}}}}
{"actor":{"display_login":"raskle"}}