{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-hawq/pulls/comments/44705494","id":44705494,"diff_hunk":"@@ -216,51 +216,50 @@ static void assign_pxf_port_to_fragments(int remote_rest_port, List *fragments)\n }\n \n /*\n- * Fetches statistics of the PXF datasource from the PXF service\n+ * Fetches fragments statistics of the PXF datasource from the PXF service\n  *\n- * The function will generate a delegation token when secure filesystem mode \n+ * The function will generate a delegation token when secure filesystem mode\n  * is on and cancel it right after.\n  */\n-PxfStatsElem *get_pxf_statistics(char *uri, Relation rel, StringInfo err_msg)\n+PxfFragmentStatsElem *get_pxf_fragments_statistics(char *uri, Relation rel, StringInfo err_msg)","path":"src/backend/access/external/hd_work_mgr.c","position":12,"original_position":12,"commit_id":"49b3e448436c32561af2fc16749ec484216770d6","original_commit_id":"49b3e448436c32561af2fc16749ec484216770d6","user":{"login":"entong","id":1194443,"avatar_url":"https://avatars.githubusercontent.com/u/1194443?v=3","gravatar_id":"","url":"https://api.github.com/users/entong","html_url":"https://github.com/entong","followers_url":"https://api.github.com/users/entong/followers","following_url":"https://api.github.com/users/entong/following{/other_user}","gists_url":"https://api.github.com/users/entong/gists{/gist_id}","starred_url":"https://api.github.com/users/entong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/entong/subscriptions","organizations_url":"https://api.github.com/users/entong/orgs","repos_url":"https://api.github.com/users/entong/repos","events_url":"https://api.github.com/users/entong/events{/privacy}","received_events_url":"https://api.github.com/users/entong/received_events","type":"User","site_admin":false},"body":"Many functions in this CL have err_msg as an argument, which is not very clean API. Is there a better way? Can we emit the error message at the place the error occurs?","created_at":"2015-11-12T19:50:55Z","updated_at":"2015-11-12T19:50:55Z","html_url":"https://github.com/apache/incubator-hawq/pull/92#discussion_r44705494","pull_request_url":"https://api.github.com/repos/apache/incubator-hawq/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-hawq/pulls/comments/44705494"},"html":{"href":"https://github.com/apache/incubator-hawq/pull/92#discussion_r44705494"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-hawq/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-hawq/pulls/92","id":50294895,"html_url":"https://github.com/apache/incubator-hawq/pull/92","diff_url":"https://github.com/apache/incubator-hawq/pull/92.diff","patch_url":"https://github.com/apache/incubator-hawq/pull/92.patch","issue_url":"https://api.github.com/repos/apache/incubator-hawq/issues/92","number":92,"state":"open","locked":false,"title":"Analyze HAWQ-44","user":{"login":"hornn","id":11283944,"avatar_url":"https://avatars.githubusercontent.com/u/11283944?v=3","gravatar_id":"","url":"https://api.github.com/users/hornn","html_url":"https://github.com/hornn","followers_url":"https://api.github.com/users/hornn/followers","following_url":"https://api.github.com/users/hornn/following{/other_user}","gists_url":"https://api.github.com/users/hornn/gists{/gist_id}","starred_url":"https://api.github.com/users/hornn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornn/subscriptions","organizations_url":"https://api.github.com/users/hornn/orgs","repos_url":"https://api.github.com/users/hornn/repos","events_url":"https://api.github.com/users/hornn/events{/privacy}","received_events_url":"https://api.github.com/users/hornn/received_events","type":"User","site_admin":false},"body":"Advanced statistics for PXF table.\r\n\r\nPXF sample rows are collected into a temporary table, where statistics are derived of them in the same way ANALYZE works for hawq tables.\r\nStatistics are gathered at 3 stages:\r\n1. Getting general statistics - number of fragments, size of data source, size of first fragment\r\n2. Count of first fragment tuples\r\nHAWQ uses these numbers to determine how many tuples are needed, and these parameters are translated to sampling ratio and number of sampled fragments.\r\n3. Sampling the PXF table based on the sampling ratio and number of fragments to be sampled. The returned tuples are saved in a temporary table.\r\n\r\nOn the PXF side, a function has been made to the Fragmenter API, to allow gathering the stats of the first stage. In addition, a mechanism to sample rows on the fly was added to the Bridge.","created_at":"2015-11-10T18:55:39Z","updated_at":"2015-11-12T19:50:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a09a95bcdf900a4b3bd7c9bcaa9dc55e42cdeeb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-hawq/pulls/92/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-hawq/pulls/92/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-hawq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-hawq/issues/92/comments","statuses_url":"https://api.github.com/repos/apache/incubator-hawq/statuses/49b3e448436c32561af2fc16749ec484216770d6","head":{"label":"hornn:analyze_HAWQ-44","ref":"analyze_HAWQ-44","sha":"49b3e448436c32561af2fc16749ec484216770d6","user":{"login":"hornn","id":11283944,"avatar_url":"https://avatars.githubusercontent.com/u/11283944?v=3","gravatar_id":"","url":"https://api.github.com/users/hornn","html_url":"https://github.com/hornn","followers_url":"https://api.github.com/users/hornn/followers","following_url":"https://api.github.com/users/hornn/following{/other_user}","gists_url":"https://api.github.com/users/hornn/gists{/gist_id}","starred_url":"https://api.github.com/users/hornn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornn/subscriptions","organizations_url":"https://api.github.com/users/hornn/orgs","repos_url":"https://api.github.com/users/hornn/repos","events_url":"https://api.github.com/users/hornn/events{/privacy}","received_events_url":"https://api.github.com/users/hornn/received_events","type":"User","site_admin":false},"repo":{"id":44128416,"name":"incubator-hawq","full_name":"hornn/incubator-hawq","owner":{"login":"hornn","id":11283944,"avatar_url":"https://avatars.githubusercontent.com/u/11283944?v=3","gravatar_id":"","url":"https://api.github.com/users/hornn","html_url":"https://github.com/hornn","followers_url":"https://api.github.com/users/hornn/followers","following_url":"https://api.github.com/users/hornn/following{/other_user}","gists_url":"https://api.github.com/users/hornn/gists{/gist_id}","starred_url":"https://api.github.com/users/hornn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hornn/subscriptions","organizations_url":"https://api.github.com/users/hornn/orgs","repos_url":"https://api.github.com/users/hornn/repos","events_url":"https://api.github.com/users/hornn/events{/privacy}","received_events_url":"https://api.github.com/users/hornn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hornn/incubator-hawq","description":"Mirror of Apache HAWQ (Incubating)","fork":true,"url":"https://api.github.com/repos/hornn/incubator-hawq","forks_url":"https://api.github.com/repos/hornn/incubator-hawq/forks","keys_url":"https://api.github.com/repos/hornn/incubator-hawq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hornn/incubator-hawq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hornn/incubator-hawq/teams","hooks_url":"https://api.github.com/repos/hornn/incubator-hawq/hooks","issue_events_url":"https://api.github.com/repos/hornn/incubator-hawq/issues/events{/number}","events_url":"https://api.github.com/repos/hornn/incubator-hawq/events","assignees_url":"https://api.github.com/repos/hornn/incubator-hawq/assignees{/user}","branches_url":"https://api.github.com/repos/hornn/incubator-hawq/branches{/branch}","tags_url":"https://api.github.com/repos/hornn/incubator-hawq/tags","blobs_url":"https://api.github.com/repos/hornn/incubator-hawq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hornn/incubator-hawq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hornn/incubator-hawq/git/refs{/sha}","trees_url":"https://api.github.com/repos/hornn/incubator-hawq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hornn/incubator-hawq/statuses/{sha}","languages_url":"https://api.github.com/repos/hornn/incubator-hawq/languages","stargazers_url":"https://api.github.com/repos/hornn/incubator-hawq/stargazers","contributors_url":"https://api.github.com/repos/hornn/incubator-hawq/contributors","subscribers_url":"https://api.github.com/repos/hornn/incubator-hawq/subscribers","subscription_url":"https://api.github.com/repos/hornn/incubator-hawq/subscription","commits_url":"https://api.github.com/repos/hornn/incubator-hawq/commits{/sha}","git_commits_url":"https://api.github.com/repos/hornn/incubator-hawq/git/commits{/sha}","comments_url":"https://api.github.com/repos/hornn/incubator-hawq/comments{/number}","issue_comment_url":"https://api.github.com/repos/hornn/incubator-hawq/issues/comments{/number}","contents_url":"https://api.github.com/repos/hornn/incubator-hawq/contents/{+path}","compare_url":"https://api.github.com/repos/hornn/incubator-hawq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hornn/incubator-hawq/merges","archive_url":"https://api.github.com/repos/hornn/incubator-hawq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hornn/incubator-hawq/downloads","issues_url":"https://api.github.com/repos/hornn/incubator-hawq/issues{/number}","pulls_url":"https://api.github.com/repos/hornn/incubator-hawq/pulls{/number}","milestones_url":"https://api.github.com/repos/hornn/incubator-hawq/milestones{/number}","notifications_url":"https://api.github.com/repos/hornn/incubator-hawq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hornn/incubator-hawq/labels{/name}","releases_url":"https://api.github.com/repos/hornn/incubator-hawq/releases{/id}","created_at":"2015-10-12T19:10:51Z","updated_at":"2015-10-12T19:11:20Z","pushed_at":"2015-11-12T01:36:07Z","git_url":"git://github.com/hornn/incubator-hawq.git","ssh_url":"git@github.com:hornn/incubator-hawq.git","clone_url":"https://github.com/hornn/incubator-hawq.git","svn_url":"https://github.com/hornn/incubator-hawq","homepage":null,"size":39326,"stargazers_count":0,"watchers_count":0,"language":"C","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":"apache:master","ref":"master","sha":"e24233fa29159c58b50cee86752722a0e8bfe0a9","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":41952293,"name":"incubator-hawq","full_name":"apache/incubator-hawq","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-hawq","description":"Mirror of Apache HAWQ (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-hawq","forks_url":"https://api.github.com/repos/apache/incubator-hawq/forks","keys_url":"https://api.github.com/repos/apache/incubator-hawq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-hawq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-hawq/teams","hooks_url":"https://api.github.com/repos/apache/incubator-hawq/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-hawq/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-hawq/events","assignees_url":"https://api.github.com/repos/apache/incubator-hawq/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-hawq/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-hawq/tags","blobs_url":"https://api.github.com/repos/apache/incubator-hawq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-hawq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-hawq/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-hawq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-hawq/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-hawq/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-hawq/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-hawq/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-hawq/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-hawq/subscription","commits_url":"https://api.github.com/repos/apache/incubator-hawq/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-hawq/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-hawq/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-hawq/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-hawq/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-hawq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-hawq/merges","archive_url":"https://api.github.com/repos/apache/incubator-hawq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-hawq/downloads","issues_url":"https://api.github.com/repos/apache/incubator-hawq/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-hawq/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-hawq/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-hawq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-hawq/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-hawq/releases{/id}","created_at":"2015-09-05T07:00:05Z","updated_at":"2015-11-11T15:38:37Z","pushed_at":"2015-11-12T08:33:11Z","git_url":"git://github.com/apache/incubator-hawq.git","ssh_url":"git@github.com:apache/incubator-hawq.git","clone_url":"https://github.com/apache/incubator-hawq.git","svn_url":"https://github.com/apache/incubator-hawq","homepage":null,"size":42991,"stargazers_count":72,"watchers_count":72,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":66,"mirror_url":"git://git.apache.org/incubator-hawq.git","open_issues_count":14,"forks":66,"open_issues":14,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-hawq/pulls/92"},"html":{"href":"https://github.com/apache/incubator-hawq/pull/92"},"issue":{"href":"https://api.github.com/repos/apache/incubator-hawq/issues/92"},"comments":{"href":"https://api.github.com/repos/apache/incubator-hawq/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-hawq/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-hawq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-hawq/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-hawq/statuses/49b3e448436c32561af2fc16749ec484216770d6"}}}}