{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14295","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14295/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14295/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14295/events","html_url":"https://github.com/apache/spark/pull/14295","id":166737267,"number":14295,"title":"[SPARK-16648][SQL] Overrides TreeNode.withNewChildren in Last","user":{"login":"liancheng","id":230655,"avatar_url":"https://avatars.githubusercontent.com/u/230655?v=3","gravatar_id":"","url":"https://api.github.com/users/liancheng","html_url":"https://github.com/liancheng","followers_url":"https://api.github.com/users/liancheng/followers","following_url":"https://api.github.com/users/liancheng/following{/other_user}","gists_url":"https://api.github.com/users/liancheng/gists{/gist_id}","starred_url":"https://api.github.com/users/liancheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liancheng/subscriptions","organizations_url":"https://api.github.com/users/liancheng/orgs","repos_url":"https://api.github.com/users/liancheng/repos","events_url":"https://api.github.com/users/liancheng/events{/privacy}","received_events_url":"https://api.github.com/users/liancheng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-21T04:55:27Z","updated_at":"2016-07-25T08:33:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14295","html_url":"https://github.com/apache/spark/pull/14295","diff_url":"https://github.com/apache/spark/pull/14295.diff","patch_url":"https://github.com/apache/spark/pull/14295.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nDefault `TreeNode.withNewChildren` implementation doesn't work for `Last` and when both constructor arguments are the same, e.g.:\r\n\r\n```sql\r\nLAST_VALUE(FALSE) -- The 2nd argument defaults to FALSE\r\nLAST_VALUE(FALSE, FALSE)\r\nLAST_VALUE(TRUE, TRUE)\r\n```\r\n\r\nThis is because although `Last` is a unary expression, both of its constructor arguments are `Expression`s. When they have the same value, `TreeNode.withNewChildren` treats both of them as child nodes by mistake.\r\n\r\n`First` is also affected by this issue in exactly the same way.\r\n\r\n## How was this patch tested?\r\n\r\nNew test case added in `WindowQuerySuite`."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/234886734","html_url":"https://github.com/apache/spark/pull/14295#issuecomment-234886734","issue_url":"https://api.github.com/repos/apache/spark/issues/14295","id":234886734,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T08:33:18Z","updated_at":"2016-07-25T08:33:18Z","body":"**[Test build #62799 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62799/consoleFull)** for PR 14295 at commit [`0152075`](https://github.com/apache/spark/commit/0152075c9ebf1e568e31cf3558ba7f5ef4e93b1f).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}