{"action":"created","comment":{"url":"https://api.github.com/repos/apache/storm/pulls/comments/54837625","id":54837625,"diff_hunk":"@@ -83,4 +83,23 @@ SqlNode SqlCreateTable() :\n         input_format_class_name, output_format_class_name, location,\n         tbl_properties, select);\n     }\n+}\n+\n+/**\n+ * CREATE FUNCTION functionname AS 'classname'\n+ */\n+SqlNode SqlCreateFunction() :\n+{\n+    SqlParserPos pos;\n+    SqlIdentifier functionName;\n+    SqlNode className;\n+}\n+{\n+    <CREATE> { pos = getPos(); }\n+    <FUNCTION>\n+    functionName = CompoundIdentifier()\n+    <AS>\n+    className = StringLiteral() {","path":"external/sql/storm-sql-core/src/codegen/includes/parserImpls.ftl","position":20,"original_position":20,"commit_id":"0047279a71a98a4326c00929ca990e415d0fbce1","original_commit_id":"0047279a71a98a4326c00929ca990e415d0fbce1","user":{"login":"arunmahadevan","id":6792890,"avatar_url":"https://avatars.githubusercontent.com/u/6792890?v=3","gravatar_id":"","url":"https://api.github.com/users/arunmahadevan","html_url":"https://github.com/arunmahadevan","followers_url":"https://api.github.com/users/arunmahadevan/followers","following_url":"https://api.github.com/users/arunmahadevan/following{/other_user}","gists_url":"https://api.github.com/users/arunmahadevan/gists{/gist_id}","starred_url":"https://api.github.com/users/arunmahadevan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunmahadevan/subscriptions","organizations_url":"https://api.github.com/users/arunmahadevan/orgs","repos_url":"https://api.github.com/users/arunmahadevan/repos","events_url":"https://api.github.com/users/arunmahadevan/events{/privacy}","received_events_url":"https://api.github.com/users/arunmahadevan/received_events","type":"User","site_admin":false},"body":"The syntax closely follows the hive syntax for defining UDFs. Whats required is each UDF should map to a unique class with an `evaluate` method. Multiple such classes can be in the same jar and added to the classpath. (for storm, it could be placed under extlib directory). Will update the docs with this info.\r\n\r\nHive has an additional syntax to specify jar file in its DDL syntax which is not supported as of now.","created_at":"2016-03-03T05:30:05Z","updated_at":"2016-03-03T05:30:05Z","html_url":"https://github.com/apache/storm/pull/1169#discussion_r54837625","pull_request_url":"https://api.github.com/repos/apache/storm/pulls/1169","_links":{"self":{"href":"https://api.github.com/repos/apache/storm/pulls/comments/54837625"},"html":{"href":"https://github.com/apache/storm/pull/1169#discussion_r54837625"},"pull_request":{"href":"https://api.github.com/repos/apache/storm/pulls/1169"}}},"pull_request":{"url":"https://api.github.com/repos/apache/storm/pulls/1169","id":61208016,"html_url":"https://github.com/apache/storm/pull/1169","diff_url":"https://github.com/apache/storm/pull/1169.diff","patch_url":"https://github.com/apache/storm/pull/1169.patch","issue_url":"https://api.github.com/repos/apache/storm/issues/1169","number":1169,"state":"open","locked":false,"title":"[Storm-1585]  Add DDL support for UDFs in storm-sql","user":{"login":"arunmahadevan","id":6792890,"avatar_url":"https://avatars.githubusercontent.com/u/6792890?v=3","gravatar_id":"","url":"https://api.github.com/users/arunmahadevan","html_url":"https://github.com/arunmahadevan","followers_url":"https://api.github.com/users/arunmahadevan/followers","following_url":"https://api.github.com/users/arunmahadevan/following{/other_user}","gists_url":"https://api.github.com/users/arunmahadevan/gists{/gist_id}","starred_url":"https://api.github.com/users/arunmahadevan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunmahadevan/subscriptions","organizations_url":"https://api.github.com/users/arunmahadevan/orgs","repos_url":"https://api.github.com/users/arunmahadevan/repos","events_url":"https://api.github.com/users/arunmahadevan/events{/privacy}","received_events_url":"https://api.github.com/users/arunmahadevan/received_events","type":"User","site_admin":false},"body":"This patch proposes to expose the user defined function support added\r\nin STORM-1586 via DDL statements. \r\n\r\nNote: This includes changes from https://github.com/apache/storm/pull/1162","created_at":"2016-03-01T08:25:37Z","updated_at":"2016-03-03T05:30:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b54fda1d147c6f6596a6b30efd0d6128ef41ee2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/storm/pulls/1169/commits","review_comments_url":"https://api.github.com/repos/apache/storm/pulls/1169/comments","review_comment_url":"https://api.github.com/repos/apache/storm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/storm/issues/1169/comments","statuses_url":"https://api.github.com/repos/apache/storm/statuses/0047279a71a98a4326c00929ca990e415d0fbce1","head":{"label":"arunmahadevan:STORM-1585","ref":"STORM-1585","sha":"0047279a71a98a4326c00929ca990e415d0fbce1","user":{"login":"arunmahadevan","id":6792890,"avatar_url":"https://avatars.githubusercontent.com/u/6792890?v=3","gravatar_id":"","url":"https://api.github.com/users/arunmahadevan","html_url":"https://github.com/arunmahadevan","followers_url":"https://api.github.com/users/arunmahadevan/followers","following_url":"https://api.github.com/users/arunmahadevan/following{/other_user}","gists_url":"https://api.github.com/users/arunmahadevan/gists{/gist_id}","starred_url":"https://api.github.com/users/arunmahadevan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunmahadevan/subscriptions","organizations_url":"https://api.github.com/users/arunmahadevan/orgs","repos_url":"https://api.github.com/users/arunmahadevan/repos","events_url":"https://api.github.com/users/arunmahadevan/events{/privacy}","received_events_url":"https://api.github.com/users/arunmahadevan/received_events","type":"User","site_admin":false},"repo":{"id":38767161,"name":"storm","full_name":"arunmahadevan/storm","owner":{"login":"arunmahadevan","id":6792890,"avatar_url":"https://avatars.githubusercontent.com/u/6792890?v=3","gravatar_id":"","url":"https://api.github.com/users/arunmahadevan","html_url":"https://github.com/arunmahadevan","followers_url":"https://api.github.com/users/arunmahadevan/followers","following_url":"https://api.github.com/users/arunmahadevan/following{/other_user}","gists_url":"https://api.github.com/users/arunmahadevan/gists{/gist_id}","starred_url":"https://api.github.com/users/arunmahadevan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunmahadevan/subscriptions","organizations_url":"https://api.github.com/users/arunmahadevan/orgs","repos_url":"https://api.github.com/users/arunmahadevan/repos","events_url":"https://api.github.com/users/arunmahadevan/events{/privacy}","received_events_url":"https://api.github.com/users/arunmahadevan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arunmahadevan/storm","description":"Mirror of Apache Storm","fork":true,"url":"https://api.github.com/repos/arunmahadevan/storm","forks_url":"https://api.github.com/repos/arunmahadevan/storm/forks","keys_url":"https://api.github.com/repos/arunmahadevan/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arunmahadevan/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arunmahadevan/storm/teams","hooks_url":"https://api.github.com/repos/arunmahadevan/storm/hooks","issue_events_url":"https://api.github.com/repos/arunmahadevan/storm/issues/events{/number}","events_url":"https://api.github.com/repos/arunmahadevan/storm/events","assignees_url":"https://api.github.com/repos/arunmahadevan/storm/assignees{/user}","branches_url":"https://api.github.com/repos/arunmahadevan/storm/branches{/branch}","tags_url":"https://api.github.com/repos/arunmahadevan/storm/tags","blobs_url":"https://api.github.com/repos/arunmahadevan/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arunmahadevan/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arunmahadevan/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/arunmahadevan/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arunmahadevan/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/arunmahadevan/storm/languages","stargazers_url":"https://api.github.com/repos/arunmahadevan/storm/stargazers","contributors_url":"https://api.github.com/repos/arunmahadevan/storm/contributors","subscribers_url":"https://api.github.com/repos/arunmahadevan/storm/subscribers","subscription_url":"https://api.github.com/repos/arunmahadevan/storm/subscription","commits_url":"https://api.github.com/repos/arunmahadevan/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/arunmahadevan/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/arunmahadevan/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/arunmahadevan/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/arunmahadevan/storm/contents/{+path}","compare_url":"https://api.github.com/repos/arunmahadevan/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arunmahadevan/storm/merges","archive_url":"https://api.github.com/repos/arunmahadevan/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arunmahadevan/storm/downloads","issues_url":"https://api.github.com/repos/arunmahadevan/storm/issues{/number}","pulls_url":"https://api.github.com/repos/arunmahadevan/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/arunmahadevan/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/arunmahadevan/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arunmahadevan/storm/labels{/name}","releases_url":"https://api.github.com/repos/arunmahadevan/storm/releases{/id}","deployments_url":"https://api.github.com/repos/arunmahadevan/storm/deployments","created_at":"2015-07-08T16:48:04Z","updated_at":"2015-07-08T16:48:07Z","pushed_at":"2016-03-01T08:28:29Z","git_url":"git://github.com/arunmahadevan/storm.git","ssh_url":"git@github.com:arunmahadevan/storm.git","clone_url":"https://github.com/arunmahadevan/storm.git","svn_url":"https://github.com/arunmahadevan/storm","homepage":null,"size":100858,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":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":"87e3c246762b56ee8fd638662a9776fdf36c8ef5","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","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":14135470,"name":"storm","full_name":"apache/storm","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","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/storm","description":"Mirror of Apache Storm","fork":false,"url":"https://api.github.com/repos/apache/storm","forks_url":"https://api.github.com/repos/apache/storm/forks","keys_url":"https://api.github.com/repos/apache/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/storm/teams","hooks_url":"https://api.github.com/repos/apache/storm/hooks","issue_events_url":"https://api.github.com/repos/apache/storm/issues/events{/number}","events_url":"https://api.github.com/repos/apache/storm/events","assignees_url":"https://api.github.com/repos/apache/storm/assignees{/user}","branches_url":"https://api.github.com/repos/apache/storm/branches{/branch}","tags_url":"https://api.github.com/repos/apache/storm/tags","blobs_url":"https://api.github.com/repos/apache/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/storm/languages","stargazers_url":"https://api.github.com/repos/apache/storm/stargazers","contributors_url":"https://api.github.com/repos/apache/storm/contributors","subscribers_url":"https://api.github.com/repos/apache/storm/subscribers","subscription_url":"https://api.github.com/repos/apache/storm/subscription","commits_url":"https://api.github.com/repos/apache/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/storm/contents/{+path}","compare_url":"https://api.github.com/repos/apache/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/storm/merges","archive_url":"https://api.github.com/repos/apache/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/storm/downloads","issues_url":"https://api.github.com/repos/apache/storm/issues{/number}","pulls_url":"https://api.github.com/repos/apache/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/storm/labels{/name}","releases_url":"https://api.github.com/repos/apache/storm/releases{/id}","deployments_url":"https://api.github.com/repos/apache/storm/deployments","created_at":"2013-11-05T08:00:14Z","updated_at":"2016-03-03T03:17:21Z","pushed_at":"2016-03-03T02:22:03Z","git_url":"git://github.com/apache/storm.git","ssh_url":"git@github.com:apache/storm.git","clone_url":"https://github.com/apache/storm.git","svn_url":"https://github.com/apache/storm","homepage":null,"size":158973,"stargazers_count":2902,"watchers_count":2902,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2174,"mirror_url":"git://git.apache.org/storm.git","open_issues_count":95,"forks":2174,"open_issues":95,"watchers":2902,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/storm/pulls/1169"},"html":{"href":"https://github.com/apache/storm/pull/1169"},"issue":{"href":"https://api.github.com/repos/apache/storm/issues/1169"},"comments":{"href":"https://api.github.com/repos/apache/storm/issues/1169/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/storm/pulls/1169/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/storm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/storm/pulls/1169/commits"},"statuses":{"href":"https://api.github.com/repos/apache/storm/statuses/0047279a71a98a4326c00929ca990e415d0fbce1"}}}}