{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/22794","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/22794/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/22794/comments","events_url":"https://api.github.com/repos/apache/spark/issues/22794/events","html_url":"https://github.com/apache/spark/pull/22794","id":372455819,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NjMxODky","number":22794,"title":"[SPARK-24570][SQL] Implement Spark own GetTablesOperation to fix SQL client tools cannot show tables","user":{"login":"wangyum","id":5399861,"node_id":"MDQ6VXNlcjUzOTk4NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/5399861?v=4","gravatar_id":"","url":"https://api.github.com/users/wangyum","html_url":"https://github.com/wangyum","followers_url":"https://api.github.com/users/wangyum/followers","following_url":"https://api.github.com/users/wangyum/following{/other_user}","gists_url":"https://api.github.com/users/wangyum/gists{/gist_id}","starred_url":"https://api.github.com/users/wangyum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangyum/subscriptions","organizations_url":"https://api.github.com/users/wangyum/orgs","repos_url":"https://api.github.com/users/wangyum/repos","events_url":"https://api.github.com/users/wangyum/events{/privacy}","received_events_url":"https://api.github.com/users/wangyum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-22T09:45:33Z","updated_at":"2018-10-25T11:37:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22794","html_url":"https://github.com/apache/spark/pull/22794","diff_url":"https://github.com/apache/spark/pull/22794.diff","patch_url":"https://github.com/apache/spark/pull/22794.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nFor SQL client tools([DBeaver](https://dbeaver.io/))'s Navigator use [`GetTablesOperation`](https://github.com/apache/spark/blob/a7444570764b0a08b7e908dc7931744f9dbdf3c6/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java) to obtain table names.\r\n\r\nWe should use [`metadataHive`](https://github.com/apache/spark/blob/95d172da2b370ff6257bfd6fcd102ac553f6f6af/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala#L52-L53), but it use [`executionHive`](https://github.com/apache/spark/blob/24f5bbd770033dacdea62555488bfffb61665279/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala#L93-L95). \r\n\r\nThis PR implement Spark own `GetTablesOperation` to use `metadataHive`.\r\n\r\n## How was this patch tested?\r\n\r\nunit test and manual tests\r\n\r\n![image](https://user-images.githubusercontent.com/5399861/47430696-acf77980-d7cc-11e8-824d-f28d78f60a00.png)\r\n![image](https://user-images.githubusercontent.com/5399861/47440576-09649400-d7e1-11e8-97a8-a96f73f70361.png)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/433017377","html_url":"https://github.com/apache/spark/pull/22794#issuecomment-433017377","issue_url":"https://api.github.com/repos/apache/spark/issues/22794","id":433017377,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzAxNzM3Nw==","user":{"login":"mgaido91","id":8821783,"node_id":"MDQ6VXNlcjg4MjE3ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/8821783?v=4","gravatar_id":"","url":"https://api.github.com/users/mgaido91","html_url":"https://github.com/mgaido91","followers_url":"https://api.github.com/users/mgaido91/followers","following_url":"https://api.github.com/users/mgaido91/following{/other_user}","gists_url":"https://api.github.com/users/mgaido91/gists{/gist_id}","starred_url":"https://api.github.com/users/mgaido91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgaido91/subscriptions","organizations_url":"https://api.github.com/users/mgaido91/orgs","repos_url":"https://api.github.com/users/mgaido91/repos","events_url":"https://api.github.com/users/mgaido91/events{/privacy}","received_events_url":"https://api.github.com/users/mgaido91/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T11:37:48Z","updated_at":"2018-10-25T11:37:48Z","author_association":"CONTRIBUTOR","body":"@wangyum the point is that what I meant in the previous comment is that the current approach is not good IMHO. Now you fixed it for the tables, but the same is true for functions: currently you'd be returning Hive's functions, not Spark's right? You should override all of them IMHO..."}}
{"actor":{"display_login":"mgaido91"}}