{"action":"created","issue":{"url":"https://api.github.com/repos/apache/flink/issues/2961","repository_url":"https://api.github.com/repos/apache/flink","labels_url":"https://api.github.com/repos/apache/flink/issues/2961/labels{/name}","comments_url":"https://api.github.com/repos/apache/flink/issues/2961/comments","events_url":"https://api.github.com/repos/apache/flink/issues/2961/events","html_url":"https://github.com/apache/flink/pull/2961","id":194233455,"number":2961,"title":"[FLINK-5266] [table] eagerly project unused fields when selecting aggregation fields","user":{"login":"KurtYoung","id":955396,"avatar_url":"https://avatars.githubusercontent.com/u/955396?v=3","gravatar_id":"","url":"https://api.github.com/users/KurtYoung","html_url":"https://github.com/KurtYoung","followers_url":"https://api.github.com/users/KurtYoung/followers","following_url":"https://api.github.com/users/KurtYoung/following{/other_user}","gists_url":"https://api.github.com/users/KurtYoung/gists{/gist_id}","starred_url":"https://api.github.com/users/KurtYoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KurtYoung/subscriptions","organizations_url":"https://api.github.com/users/KurtYoung/orgs","repos_url":"https://api.github.com/users/KurtYoung/repos","events_url":"https://api.github.com/users/KurtYoung/events{/privacy}","received_events_url":"https://api.github.com/users/KurtYoung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-08T02:47:54Z","updated_at":"2016-12-15T10:08:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/2961","html_url":"https://github.com/apache/flink/pull/2961","diff_url":"https://github.com/apache/flink/pull/2961.diff","patch_url":"https://github.com/apache/flink/pull/2961.patch"},"body":"This PR is based on #2926 , only the second commit is related.\r\n\r\nI add a \"plan\" test directory to hold all the plan level tests. And i also did a small refactory for ProjectionTranslator, thought it's better to keep each method only do one thing.\r\n\r\n@fhueske As we discussed earlier in the jira: https://issues.apache.org/jira/browse/FLINK-5266 about where the logics should be added. I decided to add them when we selecting fields from a normal or grouped table. Since this kind of logics involves some fields references rewrite, if we choose to add the needed projection node when we convert the LogicalPlan to Calcite's RelNode, we should also take care the whole rewrite thing. \r\n\r\nHowever, if we add the project node in the first place, we only need to extract all the field references used in all selecting expressions, and treat them as UnresolvedFieldReferences. The validation part will take care of the rewrite thing. I think this will be easier and more consistent with other procedures. (Noticed all the \"construct\" logic are fairly simple)"},"comment":{"url":"https://api.github.com/repos/apache/flink/issues/comments/267289817","html_url":"https://github.com/apache/flink/pull/2961#issuecomment-267289817","issue_url":"https://api.github.com/repos/apache/flink/issues/2961","id":267289817,"user":{"login":"fhueske","id":2388347,"avatar_url":"https://avatars.githubusercontent.com/u/2388347?v=3","gravatar_id":"","url":"https://api.github.com/users/fhueske","html_url":"https://github.com/fhueske","followers_url":"https://api.github.com/users/fhueske/followers","following_url":"https://api.github.com/users/fhueske/following{/other_user}","gists_url":"https://api.github.com/users/fhueske/gists{/gist_id}","starred_url":"https://api.github.com/users/fhueske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhueske/subscriptions","organizations_url":"https://api.github.com/users/fhueske/orgs","repos_url":"https://api.github.com/users/fhueske/repos","events_url":"https://api.github.com/users/fhueske/events{/privacy}","received_events_url":"https://api.github.com/users/fhueske/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T10:08:57Z","updated_at":"2016-12-15T10:08:57Z","body":"merging"}}
{"actor":{"display_login":"fhueske"}}