{"action":"created","issue":{"url":"https://api.github.com/repos/datastax/java-driver/issues/1080","repository_url":"https://api.github.com/repos/datastax/java-driver","labels_url":"https://api.github.com/repos/datastax/java-driver/issues/1080/labels{/name}","comments_url":"https://api.github.com/repos/datastax/java-driver/issues/1080/comments","events_url":"https://api.github.com/repos/datastax/java-driver/issues/1080/events","html_url":"https://github.com/datastax/java-driver/pull/1080","id":350111314,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MDQwMzc1","number":1080,"title":"JAVA-1942: Adapt type with CodecRegistry's associated AttachmentPoint","user":{"login":"tolbertam","id":6889771,"node_id":"MDQ6VXNlcjY4ODk3NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/6889771?v=4","gravatar_id":"","url":"https://api.github.com/users/tolbertam","html_url":"https://github.com/tolbertam","followers_url":"https://api.github.com/users/tolbertam/followers","following_url":"https://api.github.com/users/tolbertam/following{/other_user}","gists_url":"https://api.github.com/users/tolbertam/gists{/gist_id}","starred_url":"https://api.github.com/users/tolbertam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tolbertam/subscriptions","organizations_url":"https://api.github.com/users/tolbertam/orgs","repos_url":"https://api.github.com/users/tolbertam/repos","events_url":"https://api.github.com/users/tolbertam/events{/privacy}","received_events_url":"https://api.github.com/users/tolbertam/received_events","type":"User","site_admin":false},"labels":[{"id":379655509,"node_id":"MDU6TGFiZWwzNzk2NTU1MDk=","url":"https://api.github.com/repos/datastax/java-driver/labels/wip","name":"wip","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/datastax/java-driver/milestones/37","html_url":"https://github.com/datastax/java-driver/milestone/37","labels_url":"https://api.github.com/repos/datastax/java-driver/milestones/37/labels","id":3495289,"node_id":"MDk6TWlsZXN0b25lMzQ5NTI4OQ==","number":37,"title":"4.0.0-beta2","description":null,"creator":{"login":"olim7t","id":259423,"node_id":"MDQ6VXNlcjI1OTQyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/259423?v=4","gravatar_id":"","url":"https://api.github.com/users/olim7t","html_url":"https://github.com/olim7t","followers_url":"https://api.github.com/users/olim7t/followers","following_url":"https://api.github.com/users/olim7t/following{/other_user}","gists_url":"https://api.github.com/users/olim7t/gists{/gist_id}","starred_url":"https://api.github.com/users/olim7t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olim7t/subscriptions","organizations_url":"https://api.github.com/users/olim7t/orgs","repos_url":"https://api.github.com/users/olim7t/repos","events_url":"https://api.github.com/users/olim7t/events{/privacy}","received_events_url":"https://api.github.com/users/olim7t/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":8,"state":"open","created_at":"2018-07-13T20:37:52Z","updated_at":"2018-08-15T02:03:35Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-08-13T16:55:35Z","updated_at":"2018-08-16T08:28:23Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/datastax/java-driver/pulls/1080","html_url":"https://github.com/datastax/java-driver/pull/1080","diff_url":"https://github.com/datastax/java-driver/pull/1080.diff","patch_url":"https://github.com/datastax/java-driver/pull/1080.patch"},"body":"For [JAVA-1942](https://datastax-oss.atlassian.net/browse/JAVA-1942).\r\n\r\nMotivation:\r\n\r\nTo ensure tuples and udts are decoded using the codec registry and\r\nprotocol version associated with the current Session, adapt any\r\nincoming TupleValue / UdtValue's type to the AttachmentPoint of\r\nthe session when creating their associated codecs.\r\n\r\nModifications:\r\n\r\nUpdate CachingCodecRegistry constructor to accept AttachmentPoint\r\nto be associated with this registry.  Update DefaultDriverContext\r\nto pass itself as the AttachmentPoint.\r\n\r\nUpdate CachingCodecRegistry.createCodec methods to adapt types\r\nto the AttachmentPoint.\r\n\r\nUpdate DataTypeIT to create an AttachmentPoint based on the expected\r\nProtocolVersion to be used by the Session.\r\n\r\nIntroduce SessionUtils.getMaxProtocolVersion, which replaces\r\nCassandraResourceRule.getHighestProtocolVersion.\r\n\r\nResult:\r\n\r\nSession's protocol version and codec registry are ensured to be\r\nfactored in when deserializing UDTs and Tuples."},"comment":{"url":"https://api.github.com/repos/datastax/java-driver/issues/comments/413467346","html_url":"https://github.com/datastax/java-driver/pull/1080#issuecomment-413467346","issue_url":"https://api.github.com/repos/datastax/java-driver/issues/1080","id":413467346,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzQ2NzM0Ng==","user":{"login":"adutra","id":463876,"node_id":"MDQ6VXNlcjQ2Mzg3Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/463876?v=4","gravatar_id":"","url":"https://api.github.com/users/adutra","html_url":"https://github.com/adutra","followers_url":"https://api.github.com/users/adutra/followers","following_url":"https://api.github.com/users/adutra/following{/other_user}","gists_url":"https://api.github.com/users/adutra/gists{/gist_id}","starred_url":"https://api.github.com/users/adutra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adutra/subscriptions","organizations_url":"https://api.github.com/users/adutra/orgs","repos_url":"https://api.github.com/users/adutra/repos","events_url":"https://api.github.com/users/adutra/events{/privacy}","received_events_url":"https://api.github.com/users/adutra/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T08:28:23Z","updated_at":"2018-08-16T08:28:23Z","author_association":"CONTRIBUTOR","body":"I still think that taking the protocol version _itself_ into account to determine object equality is conceptually wrong. I do agree that the protocol version is required to decode inner components _while computing equality_ (we can't do otherwise), but imo the version itself should be irrelevant. Put differently, if two different protocol versions produce exactly the same java representations of some CQL value, to me these representations should be considered equal to each other. And honestly I don't see any drawback in doing this change, but one nice positive outcome: the `hashCode()` method would not produce identical hashes for non-equal objects anymore."}}
{"actor":{"display_login":"adutra"}}