{"action":"opened","issue":{"url":"https://api.github.com/repos/s-u/RJDBC/issues/19","labels_url":"https://api.github.com/repos/s-u/RJDBC/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/s-u/RJDBC/issues/19/comments","events_url":"https://api.github.com/repos/s-u/RJDBC/issues/19/events","html_url":"https://github.com/s-u/RJDBC/issues/19","id":86664812,"number":19,"title":"type mapping when fetching results","user":{"login":"piccolbo","id":905563,"avatar_url":"https://avatars.githubusercontent.com/u/905563?v=3","gravatar_id":"","url":"https://api.github.com/users/piccolbo","html_url":"https://github.com/piccolbo","followers_url":"https://api.github.com/users/piccolbo/followers","following_url":"https://api.github.com/users/piccolbo/following{/other_user}","gists_url":"https://api.github.com/users/piccolbo/gists{/gist_id}","starred_url":"https://api.github.com/users/piccolbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piccolbo/subscriptions","organizations_url":"https://api.github.com/users/piccolbo/orgs","repos_url":"https://api.github.com/users/piccolbo/repos","events_url":"https://api.github.com/users/piccolbo/events{/privacy}","received_events_url":"https://api.github.com/users/piccolbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-09T16:55:28Z","updated_at":"2015-06-09T16:55:28Z","closed_at":null,"body":"Question: I was wondering why in class.R line 295 and following you map all the return codes from \r\n.jcall(res@md, \"I\", \"getColumnType\", i)\r\nto numeric() or character()\r\n\r\nI traced through it and I saw that 16 is boolean, 12 is character, 4 is integer, 91 is date. Of course that may be true only for the database I am dealing with (spark SQL) and I may not be appreciating the challenge of getting this mapping right across JDBC implementations, but for my application mapping database types to the \"closest\" possible class in R would be better, particularly logical, integer and Date. The only loss of type information loading into the database that I could see, for atomic types, is for factor. \r\n\r\n\r\nContext:\r\n I am developing a package on top of SparkSQL and one of the tests is that if I load a data frame into a table and then fetch the table back, I get the same data. Of course one would have to set some limits on the col types and col names to make this work, but the goal is to make the \"roundtrip\" work under the weakest assumptions possible. \r\n\r\nThanks"}}