GitHub PullRequestReviewCommentEvent at 2014-08-26 01:15:43
Repository: spark
Actor: marmbrus
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/16690992","id":16690992,"diff_hunk":"@@ -0,0 +1,78 @@\n+package org.apache.spark.sql.catalyst.expressions\n+\n+import org.apache.spark.sql.catalyst.types.{DoubleType, StringType, DataType}\n+import org.apache.spark.sql.catalyst.analysis.UnresolvedException\n+import scala.math.pow\n+\n+trait NumberConversionExpression {","path":"sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/numericOperations.scala","position":7,"original_position":7,"commit_id":"7570fa64b526f92240e6a8052cc74d00b97c6d09","original_commit_id":"7570fa64b526f92240e6a8052cc74d00b97c6d09","user":{"login":"marmbrus","id":527,"avatar_url":"https://avatars.githubusercontent.com/u/527?v=2","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":"Instead of creating another trait here, I think we should try an use the existing infrastructure based on Scala's `numeric` class.  I think for example that Abs's `eval` function could just be\r\n\r\n```scala\r\ndef eval(input: Row) = n1(child, input, _.abs(_))\r\n```","created_at":"2014-08-26T01:15:43Z","updated_at":"2014-08-26T01:15:43Z","html_url":"https://github.com/apache/spark/pull/2099#discussion_r16690992","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/2099","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/16690992"},"html":{"href":"https://github.com/apache/spark/pull/2099#discussion_r16690992"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/2099"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/2099","id":20188198,"html_url":"https://github.com/apache/spark/pull/2099","diff_url":"https://github.com/apache/spark/pull/2099.diff","patch_url":"https://github.com/apache/spark/pull/2099.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/2099","number":2099,"state":"open","locked":false,"title":"[SPARK-3176] Implement 'POWER', 'ABS and 'LAST' for sql","user":{"login":"xinyunh","id":3496637,"avatar_url":"https://avatars.githubusercontent.com/u/3496637?v=2","gravatar_id":"ef0778ac7a1f86a546cca295203ab21b","url":"https://api.github.com/users/xinyunh","html_url":"https://github.com/xinyunh","followers_url":"https://api.github.com/users/xinyunh/followers","following_url":"https://api.github.com/users/xinyunh/following{/other_user}","gists_url":"https://api.github.com/users/xinyunh/gists{/gist_id}","starred_url":"https://api.github.com/users/xinyunh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xinyunh/subscriptions","organizations_url":"https://api.github.com/users/xinyunh/orgs","repos_url":"https://api.github.com/users/xinyunh/repos","events_url":"https://api.github.com/users/xinyunh/events{/privacy}","received_events_url":"https://api.github.com/users/xinyunh/received_events","type":"User","site_admin":false},"body":"Add support for the mathematical function \"POWER\" and \"ABS\" and the analytic function \"last\" to return a subset of the rows satisfying a query within spark sql. Test-cases included.","created_at":"2014-08-22T18:20:30Z","updated_at":"2014-08-26T01:15:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b12c90e6b0bbfe35dc9913795070aa20617d7b4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/2099/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/2099/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/spark/issues/2099/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/7570fa64b526f92240e6a8052cc74d00b97c6d09","head":{"label":"Huawei-Spark:sqlTest","ref":"sqlTest","sha":"7570fa64b526f92240e6a8052cc74d00b97c6d09","user":{"login":"Huawei-Spark","id":8421689,"avatar_url":"https://avatars.githubusercontent.com/u/8421689?v=2","gravatar_id":null,"url":"https://api.github.com/users/Huawei-Spark","html_url":"https://github.com/Huawei-Spark","followers_url":"https://api.github.com/users/Huawei-Spark/followers","following_url":"https://api.github.com/users/Huawei-Spark/following{/other_user}","gists_url":"https://api.github.com/users/Huawei-Spark/gists{/gist_id}","starred_url":"https://api.github.com/users/Huawei-Spark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huawei-Spark/subscriptions","organizations_url":"https://api.github.com/users/Huawei-Spark/orgs","repos_url":"https://api.github.com/users/Huawei-Spark/repos","events_url":"https://api.github.com/users/Huawei-Spark/events{/privacy}","received_events_url":"https://api.github.com/users/Huawei-Spark/received_events","type":"Organization","site_admin":false},"repo":{"id":22938010,"name":"spark","full_name":"Huawei-Spark/spark","owner":{"login":"Huawei-Spark","id":8421689,"avatar_url":"https://avatars.githubusercontent.com/u/8421689?v=2","gravatar_id":null,"url":"https://api.github.com/users/Huawei-Spark","html_url":"https://github.com/Huawei-Spark","followers_url":"https://api.github.com/users/Huawei-Spark/followers","following_url":"https://api.github.com/users/Huawei-Spark/following{/other_user}","gists_url":"https://api.github.com/users/Huawei-Spark/gists{/gist_id}","starred_url":"https://api.github.com/users/Huawei-Spark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huawei-Spark/subscriptions","organizations_url":"https://api.github.com/users/Huawei-Spark/orgs","repos_url":"https://api.github.com/users/Huawei-Spark/repos","events_url":"https://api.github.com/users/Huawei-Spark/events{/privacy}","received_events_url":"https://api.github.com/users/Huawei-Spark/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Huawei-Spark/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/Huawei-Spark/spark","forks_url":"https://api.github.com/repos/Huawei-Spark/spark/forks","keys_url":"https://api.github.com/repos/Huawei-Spark/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Huawei-Spark/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Huawei-Spark/spark/teams","hooks_url":"https://api.github.com/repos/Huawei-Spark/spark/hooks","issue_events_url":"https://api.github.com/repos/Huawei-Spark/spark/issues/events{/number}","events_url":"https://api.github.com/repos/Huawei-Spark/spark/events","assignees_url":"https://api.github.com/repos/Huawei-Spark/spark/assignees{/user}","branches_url":"https://api.github.com/repos/Huawei-Spark/spark/branches{/branch}","tags_url":"https://api.github.com/repos/Huawei-Spark/spark/tags","blobs_url":"https://api.github.com/repos/Huawei-Spark/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Huawei-Spark/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Huawei-Spark/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/Huawei-Spark/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Huawei-Spark/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/Huawei-Spark/spark/languages","stargazers_url":"https://api.github.com/repos/Huawei-Spark/spark/stargazers","contributors_url":"https://api.github.com/repos/Huawei-Spark/spark/contributors","subscribers_url":"https://api.github.com/repos/Huawei-Spark/spark/subscribers","subscription_url":"https://api.github.com/repos/Huawei-Spark/spark/subscription","commits_url":"https://api.github.com/repos/Huawei-Spark/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/Huawei-Spark/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/Huawei-Spark/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/Huawei-Spark/spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/Huawei-Spark/spark/contents/{+path}","compare_url":"https://api.github.com/repos/Huawei-Spark/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Huawei-Spark/spark/merges","archive_url":"https://api.github.com/repos/Huawei-Spark/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Huawei-Spark/spark/downloads","issues_url":"https://api.github.com/repos/Huawei-Spark/spark/issues{/number}","pulls_url":"https://api.github.com/repos/Huawei-Spark/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/Huawei-Spark/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/Huawei-Spark/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Huawei-Spark/spark/labels{/name}","releases_url":"https://api.github.com/repos/Huawei-Spark/spark/releases{/id}","created_at":"2014-08-14T02:06:44Z","updated_at":"2014-08-14T23:26:45Z","pushed_at":"2014-08-25T17:00:01Z","git_url":"git://github.com/Huawei-Spark/spark.git","ssh_url":"git@github.com:Huawei-Spark/spark.git","clone_url":"https://github.com/Huawei-Spark/spark.git","svn_url":"https://github.com/Huawei-Spark/spark","homepage":null,"size":76458,"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":"220c2d7699a522c50d26cd6fdd94f4635823e408","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=2","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?v=2","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-08-25T23:59:42Z","pushed_at":"2014-08-26T00:47:36Z","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":2804044,"stargazers_count":1102,"watchers_count":1102,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1144,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":298,"forks":1144,"open_issues":298,"watchers":1102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/2099"},"html":{"href":"https://github.com/apache/spark/pull/2099"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/2099"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/2099/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/2099/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/2099/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/7570fa64b526f92240e6a8052cc74d00b97c6d09"}}}}