{"action":"created","issue":{"url":"https://api.github.com/repos/prestodb/presto/issues/5786","repository_url":"https://api.github.com/repos/prestodb/presto","labels_url":"https://api.github.com/repos/prestodb/presto/issues/5786/labels{/name}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/5786/comments","events_url":"https://api.github.com/repos/prestodb/presto/issues/5786/events","html_url":"https://github.com/prestodb/presto/pull/5786","id":169129767,"number":5786,"title":"Vatchar tests unicode + test utils","user":{"login":"ArturGajowy","id":460141,"avatar_url":"https://avatars.githubusercontent.com/u/460141?v=3","gravatar_id":"","url":"https://api.github.com/users/ArturGajowy","html_url":"https://github.com/ArturGajowy","followers_url":"https://api.github.com/users/ArturGajowy/followers","following_url":"https://api.github.com/users/ArturGajowy/following{/other_user}","gists_url":"https://api.github.com/users/ArturGajowy/gists{/gist_id}","starred_url":"https://api.github.com/users/ArturGajowy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArturGajowy/subscriptions","organizations_url":"https://api.github.com/users/ArturGajowy/orgs","repos_url":"https://api.github.com/users/ArturGajowy/repos","events_url":"https://api.github.com/users/ArturGajowy/events{/privacy}","received_events_url":"https://api.github.com/users/ArturGajowy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/prestodb/presto/labels/CLA%20Signed","name":"CLA Signed","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-03T13:21:10Z","updated_at":"2016-08-03T13:22:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/5786","html_url":"https://github.com/prestodb/presto/pull/5786","diff_url":"https://github.com/prestodb/presto/pull/5786.diff","patch_url":"https://github.com/prestodb/presto/pull/5786.patch"},"body":"This is a prerequisite of #5501 (CHAR support) that can be merged independently. It consists of:\r\n - tests for Unicode support in varchar and varchar(x) types in postgresql and mysql connectors\r\n - a minor change in mysql connector making it add `useUnicode=true` and `characterEncoding=utf8` parameters when connecting via jdbc\r\n - a bit of test utilities allowing for terse and readable tests of data type encoding details\r\n\r\nThe test utilities give a 4 x decrease in test code amount and a huge improvement in readability, allowing the reader to see the details that would otherwise be missed (see the screenshot below):\r\n\r\n![testmysqldistributedqueries_java___users_arturgajowy_projects_presto_presto-mysql_src_test_java_com_facebook_presto_plugin_mysql__and_refactor_of_parsing_scalar_functions_annotations_code_by_fiedukow_ _pull_request__5377_ _prestodb_presto](https://cloud.githubusercontent.com/assets/460141/17366514/eb390f0e-598b-11e6-929a-06f91fa021f5.png)\r\n\r\nUsing the utilities, the tests are also easier to write and abstract from irrelevant details such as concrete table or column names. They even allowed for reuse of test cases for unicode support between `char` and `varchar` data types, as [can be seen in the CHAR(x) PR](https://github.com/prestodb/presto/pull/5501/commits/88ccad2c435599edf5b35542f89a88c7da11d4d5#diff-6254c015bd4ca4cba218763b531d3bb7R114)."},"comment":{"url":"https://api.github.com/repos/prestodb/presto/issues/comments/237235337","html_url":"https://github.com/prestodb/presto/pull/5786#issuecomment-237235337","issue_url":"https://api.github.com/repos/prestodb/presto/issues/5786","id":237235337,"user":{"login":"ArturGajowy","id":460141,"avatar_url":"https://avatars.githubusercontent.com/u/460141?v=3","gravatar_id":"","url":"https://api.github.com/users/ArturGajowy","html_url":"https://github.com/ArturGajowy","followers_url":"https://api.github.com/users/ArturGajowy/followers","following_url":"https://api.github.com/users/ArturGajowy/following{/other_user}","gists_url":"https://api.github.com/users/ArturGajowy/gists{/gist_id}","starred_url":"https://api.github.com/users/ArturGajowy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArturGajowy/subscriptions","organizations_url":"https://api.github.com/users/ArturGajowy/orgs","repos_url":"https://api.github.com/users/ArturGajowy/repos","events_url":"https://api.github.com/users/ArturGajowy/events{/privacy}","received_events_url":"https://api.github.com/users/ArturGajowy/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T13:22:29Z","updated_at":"2016-08-03T13:22:29Z","body":"@cberner please have a look :)"}}
{"actor":{"display_login":"ArturGajowy"}}