GitHub PullRequestReviewCommentEvent at 2014-06-11 05:19:37
Repository: spark
Actor: marmbrus
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/13634226","id":13634226,"diff_hunk":"@@ -173,4 +173,63 @@ class ConstantFoldingSuite extends OptimizerTest {\n \n     comparePlans(optimized, correctAnswer)\n   }\n+\n+  test(\"Constant folding test: expressions have null literals\") {\n+    val originalQuery =\n+      testRelation\n+        .select(\n+          IsNull(Literal(null)) as 'c1,\n+          IsNotNull(Literal(null)) as 'c2,\n+\n+          GetItem(Literal(null, ArrayType(IntegerType)), 1) as 'c3,\n+          GetItem(Literal(Seq(1), ArrayType(IntegerType)), Literal(null, IntegerType)) as 'c4,\n+          GetField(\n+            Literal(null, StructType(Seq(StructField(\"a\", IntegerType, true)))),\n+            \"a\") as 'c5,\n+\n+          UnaryMinus(Literal(null, IntegerType)) as 'c6,\n+          Cast(Literal(null), IntegerType) as 'c7,\n+          Not(Literal(null, BooleanType)) as 'c8,\n+\n+          Add(Literal(null, IntegerType), 1) as 'c9,","path":"sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ConstantFoldingSuite.scala","position":31,"original_position":31,"commit_id":"b2fce5923071f6002a9ae58cae09dfb84837d26f","original_commit_id":"b2fce5923071f6002a9ae58cae09dfb84837d26f","user":{"login":"marmbrus","id":527,"avatar_url":"https://avatars.githubusercontent.com/u/527?","gravatar_id":"6b296d9deae02902b9ab42d444a12d94","url":"https://api.github.com/users/marmbrus","html_url":"https://github.com/marmbrus","followers_url":"https://api.github.com/users/marmbrus/followers","following_url":"https://api.github.com/users/marmbrus/following{/other_user}","gists_url":"https://api.github.com/users/marmbrus/gists{/gist_id}","starred_url":"https://api.github.com/users/marmbrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmbrus/subscriptions","organizations_url":"https://api.github.com/users/marmbrus/orgs","repos_url":"https://api.github.com/users/marmbrus/repos","events_url":"https://api.github.com/users/marmbrus/events{/privacy}","received_events_url":"https://api.github.com/users/marmbrus/received_events","type":"User","site_admin":false},"body":"Same here and all the expression with more than one child.","created_at":"2014-06-11T05:19:37Z","updated_at":"2014-06-11T05:19:37Z","html_url":"https://github.com/apache/spark/pull/990#discussion_r13634226","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/990","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/13634226"},"html":{"href":"https://github.com/apache/spark/pull/990#discussion_r13634226"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/990"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/990","id":16804590,"html_url":"https://github.com/apache/spark/pull/990","diff_url":"https://github.com/apache/spark/pull/990.diff","patch_url":"https://github.com/apache/spark/pull/990.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/990","number":990,"state":"open","title":"[SPARK-2052] [SQL] Add optimization for CaseConversionExpression's.","user":{"login":"ueshin","id":506656,"avatar_url":"https://avatars.githubusercontent.com/u/506656?","gravatar_id":"8427671194d837e4bbe554ed0898e929","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},"body":"Add optimization for `CaseConversionExpression`'s.","created_at":"2014-06-06T04:57:44Z","updated_at":"2014-06-11T05:19:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea9930e68e9e7bb36a66e0614295da472e0efc30","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/990/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/990/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/spark/issues/990/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/b2fce5923071f6002a9ae58cae09dfb84837d26f","head":{"label":"ueshin:issues/SPARK-2052","ref":"issues/SPARK-2052","sha":"b2fce5923071f6002a9ae58cae09dfb84837d26f","user":{"login":"ueshin","id":506656,"avatar_url":"https://avatars.githubusercontent.com/u/506656?","gravatar_id":"8427671194d837e4bbe554ed0898e929","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},"repo":{"id":17234665,"name":"apache-spark","full_name":"ueshin/apache-spark","owner":{"login":"ueshin","id":506656,"avatar_url":"https://avatars.githubusercontent.com/u/506656?","gravatar_id":"8427671194d837e4bbe554ed0898e929","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},"private":false,"html_url":"https://github.com/ueshin/apache-spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/ueshin/apache-spark","forks_url":"https://api.github.com/repos/ueshin/apache-spark/forks","keys_url":"https://api.github.com/repos/ueshin/apache-spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ueshin/apache-spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ueshin/apache-spark/teams","hooks_url":"https://api.github.com/repos/ueshin/apache-spark/hooks","issue_events_url":"https://api.github.com/repos/ueshin/apache-spark/issues/events{/number}","events_url":"https://api.github.com/repos/ueshin/apache-spark/events","assignees_url":"https://api.github.com/repos/ueshin/apache-spark/assignees{/user}","branches_url":"https://api.github.com/repos/ueshin/apache-spark/branches{/branch}","tags_url":"https://api.github.com/repos/ueshin/apache-spark/tags","blobs_url":"https://api.github.com/repos/ueshin/apache-spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ueshin/apache-spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ueshin/apache-spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/ueshin/apache-spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ueshin/apache-spark/statuses/{sha}","languages_url":"https://api.github.com/repos/ueshin/apache-spark/languages","stargazers_url":"https://api.github.com/repos/ueshin/apache-spark/stargazers","contributors_url":"https://api.github.com/repos/ueshin/apache-spark/contributors","subscribers_url":"https://api.github.com/repos/ueshin/apache-spark/subscribers","subscription_url":"https://api.github.com/repos/ueshin/apache-spark/subscription","commits_url":"https://api.github.com/repos/ueshin/apache-spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/ueshin/apache-spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/ueshin/apache-spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/ueshin/apache-spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/ueshin/apache-spark/contents/{+path}","compare_url":"https://api.github.com/repos/ueshin/apache-spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ueshin/apache-spark/merges","archive_url":"https://api.github.com/repos/ueshin/apache-spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ueshin/apache-spark/downloads","issues_url":"https://api.github.com/repos/ueshin/apache-spark/issues{/number}","pulls_url":"https://api.github.com/repos/ueshin/apache-spark/pulls{/number}","milestones_url":"https://api.github.com/repos/ueshin/apache-spark/milestones{/number}","notifications_url":"https://api.github.com/repos/ueshin/apache-spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ueshin/apache-spark/labels{/name}","releases_url":"https://api.github.com/repos/ueshin/apache-spark/releases{/id}","created_at":"2014-02-27T03:10:47Z","updated_at":"2014-06-11T05:00:22Z","pushed_at":"2014-06-11T05:00:20Z","git_url":"git://github.com/ueshin/apache-spark.git","ssh_url":"git@github.com:ueshin/apache-spark.git","clone_url":"https://github.com/ueshin/apache-spark.git","svn_url":"https://github.com/ueshin/apache-spark","homepage":null,"size":72984,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"9bad0b73722fb359f14db864e69aa7efde3588c5","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2014-06-11T04:59:49Z","pushed_at":"2014-06-11T04:59:49Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1597597,"stargazers_count":595,"watchers_count":595,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":600,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":181,"forks":600,"open_issues":181,"watchers":595,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/990"},"html":{"href":"https://github.com/apache/spark/pull/990"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/990"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/990/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/990/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/990/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/b2fce5923071f6002a9ae58cae09dfb84837d26f"}}}}