{"action":"created","comment":{"url":"https://api.github.com/repos/apache/drill/pulls/comments/237506645","pull_request_review_id":179781396,"id":237506645,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzUwNjY0NQ==","diff_hunk":"@@ -56,7 +57,7 @@ public DropTableHandler(SqlHandlerConfig config) {\n   @Override\n   public PhysicalPlan getPlan(SqlNode sqlNode) throws ValidationException, RelConversionException, IOException {\n     SqlDropTable dropTableNode = ((SqlDropTable) sqlNode);\n-    String originalTableName = dropTableNode.getName();\n+    String originalTableName = FileSelection.removeLeadingSlash(dropTableNode.getName());","path":"exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DropTableHandler.java","position":13,"original_position":13,"commit_id":"70ba699fe5d12453bd63bf9e12cdcdbde4c29ad2","original_commit_id":"b724b998fb02a7bd94b57e3a406636dfc21e1f2a","user":{"login":"KazydubB","id":38408110,"node_id":"MDQ6VXNlcjM4NDA4MTEw","avatar_url":"https://avatars3.githubusercontent.com/u/38408110?v=4","gravatar_id":"","url":"https://api.github.com/users/KazydubB","html_url":"https://github.com/KazydubB","followers_url":"https://api.github.com/users/KazydubB/followers","following_url":"https://api.github.com/users/KazydubB/following{/other_user}","gists_url":"https://api.github.com/users/KazydubB/gists{/gist_id}","starred_url":"https://api.github.com/users/KazydubB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazydubB/subscriptions","organizations_url":"https://api.github.com/users/KazydubB/orgs","repos_url":"https://api.github.com/users/KazydubB/repos","events_url":"https://api.github.com/users/KazydubB/events{/privacy}","received_events_url":"https://api.github.com/users/KazydubB/received_events","type":"User","site_admin":false},"body":"Actually, this may appear counter-intuitive for users especially when Drill supports `SELECT` with leading slash (see [DRILL-1130](https://issues.apache.org/jira/browse/DRILL-1130)). When a table is created and its name does start with '/' it will be created within workspace, i.e. will be rooted from the workspace.\r\nYou could think of it as if you performed `touch` (on Unix[-like] OS) to create a file: `touch /${filename}` and `touch ${filename}` should create a file in the same directory when working directory (workspace) is root ('/').","created_at":"2018-11-29T14:26:42Z","updated_at":"2018-11-29T14:42:20Z","html_url":"https://github.com/apache/drill/pull/1557#discussion_r237506645","pull_request_url":"https://api.github.com/repos/apache/drill/pulls/1557","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/drill/pulls/comments/237506645"},"html":{"href":"https://github.com/apache/drill/pull/1557#discussion_r237506645"},"pull_request":{"href":"https://api.github.com/repos/apache/drill/pulls/1557"}},"in_reply_to_id":237463961},"pull_request":{"url":"https://api.github.com/repos/apache/drill/pulls/1557","id":234350578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0MzUwNTc4","html_url":"https://github.com/apache/drill/pull/1557","diff_url":"https://github.com/apache/drill/pull/1557.diff","patch_url":"https://github.com/apache/drill/pull/1557.patch","issue_url":"https://api.github.com/repos/apache/drill/issues/1557","number":1557,"state":"open","locked":false,"title":"DRILL-6863: Drop table is not working if path within workspace starts…","user":{"login":"KazydubB","id":38408110,"node_id":"MDQ6VXNlcjM4NDA4MTEw","avatar_url":"https://avatars3.githubusercontent.com/u/38408110?v=4","gravatar_id":"","url":"https://api.github.com/users/KazydubB","html_url":"https://github.com/KazydubB","followers_url":"https://api.github.com/users/KazydubB/followers","following_url":"https://api.github.com/users/KazydubB/following{/other_user}","gists_url":"https://api.github.com/users/KazydubB/gists{/gist_id}","starred_url":"https://api.github.com/users/KazydubB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazydubB/subscriptions","organizations_url":"https://api.github.com/users/KazydubB/orgs","repos_url":"https://api.github.com/users/KazydubB/repos","events_url":"https://api.github.com/users/KazydubB/events{/privacy}","received_events_url":"https://api.github.com/users/KazydubB/received_events","type":"User","site_admin":false},"body":"… with \"/\"\r\n\r\n- Made workspace to be honored when table/view name starts with \"/\" for DROP TABLE, DROP VIEW, CREATE VIEW and SELECT from view queries;\r\n- Made \"/{name}\" and \"{name}\" to be equivalent names (the leading \"/\" is removed) when creating temporary tables so that `SELECT ... FROM \"/{name}\" ...` and `SELECT ... FROM \"{name}\" ...` produce the same results and behave as regular tables in the context.","created_at":"2018-11-28T16:51:25Z","updated_at":"2018-11-29T14:42:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f45a42a1ebf774b2e0da2a7b2b44fea6a03f6c67","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/drill/pulls/1557/commits","review_comments_url":"https://api.github.com/repos/apache/drill/pulls/1557/comments","review_comment_url":"https://api.github.com/repos/apache/drill/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/drill/issues/1557/comments","statuses_url":"https://api.github.com/repos/apache/drill/statuses/70ba699fe5d12453bd63bf9e12cdcdbde4c29ad2","head":{"label":"KazydubB:DRILL-6863","ref":"DRILL-6863","sha":"70ba699fe5d12453bd63bf9e12cdcdbde4c29ad2","user":{"login":"KazydubB","id":38408110,"node_id":"MDQ6VXNlcjM4NDA4MTEw","avatar_url":"https://avatars3.githubusercontent.com/u/38408110?v=4","gravatar_id":"","url":"https://api.github.com/users/KazydubB","html_url":"https://github.com/KazydubB","followers_url":"https://api.github.com/users/KazydubB/followers","following_url":"https://api.github.com/users/KazydubB/following{/other_user}","gists_url":"https://api.github.com/users/KazydubB/gists{/gist_id}","starred_url":"https://api.github.com/users/KazydubB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazydubB/subscriptions","organizations_url":"https://api.github.com/users/KazydubB/orgs","repos_url":"https://api.github.com/users/KazydubB/repos","events_url":"https://api.github.com/users/KazydubB/events{/privacy}","received_events_url":"https://api.github.com/users/KazydubB/received_events","type":"User","site_admin":false},"repo":{"id":132113415,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIxMTM0MTU=","name":"drill","full_name":"KazydubB/drill","private":false,"owner":{"login":"KazydubB","id":38408110,"node_id":"MDQ6VXNlcjM4NDA4MTEw","avatar_url":"https://avatars3.githubusercontent.com/u/38408110?v=4","gravatar_id":"","url":"https://api.github.com/users/KazydubB","html_url":"https://github.com/KazydubB","followers_url":"https://api.github.com/users/KazydubB/followers","following_url":"https://api.github.com/users/KazydubB/following{/other_user}","gists_url":"https://api.github.com/users/KazydubB/gists{/gist_id}","starred_url":"https://api.github.com/users/KazydubB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazydubB/subscriptions","organizations_url":"https://api.github.com/users/KazydubB/orgs","repos_url":"https://api.github.com/users/KazydubB/repos","events_url":"https://api.github.com/users/KazydubB/events{/privacy}","received_events_url":"https://api.github.com/users/KazydubB/received_events","type":"User","site_admin":false},"html_url":"https://github.com/KazydubB/drill","description":"Apache Drill","fork":true,"url":"https://api.github.com/repos/KazydubB/drill","forks_url":"https://api.github.com/repos/KazydubB/drill/forks","keys_url":"https://api.github.com/repos/KazydubB/drill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KazydubB/drill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KazydubB/drill/teams","hooks_url":"https://api.github.com/repos/KazydubB/drill/hooks","issue_events_url":"https://api.github.com/repos/KazydubB/drill/issues/events{/number}","events_url":"https://api.github.com/repos/KazydubB/drill/events","assignees_url":"https://api.github.com/repos/KazydubB/drill/assignees{/user}","branches_url":"https://api.github.com/repos/KazydubB/drill/branches{/branch}","tags_url":"https://api.github.com/repos/KazydubB/drill/tags","blobs_url":"https://api.github.com/repos/KazydubB/drill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KazydubB/drill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KazydubB/drill/git/refs{/sha}","trees_url":"https://api.github.com/repos/KazydubB/drill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KazydubB/drill/statuses/{sha}","languages_url":"https://api.github.com/repos/KazydubB/drill/languages","stargazers_url":"https://api.github.com/repos/KazydubB/drill/stargazers","contributors_url":"https://api.github.com/repos/KazydubB/drill/contributors","subscribers_url":"https://api.github.com/repos/KazydubB/drill/subscribers","subscription_url":"https://api.github.com/repos/KazydubB/drill/subscription","commits_url":"https://api.github.com/repos/KazydubB/drill/commits{/sha}","git_commits_url":"https://api.github.com/repos/KazydubB/drill/git/commits{/sha}","comments_url":"https://api.github.com/repos/KazydubB/drill/comments{/number}","issue_comment_url":"https://api.github.com/repos/KazydubB/drill/issues/comments{/number}","contents_url":"https://api.github.com/repos/KazydubB/drill/contents/{+path}","compare_url":"https://api.github.com/repos/KazydubB/drill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KazydubB/drill/merges","archive_url":"https://api.github.com/repos/KazydubB/drill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KazydubB/drill/downloads","issues_url":"https://api.github.com/repos/KazydubB/drill/issues{/number}","pulls_url":"https://api.github.com/repos/KazydubB/drill/pulls{/number}","milestones_url":"https://api.github.com/repos/KazydubB/drill/milestones{/number}","notifications_url":"https://api.github.com/repos/KazydubB/drill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KazydubB/drill/labels{/name}","releases_url":"https://api.github.com/repos/KazydubB/drill/releases{/id}","deployments_url":"https://api.github.com/repos/KazydubB/drill/deployments","created_at":"2018-05-04T08:41:18Z","updated_at":"2018-10-23T08:48:16Z","pushed_at":"2018-11-29T14:41:08Z","git_url":"git://github.com/KazydubB/drill.git","ssh_url":"git@github.com:KazydubB/drill.git","clone_url":"https://github.com/KazydubB/drill.git","svn_url":"https://github.com/KazydubB/drill","homepage":"","size":65630,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"596227bbbecfb19bdb55dd8ea58159890f83bc9c","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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":5683653,"node_id":"MDEwOlJlcG9zaXRvcnk1NjgzNjUz","name":"drill","full_name":"apache/drill","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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},"html_url":"https://github.com/apache/drill","description":"Apache Drill","fork":false,"url":"https://api.github.com/repos/apache/drill","forks_url":"https://api.github.com/repos/apache/drill/forks","keys_url":"https://api.github.com/repos/apache/drill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/drill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/drill/teams","hooks_url":"https://api.github.com/repos/apache/drill/hooks","issue_events_url":"https://api.github.com/repos/apache/drill/issues/events{/number}","events_url":"https://api.github.com/repos/apache/drill/events","assignees_url":"https://api.github.com/repos/apache/drill/assignees{/user}","branches_url":"https://api.github.com/repos/apache/drill/branches{/branch}","tags_url":"https://api.github.com/repos/apache/drill/tags","blobs_url":"https://api.github.com/repos/apache/drill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/drill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/drill/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/drill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/drill/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/drill/languages","stargazers_url":"https://api.github.com/repos/apache/drill/stargazers","contributors_url":"https://api.github.com/repos/apache/drill/contributors","subscribers_url":"https://api.github.com/repos/apache/drill/subscribers","subscription_url":"https://api.github.com/repos/apache/drill/subscription","commits_url":"https://api.github.com/repos/apache/drill/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/drill/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/drill/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/drill/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/drill/contents/{+path}","compare_url":"https://api.github.com/repos/apache/drill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/drill/merges","archive_url":"https://api.github.com/repos/apache/drill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/drill/downloads","issues_url":"https://api.github.com/repos/apache/drill/issues{/number}","pulls_url":"https://api.github.com/repos/apache/drill/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/drill/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/drill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/drill/labels{/name}","releases_url":"https://api.github.com/repos/apache/drill/releases{/id}","deployments_url":"https://api.github.com/repos/apache/drill/deployments","created_at":"2012-09-05T07:00:26Z","updated_at":"2018-11-29T13:29:11Z","pushed_at":"2018-11-29T14:41:11Z","git_url":"git://github.com/apache/drill.git","ssh_url":"git@github.com:apache/drill.git","clone_url":"https://github.com/apache/drill.git","svn_url":"https://github.com/apache/drill","homepage":"","size":70864,"stargazers_count":1063,"watchers_count":1063,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":705,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":705,"open_issues":83,"watchers":1063,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/drill/pulls/1557"},"html":{"href":"https://github.com/apache/drill/pull/1557"},"issue":{"href":"https://api.github.com/repos/apache/drill/issues/1557"},"comments":{"href":"https://api.github.com/repos/apache/drill/issues/1557/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/drill/pulls/1557/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/drill/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/drill/pulls/1557/commits"},"statuses":{"href":"https://api.github.com/repos/apache/drill/statuses/70ba699fe5d12453bd63bf9e12cdcdbde4c29ad2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"KazydubB"}}