{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/presto/pulls/comments/56119543","id":56119543,"diff_hunk":"@@ -742,6 +743,25 @@ protected Type visitFunctionCall(FunctionCall node, StackableAstVisitorContext<A\n         }\n \n         @Override\n+        protected Type visitAtTimeZone(AtTimeZone node, StackableAstVisitorContext<AnalysisContext> context)\n+        {\n+            Type valueType = process(node.getValueExpression(), context);\n+            process(node.getTimeZoneSpecifier(), context);\n+            if (!valueType.equals(TIME_WITH_TIME_ZONE) && !valueType.equals(TIMESTAMP_WITH_TIME_ZONE)) {\n+                throw new SemanticException(TYPE_MISMATCH, node.getValueExpression(), \"Type of value must be TIME_WITH_TIME_ZONE or TIMESTAMP_WITH_TIME_ZONE (actual %s)\", valueType);\n+            }\n+            Expression timeZoneSpecifier = node.getTimeZoneSpecifier();\n+            if (!(timeZoneSpecifier instanceof IntervalLiteral) && !(timeZoneSpecifier instanceof StringLiteral)) {\n+                throw new SemanticException(TYPE_MISMATCH, node.getValueExpression(), \"Timezone specifier must be INTERVAL or STRING (actual %s)\", timeZoneSpecifier.getClass());","path":"presto-main/src/main/java/com/facebook/presto/sql/analyzer/ExpressionAnalyzer.java","position":21,"original_position":21,"commit_id":"7f223e05f014dbb1bd1358694fca8bbc5954c041","original_commit_id":"7f223e05f014dbb1bd1358694fca8bbc5954c041","user":{"login":"erichwang","id":737851,"avatar_url":"https://avatars.githubusercontent.com/u/737851?v=3","gravatar_id":"","url":"https://api.github.com/users/erichwang","html_url":"https://github.com/erichwang","followers_url":"https://api.github.com/users/erichwang/followers","following_url":"https://api.github.com/users/erichwang/following{/other_user}","gists_url":"https://api.github.com/users/erichwang/gists{/gist_id}","starred_url":"https://api.github.com/users/erichwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichwang/subscriptions","organizations_url":"https://api.github.com/users/erichwang/orgs","repos_url":"https://api.github.com/users/erichwang/repos","events_url":"https://api.github.com/users/erichwang/events{/privacy}","received_events_url":"https://api.github.com/users/erichwang/received_events","type":"User","site_admin":false},"body":"STRING => VARCHAR","created_at":"2016-03-15T06:20:54Z","updated_at":"2016-03-15T06:20:54Z","html_url":"https://github.com/facebook/presto/pull/4737#discussion_r56119543","pull_request_url":"https://api.github.com/repos/facebook/presto/pulls/4737","_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments/56119543"},"html":{"href":"https://github.com/facebook/presto/pull/4737#discussion_r56119543"},"pull_request":{"href":"https://api.github.com/repos/facebook/presto/pulls/4737"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/presto/pulls/4737","id":62120704,"html_url":"https://github.com/facebook/presto/pull/4737","diff_url":"https://github.com/facebook/presto/pull/4737.diff","patch_url":"https://github.com/facebook/presto/pull/4737.patch","issue_url":"https://api.github.com/repos/facebook/presto/issues/4737","number":4737,"state":"open","locked":false,"title":"Create AST node to represent AT TIME ZONE expressions","user":{"login":"geraint0923","id":923382,"avatar_url":"https://avatars.githubusercontent.com/u/923382?v=3","gravatar_id":"","url":"https://api.github.com/users/geraint0923","html_url":"https://github.com/geraint0923","followers_url":"https://api.github.com/users/geraint0923/followers","following_url":"https://api.github.com/users/geraint0923/following{/other_user}","gists_url":"https://api.github.com/users/geraint0923/gists{/gist_id}","starred_url":"https://api.github.com/users/geraint0923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geraint0923/subscriptions","organizations_url":"https://api.github.com/users/geraint0923/orgs","repos_url":"https://api.github.com/users/geraint0923/repos","events_url":"https://api.github.com/users/geraint0923/events{/privacy}","received_events_url":"https://api.github.com/users/geraint0923/received_events","type":"User","site_admin":false},"body":"Address #4289 ","created_at":"2016-03-08T19:16:11Z","updated_at":"2016-03-15T06:20:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba46ad8c764c4894979cf6fb3c01954de03aeed8","assignee":{"login":"erichwang","id":737851,"avatar_url":"https://avatars.githubusercontent.com/u/737851?v=3","gravatar_id":"","url":"https://api.github.com/users/erichwang","html_url":"https://github.com/erichwang","followers_url":"https://api.github.com/users/erichwang/followers","following_url":"https://api.github.com/users/erichwang/following{/other_user}","gists_url":"https://api.github.com/users/erichwang/gists{/gist_id}","starred_url":"https://api.github.com/users/erichwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichwang/subscriptions","organizations_url":"https://api.github.com/users/erichwang/orgs","repos_url":"https://api.github.com/users/erichwang/repos","events_url":"https://api.github.com/users/erichwang/events{/privacy}","received_events_url":"https://api.github.com/users/erichwang/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/facebook/presto/pulls/4737/commits","review_comments_url":"https://api.github.com/repos/facebook/presto/pulls/4737/comments","review_comment_url":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/presto/issues/4737/comments","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/7f223e05f014dbb1bd1358694fca8bbc5954c041","head":{"label":"geraint0923:ast_timezone","ref":"ast_timezone","sha":"7f223e05f014dbb1bd1358694fca8bbc5954c041","user":{"login":"geraint0923","id":923382,"avatar_url":"https://avatars.githubusercontent.com/u/923382?v=3","gravatar_id":"","url":"https://api.github.com/users/geraint0923","html_url":"https://github.com/geraint0923","followers_url":"https://api.github.com/users/geraint0923/followers","following_url":"https://api.github.com/users/geraint0923/following{/other_user}","gists_url":"https://api.github.com/users/geraint0923/gists{/gist_id}","starred_url":"https://api.github.com/users/geraint0923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geraint0923/subscriptions","organizations_url":"https://api.github.com/users/geraint0923/orgs","repos_url":"https://api.github.com/users/geraint0923/repos","events_url":"https://api.github.com/users/geraint0923/events{/privacy}","received_events_url":"https://api.github.com/users/geraint0923/received_events","type":"User","site_admin":false},"repo":{"id":52384465,"name":"presto","full_name":"geraint0923/presto","owner":{"login":"geraint0923","id":923382,"avatar_url":"https://avatars.githubusercontent.com/u/923382?v=3","gravatar_id":"","url":"https://api.github.com/users/geraint0923","html_url":"https://github.com/geraint0923","followers_url":"https://api.github.com/users/geraint0923/followers","following_url":"https://api.github.com/users/geraint0923/following{/other_user}","gists_url":"https://api.github.com/users/geraint0923/gists{/gist_id}","starred_url":"https://api.github.com/users/geraint0923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geraint0923/subscriptions","organizations_url":"https://api.github.com/users/geraint0923/orgs","repos_url":"https://api.github.com/users/geraint0923/repos","events_url":"https://api.github.com/users/geraint0923/events{/privacy}","received_events_url":"https://api.github.com/users/geraint0923/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geraint0923/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":true,"url":"https://api.github.com/repos/geraint0923/presto","forks_url":"https://api.github.com/repos/geraint0923/presto/forks","keys_url":"https://api.github.com/repos/geraint0923/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geraint0923/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geraint0923/presto/teams","hooks_url":"https://api.github.com/repos/geraint0923/presto/hooks","issue_events_url":"https://api.github.com/repos/geraint0923/presto/issues/events{/number}","events_url":"https://api.github.com/repos/geraint0923/presto/events","assignees_url":"https://api.github.com/repos/geraint0923/presto/assignees{/user}","branches_url":"https://api.github.com/repos/geraint0923/presto/branches{/branch}","tags_url":"https://api.github.com/repos/geraint0923/presto/tags","blobs_url":"https://api.github.com/repos/geraint0923/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geraint0923/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geraint0923/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/geraint0923/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geraint0923/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/geraint0923/presto/languages","stargazers_url":"https://api.github.com/repos/geraint0923/presto/stargazers","contributors_url":"https://api.github.com/repos/geraint0923/presto/contributors","subscribers_url":"https://api.github.com/repos/geraint0923/presto/subscribers","subscription_url":"https://api.github.com/repos/geraint0923/presto/subscription","commits_url":"https://api.github.com/repos/geraint0923/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/geraint0923/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/geraint0923/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/geraint0923/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/geraint0923/presto/contents/{+path}","compare_url":"https://api.github.com/repos/geraint0923/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geraint0923/presto/merges","archive_url":"https://api.github.com/repos/geraint0923/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geraint0923/presto/downloads","issues_url":"https://api.github.com/repos/geraint0923/presto/issues{/number}","pulls_url":"https://api.github.com/repos/geraint0923/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/geraint0923/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/geraint0923/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geraint0923/presto/labels{/name}","releases_url":"https://api.github.com/repos/geraint0923/presto/releases{/id}","deployments_url":"https://api.github.com/repos/geraint0923/presto/deployments","created_at":"2016-02-23T19:10:55Z","updated_at":"2016-02-23T19:11:06Z","pushed_at":"2016-03-15T04:44:59Z","git_url":"git://github.com/geraint0923/presto.git","ssh_url":"git@github.com:geraint0923/presto.git","clone_url":"https://github.com/geraint0923/presto.git","svn_url":"https://github.com/geraint0923/presto","homepage":"https://prestodb.io","size":59779,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"facebook:master","ref":"master","sha":"6f01e25741503dccf040a987f5dfdc807179341d","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"facebook/presto","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":false,"url":"https://api.github.com/repos/facebook/presto","forks_url":"https://api.github.com/repos/facebook/presto/forks","keys_url":"https://api.github.com/repos/facebook/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/presto/teams","hooks_url":"https://api.github.com/repos/facebook/presto/hooks","issue_events_url":"https://api.github.com/repos/facebook/presto/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/presto/events","assignees_url":"https://api.github.com/repos/facebook/presto/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/presto/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/presto/tags","blobs_url":"https://api.github.com/repos/facebook/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/presto/languages","stargazers_url":"https://api.github.com/repos/facebook/presto/stargazers","contributors_url":"https://api.github.com/repos/facebook/presto/contributors","subscribers_url":"https://api.github.com/repos/facebook/presto/subscribers","subscription_url":"https://api.github.com/repos/facebook/presto/subscription","commits_url":"https://api.github.com/repos/facebook/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/presto/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/presto/merges","archive_url":"https://api.github.com/repos/facebook/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/presto/downloads","issues_url":"https://api.github.com/repos/facebook/presto/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/presto/labels{/name}","releases_url":"https://api.github.com/repos/facebook/presto/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2016-03-15T04:31:47Z","pushed_at":"2016-03-15T04:45:01Z","git_url":"git://github.com/facebook/presto.git","ssh_url":"git@github.com:facebook/presto.git","clone_url":"https://github.com/facebook/presto.git","svn_url":"https://github.com/facebook/presto","homepage":"https://prestodb.io","size":112269,"stargazers_count":4566,"watchers_count":4566,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1299,"mirror_url":null,"open_issues_count":528,"forks":1299,"open_issues":528,"watchers":4566,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/4737"},"html":{"href":"https://github.com/facebook/presto/pull/4737"},"issue":{"href":"https://api.github.com/repos/facebook/presto/issues/4737"},"comments":{"href":"https://api.github.com/repos/facebook/presto/issues/4737/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/presto/pulls/4737/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/presto/pulls/4737/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/presto/statuses/7f223e05f014dbb1bd1358694fca8bbc5954c041"}}}}