payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apache/calcite/pulls/comments/361313332","pull_request_review_id":336364916,"id":361313332,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MTMxMzMzMg==","diff_hunk":"@@ -634,6 +634,13 @@ public Result visit(Sort e) {\n     }\n     Result x = visitChild(0, e.getInput());\n     Builder builder = x.builder(e, Clause.ORDER_BY);\n+    if (builder.select.getSelectList() == null) {","path":"core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java","position":null,"original_position":4,"commit_id":"0c3df827a133a7e04538182a152c5d93be38954f","original_commit_id":"3c0dd3f7cd750cd9af2035726a131464bbac229f","user":{"login":"danny0405","id":7644508,"node_id":"MDQ6VXNlcjc2NDQ1MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/7644508?v=4","gravatar_id":"","url":"https://api.github.com/users/danny0405","html_url":"https://github.com/danny0405","followers_url":"https://api.github.com/users/danny0405/followers","following_url":"https://api.github.com/users/danny0405/following{/other_user}","gists_url":"https://api.github.com/users/danny0405/gists{/gist_id}","starred_url":"https://api.github.com/users/danny0405/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danny0405/subscriptions","organizations_url":"https://api.github.com/users/danny0405/orgs","repos_url":"https://api.github.com/users/danny0405/repos","events_url":"https://api.github.com/users/danny0405/events{/privacy}","received_events_url":"https://api.github.com/users/danny0405/received_events","type":"User","site_admin":false},"body":"Just curious, shouldn't we generate `SELECT \"t2\".\"full_name\", \"t2\".\"last_name0\" AS \"last_name\"` instead of `select *` ?\r\n\r\nWhy we need a decision `if (stack.getLast().r != e)` it looks weird.\r\n\r\nAlso, the generated sql outputs one more column than the original, i think it is because we generate the sql using the RelRoot.rel directly. We better fix this.","created_at":"2019-12-25T13:37:53Z","updated_at":"2019-12-25T13:37:54Z","html_url":"https://github.com/apache/calcite/pull/1680#discussion_r361313332","pull_request_url":"https://api.github.com/repos/apache/calcite/pulls/1680","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/calcite/pulls/comments/361313332"},"html":{"href":"https://github.com/apache/calcite/pull/1680#discussion_r361313332"},"pull_request":{"href":"https://api.github.com/repos/apache/calcite/pulls/1680"}},"in_reply_to_id":360714235},"pull_request":{"url":"https://api.github.com/repos/apache/calcite/pulls/1680","id":355721339,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU1NzIxMzM5","html_url":"https://github.com/apache/calcite/pull/1680","diff_url":"https://github.com/apache/calcite/pull/1680.diff","patch_url":"https://github.com/apache/calcite/pull/1680.patch","issue_url":"https://api.github.com/repos/apache/calcite/issues/1680","number":1680,"state":"open","locked":false,"title":"[CALCITE-3621] Push down sort to DB, SQL of Sort rel contains explicit field name instead of * when sort is not top rel","user":{"login":"helloppx","id":1185105,"node_id":"MDQ6VXNlcjExODUxMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1185105?v=4","gravatar_id":"","url":"https://api.github.com/users/helloppx","html_url":"https://github.com/helloppx","followers_url":"https://api.github.com/users/helloppx/followers","following_url":"https://api.github.com/users/helloppx/following{/other_user}","gists_url":"https://api.github.com/users/helloppx/gists{/gist_id}","starred_url":"https://api.github.com/users/helloppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helloppx/subscriptions","organizations_url":"https://api.github.com/users/helloppx/orgs","repos_url":"https://api.github.com/users/helloppx/repos","events_url":"https://api.github.com/users/helloppx/events{/privacy}","received_events_url":"https://api.github.com/users/helloppx/received_events","type":"User","site_admin":false},"body":"[https://issues.apache.org/jira/browse/CALCITE-3621#](url)\r\nPush down sort to DB, SQL of Sort rel contains explicit field name instead of *\r\n:D","created_at":"2019-12-20T13:02:22Z","updated_at":"2019-12-25T13:37:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2adefd311ebbd07d770f586f961c06164ca81595","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/calcite/pulls/1680/commits","review_comments_url":"https://api.github.com/repos/apache/calcite/pulls/1680/comments","review_comment_url":"https://api.github.com/repos/apache/calcite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/calcite/issues/1680/comments","statuses_url":"https://api.github.com/repos/apache/calcite/statuses/0c3df827a133a7e04538182a152c5d93be38954f","head":{"label":"helloppx:CALCITE-3621","ref":"CALCITE-3621","sha":"0c3df827a133a7e04538182a152c5d93be38954f","user":{"login":"helloppx","id":1185105,"node_id":"MDQ6VXNlcjExODUxMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1185105?v=4","gravatar_id":"","url":"https://api.github.com/users/helloppx","html_url":"https://github.com/helloppx","followers_url":"https://api.github.com/users/helloppx/followers","following_url":"https://api.github.com/users/helloppx/following{/other_user}","gists_url":"https://api.github.com/users/helloppx/gists{/gist_id}","starred_url":"https://api.github.com/users/helloppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helloppx/subscriptions","organizations_url":"https://api.github.com/users/helloppx/orgs","repos_url":"https://api.github.com/users/helloppx/repos","events_url":"https://api.github.com/users/helloppx/events{/privacy}","received_events_url":"https://api.github.com/users/helloppx/received_events","type":"User","site_admin":false},"repo":{"id":229250446,"node_id":"MDEwOlJlcG9zaXRvcnkyMjkyNTA0NDY=","name":"calcite","full_name":"helloppx/calcite","private":false,"owner":{"login":"helloppx","id":1185105,"node_id":"MDQ6VXNlcjExODUxMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1185105?v=4","gravatar_id":"","url":"https://api.github.com/users/helloppx","html_url":"https://github.com/helloppx","followers_url":"https://api.github.com/users/helloppx/followers","following_url":"https://api.github.com/users/helloppx/following{/other_user}","gists_url":"https://api.github.com/users/helloppx/gists{/gist_id}","starred_url":"https://api.github.com/users/helloppx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helloppx/subscriptions","organizations_url":"https://api.github.com/users/helloppx/orgs","repos_url":"https://api.github.com/users/helloppx/repos","events_url":"https://api.github.com/users/helloppx/events{/privacy}","received_events_url":"https://api.github.com/users/helloppx/received_events","type":"User","site_admin":false},"html_url":"https://github.com/helloppx/calcite","description":"Mirror of Apache Calcite","fork":true,"url":"https://api.github.com/repos/helloppx/calcite","forks_url":"https://api.github.com/repos/helloppx/calcite/forks","keys_url":"https://api.github.com/repos/helloppx/calcite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/helloppx/calcite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/helloppx/calcite/teams","hooks_url":"https://api.github.com/repos/helloppx/calcite/hooks","issue_events_url":"https://api.github.com/repos/helloppx/calcite/issues/events{/number}","events_url":"https://api.github.com/repos/helloppx/calcite/events","assignees_url":"https://api.github.com/repos/helloppx/calcite/assignees{/user}","branches_url":"https://api.github.com/repos/helloppx/calcite/branches{/branch}","tags_url":"https://api.github.com/repos/helloppx/calcite/tags","blobs_url":"https://api.github.com/repos/helloppx/calcite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/helloppx/calcite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/helloppx/calcite/git/refs{/sha}","trees_url":"https://api.github.com/repos/helloppx/calcite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/helloppx/calcite/statuses/{sha}","languages_url":"https://api.github.com/repos/helloppx/calcite/languages","stargazers_url":"https://api.github.com/repos/helloppx/calcite/stargazers","contributors_url":"https://api.github.com/repos/helloppx/calcite/contributors","subscribers_url":"https://api.github.com/repos/helloppx/calcite/subscribers","subscription_url":"https://api.github.com/repos/helloppx/calcite/subscription","commits_url":"https://api.github.com/repos/helloppx/calcite/commits{/sha}","git_commits_url":"https://api.github.com/repos/helloppx/calcite/git/commits{/sha}","comments_url":"https://api.github.com/repos/helloppx/calcite/comments{/number}","issue_comment_url":"https://api.github.com/repos/helloppx/calcite/issues/comments{/number}","contents_url":"https://api.github.com/repos/helloppx/calcite/contents/{+path}","compare_url":"https://api.github.com/repos/helloppx/calcite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/helloppx/calcite/merges","archive_url":"https://api.github.com/repos/helloppx/calcite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/helloppx/calcite/downloads","issues_url":"https://api.github.com/repos/helloppx/calcite/issues{/number}","pulls_url":"https://api.github.com/repos/helloppx/calcite/pulls{/number}","milestones_url":"https://api.github.com/repos/helloppx/calcite/milestones{/number}","notifications_url":"https://api.github.com/repos/helloppx/calcite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/helloppx/calcite/labels{/name}","releases_url":"https://api.github.com/repos/helloppx/calcite/releases{/id}","deployments_url":"https://api.github.com/repos/helloppx/calcite/deployments","created_at":"2019-12-20T11:13:06Z","updated_at":"2019-12-20T11:13:08Z","pushed_at":"2019-12-24T03:07:41Z","git_url":"git://github.com/helloppx/calcite.git","ssh_url":"git@github.com:helloppx/calcite.git","clone_url":"https://github.com/helloppx/calcite.git","svn_url":"https://github.com/helloppx/calcite","homepage":"","size":57013,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"edc386d960b12642cdca40abb692beab6f75ce72","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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":21193524,"node_id":"MDEwOlJlcG9zaXRvcnkyMTE5MzUyNA==","name":"calcite","full_name":"apache/calcite","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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},"html_url":"https://github.com/apache/calcite","description":"Mirror of Apache Calcite","fork":false,"url":"https://api.github.com/repos/apache/calcite","forks_url":"https://api.github.com/repos/apache/calcite/forks","keys_url":"https://api.github.com/repos/apache/calcite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/calcite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/calcite/teams","hooks_url":"https://api.github.com/repos/apache/calcite/hooks","issue_events_url":"https://api.github.com/repos/apache/calcite/issues/events{/number}","events_url":"https://api.github.com/repos/apache/calcite/events","assignees_url":"https://api.github.com/repos/apache/calcite/assignees{/user}","branches_url":"https://api.github.com/repos/apache/calcite/branches{/branch}","tags_url":"https://api.github.com/repos/apache/calcite/tags","blobs_url":"https://api.github.com/repos/apache/calcite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/calcite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/calcite/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/calcite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/calcite/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/calcite/languages","stargazers_url":"https://api.github.com/repos/apache/calcite/stargazers","contributors_url":"https://api.github.com/repos/apache/calcite/contributors","subscribers_url":"https://api.github.com/repos/apache/calcite/subscribers","subscription_url":"https://api.github.com/repos/apache/calcite/subscription","commits_url":"https://api.github.com/repos/apache/calcite/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/calcite/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/calcite/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/calcite/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/calcite/contents/{+path}","compare_url":"https://api.github.com/repos/apache/calcite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/calcite/merges","archive_url":"https://api.github.com/repos/apache/calcite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/calcite/downloads","issues_url":"https://api.github.com/repos/apache/calcite/issues{/number}","pulls_url":"https://api.github.com/repos/apache/calcite/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/calcite/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/calcite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/calcite/labels{/name}","releases_url":"https://api.github.com/repos/apache/calcite/releases{/id}","deployments_url":"https://api.github.com/repos/apache/calcite/deployments","created_at":"2014-06-25T07:00:07Z","updated_at":"2019-12-25T03:35:17Z","pushed_at":"2019-12-25T10:08:50Z","git_url":"git://github.com/apache/calcite.git","ssh_url":"git@github.com:apache/calcite.git","clone_url":"https://github.com/apache/calcite.git","svn_url":"https://github.com/apache/calcite","homepage":"","size":57133,"stargazers_count":1626,"watchers_count":1626,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1018,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":142,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1018,"open_issues":142,"watchers":1626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/calcite/pulls/1680"},"html":{"href":"https://github.com/apache/calcite/pull/1680"},"issue":{"href":"https://api.github.com/repos/apache/calcite/issues/1680"},"comments":{"href":"https://api.github.com/repos/apache/calcite/issues/1680/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/calcite/pulls/1680/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/calcite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/calcite/pulls/1680/commits"},"statuses":{"href":"https://api.github.com/repos/apache/calcite/statuses/0c3df827a133a7e04538182a152c5d93be38954f"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"danny0405"}}