{"action":"created","comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments/72597789","id":72597789,"diff_hunk":"@@ -79,14 +105,142 @@ test__cdbdisp_buildPlanQueryParms__Overflow_plan_size_in_kb(void **state)\n \tassert_true(success);\n }\n \n+void\n+test__cdbdisp_buildPlanQueryParms__no_params(void **state)\n+{\n+\tDispatchCommandQueryParms *pQueryParms;\n+\tstruct QueryDesc *queryDesc = (struct QueryDesc *) palloc0(sizeof(QueryDesc));\n+\n+\t_init_cdbdisp_buildPlanQueryParms(queryDesc);\n+\n+\twill_assign_value(serializeNode, uncompressed_size_out, 4096);\n+\twill_assign_value(serializeNode, size, 3072);\n+\texpect_any(serializeNode, node);\n+\texpect_any(serializeNode, size);\n+\texpect_any(serializeNode, uncompressed_size_out);\n+\n+\tchar *splan = \"serialized plan\";\n+\twill_return(serializeNode, splan);\n+\n+\tqueryDesc->params = NULL;\n+\n+\twill_assign_value(serializeNode, size, 1024);\n+\texpect_any(serializeNode, node);\n+\texpect_any(serializeNode, size);\n+\texpect_any(serializeNode, uncompressed_size_out);\n+\n+\tchar *sddesc = \"serialized dispatch desc\";\n+\twill_return(serializeNode, sddesc);\n+\n+\tCdbComponentDatabases *cdb_component_dbs = palloc(sizeof(*cdb_component_dbs));\n+\tcdb_component_dbs->entry_db_info = palloc0(sizeof(CdbComponentDatabaseInfo));\n+\t(cdb_component_dbs->entry_db_info[0]).hostip = \"127.0.0.1\";\n+\twill_return(getComponentDatabases, cdb_component_dbs);\n+\n+\tseqServerCtl = palloc(sizeof(*seqServerCtl));\n+\tseqServerCtl->seqServerPort = 1234;\n+\n+\tqueryDesc->sourceText = \"SELECT * FROM foo\";\n+\tqueryDesc->extended_query = false;\n+\n+\tchar *serializedDtxCtxInfo = \"serialized dtx context info\";\n+\texpect_any(qdSerializeDtxContextInfo, size);\n+\texpect_value(qdSerializeDtxContextInfo, wantSnapshot, true);\n+\texpect_value(qdSerializeDtxContextInfo, inCursor, false);\n+\texpect_any(qdSerializeDtxContextInfo, txnOptions);\n+\texpect_string(qdSerializeDtxContextInfo, debugCaller, \"cdbdisp_buildPlanQueryParms\");\n+\twill_assign_value(qdSerializeDtxContextInfo, size, 512);\n+\twill_return(qdSerializeDtxContextInfo, serializedDtxCtxInfo);\n+\n+\tpQueryParms = cdbdisp_buildPlanQueryParms(queryDesc, false);\n+\n+\tassert_true(verify_built_query_parms(pQueryParms));\n+}\n+\n+void\n+test__cdbdisp_buildPlanQueryParms__params(void **state)\n+{\n+\tDispatchCommandQueryParms *pQueryParms;","path":"src/backend/cdb/dispatcher/test/cdbdisp_query_test.c","position":146,"original_position":103,"commit_id":"e529b90820b4568eef45059af29c157ae94168cd","original_commit_id":"e529b90820b4568eef45059af29c157ae94168cd","user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars.githubusercontent.com/u/191602?v=3","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"body":"This test seems very fragile, especially mocking all the get_typlenbyval() calls. Do we really need this at all? I think this function gets pretty well tested by installcheck-good; practically all queries call buildPlanQueryParms(), with different inputs.","created_at":"2016-07-28T10:18:22Z","updated_at":"2016-07-28T10:18:22Z","html_url":"https://github.com/greenplum-db/gpdb/pull/996#discussion_r72597789","pull_request_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996","_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments/72597789"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/996#discussion_r72597789"},"pull_request":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996"}}},"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996","id":79157017,"html_url":"https://github.com/greenplum-db/gpdb/pull/996","diff_url":"https://github.com/greenplum-db/gpdb/pull/996.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/996.patch","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/996","number":996,"state":"open","locked":false,"title":"Some refactors, mainly for function cdbdisp_dispatchPlan","user":{"login":"eurekaka","id":6261973,"avatar_url":"https://avatars.githubusercontent.com/u/6261973?v=3","gravatar_id":"","url":"https://api.github.com/users/eurekaka","html_url":"https://github.com/eurekaka","followers_url":"https://api.github.com/users/eurekaka/followers","following_url":"https://api.github.com/users/eurekaka/following{/other_user}","gists_url":"https://api.github.com/users/eurekaka/gists{/gist_id}","starred_url":"https://api.github.com/users/eurekaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eurekaka/subscriptions","organizations_url":"https://api.github.com/users/eurekaka/orgs","repos_url":"https://api.github.com/users/eurekaka/repos","events_url":"https://api.github.com/users/eurekaka/events{/privacy}","received_events_url":"https://api.github.com/users/eurekaka/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-28T08:40:58Z","updated_at":"2016-07-28T10:18:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fc559cd67b81f1ca40a223240495bec95ec8cc7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996/commits","review_comments_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996/comments","review_comment_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/996/comments","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/e529b90820b4568eef45059af29c157ae94168cd","head":{"label":"eurekaka:build_query_parms","ref":"build_query_parms","sha":"e529b90820b4568eef45059af29c157ae94168cd","user":{"login":"eurekaka","id":6261973,"avatar_url":"https://avatars.githubusercontent.com/u/6261973?v=3","gravatar_id":"","url":"https://api.github.com/users/eurekaka","html_url":"https://github.com/eurekaka","followers_url":"https://api.github.com/users/eurekaka/followers","following_url":"https://api.github.com/users/eurekaka/following{/other_user}","gists_url":"https://api.github.com/users/eurekaka/gists{/gist_id}","starred_url":"https://api.github.com/users/eurekaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eurekaka/subscriptions","organizations_url":"https://api.github.com/users/eurekaka/orgs","repos_url":"https://api.github.com/users/eurekaka/repos","events_url":"https://api.github.com/users/eurekaka/events{/privacy}","received_events_url":"https://api.github.com/users/eurekaka/received_events","type":"User","site_admin":false},"repo":{"id":45974087,"name":"gpdb","full_name":"eurekaka/gpdb","owner":{"login":"eurekaka","id":6261973,"avatar_url":"https://avatars.githubusercontent.com/u/6261973?v=3","gravatar_id":"","url":"https://api.github.com/users/eurekaka","html_url":"https://github.com/eurekaka","followers_url":"https://api.github.com/users/eurekaka/followers","following_url":"https://api.github.com/users/eurekaka/following{/other_user}","gists_url":"https://api.github.com/users/eurekaka/gists{/gist_id}","starred_url":"https://api.github.com/users/eurekaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eurekaka/subscriptions","organizations_url":"https://api.github.com/users/eurekaka/orgs","repos_url":"https://api.github.com/users/eurekaka/repos","events_url":"https://api.github.com/users/eurekaka/events{/privacy}","received_events_url":"https://api.github.com/users/eurekaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eurekaka/gpdb","description":"Pivotal Greenplum Database","fork":true,"url":"https://api.github.com/repos/eurekaka/gpdb","forks_url":"https://api.github.com/repos/eurekaka/gpdb/forks","keys_url":"https://api.github.com/repos/eurekaka/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eurekaka/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eurekaka/gpdb/teams","hooks_url":"https://api.github.com/repos/eurekaka/gpdb/hooks","issue_events_url":"https://api.github.com/repos/eurekaka/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/eurekaka/gpdb/events","assignees_url":"https://api.github.com/repos/eurekaka/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/eurekaka/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/eurekaka/gpdb/tags","blobs_url":"https://api.github.com/repos/eurekaka/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eurekaka/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eurekaka/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/eurekaka/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eurekaka/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/eurekaka/gpdb/languages","stargazers_url":"https://api.github.com/repos/eurekaka/gpdb/stargazers","contributors_url":"https://api.github.com/repos/eurekaka/gpdb/contributors","subscribers_url":"https://api.github.com/repos/eurekaka/gpdb/subscribers","subscription_url":"https://api.github.com/repos/eurekaka/gpdb/subscription","commits_url":"https://api.github.com/repos/eurekaka/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/eurekaka/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/eurekaka/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/eurekaka/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/eurekaka/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/eurekaka/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eurekaka/gpdb/merges","archive_url":"https://api.github.com/repos/eurekaka/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eurekaka/gpdb/downloads","issues_url":"https://api.github.com/repos/eurekaka/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/eurekaka/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/eurekaka/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/eurekaka/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eurekaka/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/eurekaka/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/eurekaka/gpdb/deployments","created_at":"2015-11-11T10:06:46Z","updated_at":"2015-11-11T10:07:33Z","pushed_at":"2016-07-28T08:31:36Z","git_url":"git://github.com/eurekaka/gpdb.git","ssh_url":"git@github.com:eurekaka/gpdb.git","clone_url":"https://github.com/eurekaka/gpdb.git","svn_url":"https://github.com/eurekaka/gpdb","homepage":"http://greenplum.org","size":157327,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","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":"greenplum-db:master","ref":"master","sha":"28bff27153877b87af5c77cda42e68cded37331a","user":{"login":"greenplum-db","id":14097842,"avatar_url":"https://avatars.githubusercontent.com/u/14097842?v=3","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"repo":{"id":44781140,"name":"gpdb","full_name":"greenplum-db/gpdb","owner":{"login":"greenplum-db","id":14097842,"avatar_url":"https://avatars.githubusercontent.com/u/14097842?v=3","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/greenplum-db/gpdb","description":"Greenplum Database","fork":false,"url":"https://api.github.com/repos/greenplum-db/gpdb","forks_url":"https://api.github.com/repos/greenplum-db/gpdb/forks","keys_url":"https://api.github.com/repos/greenplum-db/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenplum-db/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenplum-db/gpdb/teams","hooks_url":"https://api.github.com/repos/greenplum-db/gpdb/hooks","issue_events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/greenplum-db/gpdb/events","assignees_url":"https://api.github.com/repos/greenplum-db/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/greenplum-db/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/greenplum-db/gpdb/tags","blobs_url":"https://api.github.com/repos/greenplum-db/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenplum-db/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenplum-db/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenplum-db/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/greenplum-db/gpdb/languages","stargazers_url":"https://api.github.com/repos/greenplum-db/gpdb/stargazers","contributors_url":"https://api.github.com/repos/greenplum-db/gpdb/contributors","subscribers_url":"https://api.github.com/repos/greenplum-db/gpdb/subscribers","subscription_url":"https://api.github.com/repos/greenplum-db/gpdb/subscription","commits_url":"https://api.github.com/repos/greenplum-db/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenplum-db/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenplum-db/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/greenplum-db/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenplum-db/gpdb/merges","archive_url":"https://api.github.com/repos/greenplum-db/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenplum-db/gpdb/downloads","issues_url":"https://api.github.com/repos/greenplum-db/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/greenplum-db/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/greenplum-db/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/greenplum-db/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/greenplum-db/gpdb/deployments","created_at":"2015-10-23T00:25:17Z","updated_at":"2016-07-28T10:00:08Z","pushed_at":"2016-07-28T09:59:23Z","git_url":"git://github.com/greenplum-db/gpdb.git","ssh_url":"git@github.com:greenplum-db/gpdb.git","clone_url":"https://github.com/greenplum-db/gpdb.git","svn_url":"https://github.com/greenplum-db/gpdb","homepage":"http://greenplum.org","size":171532,"stargazers_count":1543,"watchers_count":1543,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":427,"mirror_url":null,"open_issues_count":116,"forks":427,"open_issues":116,"watchers":1543,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/996"},"issue":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/996"},"comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/996/comments"},"review_comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996/comments"},"review_comment":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/996/commits"},"statuses":{"href":"https://api.github.com/repos/greenplum-db/gpdb/statuses/e529b90820b4568eef45059af29c157ae94168cd"}}}}
{"actor":{"display_login":"hlinnaka"}}