{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/15901","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/15901/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/15901/comments","events_url":"https://api.github.com/repos/apache/spark/issues/15901/events","html_url":"https://github.com/apache/spark/pull/15901","id":189605407,"number":15901,"title":"[SPARK-18467][SQL] Extracts method for preparing arguments from StaticInvoke, Invoke and NewInstance and modify to short circuit if arguments have null when `needNullCheck == true`.","user":{"login":"ueshin","id":506656,"avatar_url":"https://avatars.githubusercontent.com/u/506656?v=3","gravatar_id":"","url":"https://api.github.com/users/ueshin","html_url":"https://github.com/ueshin","followers_url":"https://api.github.com/users/ueshin/followers","following_url":"https://api.github.com/users/ueshin/following{/other_user}","gists_url":"https://api.github.com/users/ueshin/gists{/gist_id}","starred_url":"https://api.github.com/users/ueshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ueshin/subscriptions","organizations_url":"https://api.github.com/users/ueshin/orgs","repos_url":"https://api.github.com/users/ueshin/repos","events_url":"https://api.github.com/users/ueshin/events{/privacy}","received_events_url":"https://api.github.com/users/ueshin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2016-11-16T06:30:41Z","updated_at":"2016-11-21T04:05:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15901","html_url":"https://github.com/apache/spark/pull/15901","diff_url":"https://github.com/apache/spark/pull/15901.diff","patch_url":"https://github.com/apache/spark/pull/15901.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis pr extracts method for preparing arguments from `StaticInvoke`, `Invoke` and `NewInstance` and modify to short circuit if arguments have `null` when `propageteNull == true`.\r\n\r\nThe steps are as follows:\r\n\r\n1. Introduce `InvokeLike` to extract common logic from `StaticInvoke`, `Invoke` and `NewInstance` to prepare arguments.\r\n`StaticInvoke` and `Invoke` had a risk to exceed 64kb JVM limit to prepare arguments but after this patch they can handle them because they share the preparing code of NewInstance, which handles the limit well.\r\n\r\n2. Remove unneeded null checking and fix nullability of `NewInstance`.\r\nAvoid some of nullabilty checking which are not needed because the expression is not nullable.\r\n\r\n3. Modify to short circuit if arguments have `null` when `needNullCheck == true`.\r\nIf `needNullCheck == true`, preparing arguments can be skipped if we found one of them is `null`, so modified to short circuit in the case.\r\n\r\n## How was this patch tested?\r\n\r\nExisting tests.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/261837764","html_url":"https://github.com/apache/spark/pull/15901#issuecomment-261837764","issue_url":"https://api.github.com/repos/apache/spark/issues/15901","id":261837764,"user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T04:05:50Z","updated_at":"2016-11-21T04:05:50Z","body":"thanks, merging to master/2.1!"}}
{"actor":{"display_login":"cloud-fan"}}