{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/tipb/pulls/comments/55322434","id":55322434,"diff_hunk":"@@ -0,0 +1,76 @@\n+syntax = \"proto2\";\n+\n+package tipb;\n+\n+import \"expression.proto\";\n+import \"schema.proto\";\n+import \"error.proto\";\n+\n+// KeyRange specifies the range of key to be scanned.\n+// low is closed, high is open ( low <= value < high )\n+// It can be table handle or index value, it's not the encoded key in the kv store.\n+message KeyRange {\n+\toptional bytes low = 1;\n+\toptional bytes high = 2;\n+}\n+\n+// KeyPoint represents a single key.\n+message KeyPoint {\n+\toptional bytes key = 1;\n+}\n+\n+// SelectRequest works like a simplified select statement.\n+message SelectRequest {\n+\t// transaction start timestamp.\n+\toptional int64 start_ts = 1;\n+\n+\t// If table_info is not null, it represents a table scan, index_info would be null.\n+\toptional TableInfo table_info = 2;\n+\n+\t// If IndexInfo is not null, table_info would be null.\n+\toptional IndexInfo index_info = 3;\n+\n+\t// fields to be selected, fields type can be column reference for simple scan.\n+\t// or aggregation function.\n+\trepeated Expression fields = 4;\n+\n+\t// disjoint key ranges to be scanned.\n+\trepeated KeyRange ranges = 5;\n+\n+\t// key points to be looked up.\n+\trepeated KeyPoint points = 6;\n+\n+\t// where condition.\n+\toptional Expression where = 7;\n+\n+\t// group by clause.\n+\toptional Expression group_by = 8;\n+\n+\t// scan_limit should be greater than or equal to result_limit;\n+\toptional int64 scan_limit = 9;\n+\toptional int64 result_limit = 10;\n+}\n+\n+// Row packs all column values into a single byte slice.\n+// With lengths to separate them.\n+// values are all in text format.\n+message Row {\n+\trepeated int32 lengths = 1;\n+\toptional bytes values = 2;\n+}\n+\n+// Response for SelectRequest.\n+message SelectResponse {","path":"select.proto","position":63,"original_position":63,"commit_id":"debf986926d8f3d7d2d777b0ee088f30860342f3","original_commit_id":"debf986926d8f3d7d2d777b0ee088f30860342f3","user":{"login":"nieyy","id":13518782,"avatar_url":"https://avatars.githubusercontent.com/u/13518782?v=3","gravatar_id":"","url":"https://api.github.com/users/nieyy","html_url":"https://github.com/nieyy","followers_url":"https://api.github.com/users/nieyy/followers","following_url":"https://api.github.com/users/nieyy/following{/other_user}","gists_url":"https://api.github.com/users/nieyy/gists{/gist_id}","starred_url":"https://api.github.com/users/nieyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nieyy/subscriptions","organizations_url":"https://api.github.com/users/nieyy/orgs","repos_url":"https://api.github.com/users/nieyy/repos","events_url":"https://api.github.com/users/nieyy/events{/privacy}","received_events_url":"https://api.github.com/users/nieyy/received_events","type":"User","site_admin":false},"body":"Can we just use `SelectRequest` and `SelectResponse` to represent the pushdown information of all kinds of `SELECT` statements?","created_at":"2016-03-08T06:53:40Z","updated_at":"2016-03-08T06:53:40Z","html_url":"https://github.com/pingcap/tipb/pull/1#discussion_r55322434","pull_request_url":"https://api.github.com/repos/pingcap/tipb/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/pingcap/tipb/pulls/comments/55322434"},"html":{"href":"https://github.com/pingcap/tipb/pull/1#discussion_r55322434"},"pull_request":{"href":"https://api.github.com/repos/pingcap/tipb/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/tipb/pulls/1","id":62018519,"html_url":"https://github.com/pingcap/tipb/pull/1","diff_url":"https://github.com/pingcap/tipb/pull/1.diff","patch_url":"https://github.com/pingcap/tipb/pull/1.patch","issue_url":"https://api.github.com/repos/pingcap/tipb/issues/1","number":1,"state":"open","locked":false,"title":"*:initial commit.","user":{"login":"coocood","id":891222,"avatar_url":"https://avatars.githubusercontent.com/u/891222?v=3","gravatar_id":"","url":"https://api.github.com/users/coocood","html_url":"https://github.com/coocood","followers_url":"https://api.github.com/users/coocood/followers","following_url":"https://api.github.com/users/coocood/following{/other_user}","gists_url":"https://api.github.com/users/coocood/gists{/gist_id}","starred_url":"https://api.github.com/users/coocood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coocood/subscriptions","organizations_url":"https://api.github.com/users/coocood/orgs","repos_url":"https://api.github.com/users/coocood/repos","events_url":"https://api.github.com/users/coocood/events{/privacy}","received_events_url":"https://api.github.com/users/coocood/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-08T03:11:04Z","updated_at":"2016-03-08T06:53:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bce4742eedb779d23f784bf5b235afaa9c206456","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/tipb/pulls/1/commits","review_comments_url":"https://api.github.com/repos/pingcap/tipb/pulls/1/comments","review_comment_url":"https://api.github.com/repos/pingcap/tipb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/tipb/issues/1/comments","statuses_url":"https://api.github.com/repos/pingcap/tipb/statuses/debf986926d8f3d7d2d777b0ee088f30860342f3","head":{"label":"pingcap:coocood/initial","ref":"coocood/initial","sha":"debf986926d8f3d7d2d777b0ee088f30860342f3","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":53292445,"name":"tipb","full_name":"pingcap/tipb","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/tipb","description":"TiDB protobuf","fork":false,"url":"https://api.github.com/repos/pingcap/tipb","forks_url":"https://api.github.com/repos/pingcap/tipb/forks","keys_url":"https://api.github.com/repos/pingcap/tipb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/tipb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/tipb/teams","hooks_url":"https://api.github.com/repos/pingcap/tipb/hooks","issue_events_url":"https://api.github.com/repos/pingcap/tipb/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/tipb/events","assignees_url":"https://api.github.com/repos/pingcap/tipb/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/tipb/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/tipb/tags","blobs_url":"https://api.github.com/repos/pingcap/tipb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/tipb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/tipb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/tipb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/tipb/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/tipb/languages","stargazers_url":"https://api.github.com/repos/pingcap/tipb/stargazers","contributors_url":"https://api.github.com/repos/pingcap/tipb/contributors","subscribers_url":"https://api.github.com/repos/pingcap/tipb/subscribers","subscription_url":"https://api.github.com/repos/pingcap/tipb/subscription","commits_url":"https://api.github.com/repos/pingcap/tipb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/tipb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/tipb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/tipb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/tipb/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/tipb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/tipb/merges","archive_url":"https://api.github.com/repos/pingcap/tipb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/tipb/downloads","issues_url":"https://api.github.com/repos/pingcap/tipb/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/tipb/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/tipb/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/tipb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/tipb/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/tipb/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/tipb/deployments","created_at":"2016-03-07T03:18:24Z","updated_at":"2016-03-08T01:49:12Z","pushed_at":"2016-03-08T04:18:08Z","git_url":"git://github.com/pingcap/tipb.git","ssh_url":"git@github.com:pingcap/tipb.git","clone_url":"https://github.com/pingcap/tipb.git","svn_url":"https://github.com/pingcap/tipb","homepage":null,"size":6,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"63449536993a9bf7691516543aacbd1a02a5655d","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":53292445,"name":"tipb","full_name":"pingcap/tipb","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars.githubusercontent.com/u/11855343?v=3","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/tipb","description":"TiDB protobuf","fork":false,"url":"https://api.github.com/repos/pingcap/tipb","forks_url":"https://api.github.com/repos/pingcap/tipb/forks","keys_url":"https://api.github.com/repos/pingcap/tipb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/tipb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/tipb/teams","hooks_url":"https://api.github.com/repos/pingcap/tipb/hooks","issue_events_url":"https://api.github.com/repos/pingcap/tipb/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/tipb/events","assignees_url":"https://api.github.com/repos/pingcap/tipb/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/tipb/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/tipb/tags","blobs_url":"https://api.github.com/repos/pingcap/tipb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/tipb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/tipb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/tipb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/tipb/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/tipb/languages","stargazers_url":"https://api.github.com/repos/pingcap/tipb/stargazers","contributors_url":"https://api.github.com/repos/pingcap/tipb/contributors","subscribers_url":"https://api.github.com/repos/pingcap/tipb/subscribers","subscription_url":"https://api.github.com/repos/pingcap/tipb/subscription","commits_url":"https://api.github.com/repos/pingcap/tipb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/tipb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/tipb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/tipb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/tipb/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/tipb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/tipb/merges","archive_url":"https://api.github.com/repos/pingcap/tipb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/tipb/downloads","issues_url":"https://api.github.com/repos/pingcap/tipb/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/tipb/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/tipb/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/tipb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/tipb/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/tipb/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/tipb/deployments","created_at":"2016-03-07T03:18:24Z","updated_at":"2016-03-08T01:49:12Z","pushed_at":"2016-03-08T04:18:08Z","git_url":"git://github.com/pingcap/tipb.git","ssh_url":"git@github.com:pingcap/tipb.git","clone_url":"https://github.com/pingcap/tipb.git","svn_url":"https://github.com/pingcap/tipb","homepage":null,"size":6,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/tipb/pulls/1"},"html":{"href":"https://github.com/pingcap/tipb/pull/1"},"issue":{"href":"https://api.github.com/repos/pingcap/tipb/issues/1"},"comments":{"href":"https://api.github.com/repos/pingcap/tipb/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/tipb/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/tipb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/tipb/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/tipb/statuses/debf986926d8f3d7d2d777b0ee088f30860342f3"}}}}