{"action":"created","issue":{"url":"https://api.github.com/repos/prestodb/presto/issues/4797","repository_url":"https://api.github.com/repos/prestodb/presto","labels_url":"https://api.github.com/repos/prestodb/presto/issues/4797/labels{/name}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/4797/comments","events_url":"https://api.github.com/repos/prestodb/presto/issues/4797/events","html_url":"https://github.com/prestodb/presto/issues/4797","id":141297290,"number":4797,"title":"JDBC driver connection.getMetaData().getColumns(...) returns unexpected values","user":{"login":"brian-rickman","id":12533044,"avatar_url":"https://avatars.githubusercontent.com/u/12533044?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-rickman","html_url":"https://github.com/brian-rickman","followers_url":"https://api.github.com/users/brian-rickman/followers","following_url":"https://api.github.com/users/brian-rickman/following{/other_user}","gists_url":"https://api.github.com/users/brian-rickman/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-rickman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-rickman/subscriptions","organizations_url":"https://api.github.com/users/brian-rickman/orgs","repos_url":"https://api.github.com/users/brian-rickman/repos","events_url":"https://api.github.com/users/brian-rickman/events{/privacy}","received_events_url":"https://api.github.com/users/brian-rickman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-03-16T14:50:02Z","updated_at":"2016-09-09T14:28:25Z","closed_at":"2016-09-09T14:28:25Z","body":"I ran across this while comparing the output from Simba's implementation of a JDBC driver for Presto to that of the open source driver.  Having consulted the JDBC documentation and Simba, I believe the open source driver is returning the wrong value for the following output columns: `type number`, `size`, `buffer length`, `decimal digits`, `nullable`, `is nullable`.\r\n\r\nThe Java code executed was: `connection.getMetaData().getColumns(\"hive\", \"default\", \"nation\", null)`\r\n\r\n## Here are the values the open source driver returns:\r\nColumn name (1) | type number (5) | size (7) | buffer length (8)| decimal digits (9) | nullable (11) | is nullable (18)\r\n------------------- | ---------------- | ------ | ---------------- | ------------------ | ---------- | -------------- \r\nn_nationkey    | -5                 | 0      | 0                  | 19                   | 2           |\r\nn_name          | -16               | 0      | 0                  |                        | 2           |\r\nn_regionkey   | -5                 | 0      | 0                  | 19                   | 2           |\r\nn_comment    | -16               | 0      | 0                  |                        | 2           |\r\n\r\n## Here are the values that I believe are correct:\r\nColumn name (1) | type number (5) | size (7) | buffer length (8)| decimal digits (9) | nullable (11) | is nullable (18)\r\n------------------- | ---------------- | ------ | ---------------- | ------------------ | ---------- | -------------- \r\nn_nationkey    | -5                 | 19    | 20                 | 0                   | 1           | YES\r\nn_name          | 12               | 2048 | 2048             |                       | 1           | YES\r\nn_regionkey   | -5                 | 19    | 20                 | 0                    | 1           | YES\r\nn_comment    | 12               | 2048 | 2048             |                       | 1           | YES\r\n\r\n## This is my test table:\r\n    presto:default> describe hive.default.nation;\r\n       Column    |  Type   | Comment\r\n    -------------+---------+---------\r\n    n_nationkey | bigint  |\r\n    n_name      | varchar |\r\n    n_regionkey | bigint  |\r\n    n_comment   | varchar |\r\n    (4 rows)\r\n"},"comment":{"url":"https://api.github.com/repos/prestodb/presto/issues/comments/245929598","html_url":"https://github.com/prestodb/presto/issues/4797#issuecomment-245929598","issue_url":"https://api.github.com/repos/prestodb/presto/issues/4797","id":245929598,"user":{"login":"brian-rickman","id":12533044,"avatar_url":"https://avatars.githubusercontent.com/u/12533044?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-rickman","html_url":"https://github.com/brian-rickman","followers_url":"https://api.github.com/users/brian-rickman/followers","following_url":"https://api.github.com/users/brian-rickman/following{/other_user}","gists_url":"https://api.github.com/users/brian-rickman/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-rickman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-rickman/subscriptions","organizations_url":"https://api.github.com/users/brian-rickman/orgs","repos_url":"https://api.github.com/users/brian-rickman/repos","events_url":"https://api.github.com/users/brian-rickman/events{/privacy}","received_events_url":"https://api.github.com/users/brian-rickman/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T14:28:25Z","updated_at":"2016-09-09T14:28:25Z","body":"@cawallin I agree that PR covers it."}}
{"actor":{"display_login":"brian-rickman"}}