{"action":"created","issue":{"url":"https://api.github.com/repos/mhart/dynalite/issues/22","labels_url":"https://api.github.com/repos/mhart/dynalite/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/mhart/dynalite/issues/22/comments","events_url":"https://api.github.com/repos/mhart/dynalite/issues/22/events","html_url":"https://github.com/mhart/dynalite/pull/22","id":58487865,"number":22,"title":"Fix query with binary keys, improve limit accuracy for query, some support for query filters, fix native java aws sdk conditional support for updates","user":{"login":"tpurtell","id":429022,"avatar_url":"https://avatars.githubusercontent.com/u/429022?v=3","gravatar_id":"","url":"https://api.github.com/users/tpurtell","html_url":"https://github.com/tpurtell","followers_url":"https://api.github.com/users/tpurtell/followers","following_url":"https://api.github.com/users/tpurtell/following{/other_user}","gists_url":"https://api.github.com/users/tpurtell/gists{/gist_id}","starred_url":"https://api.github.com/users/tpurtell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpurtell/subscriptions","organizations_url":"https://api.github.com/users/tpurtell/orgs","repos_url":"https://api.github.com/users/tpurtell/repos","events_url":"https://api.github.com/users/tpurtell/events{/privacy}","received_events_url":"https://api.github.com/users/tpurtell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-22T03:00:19Z","updated_at":"2015-02-22T07:22:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mhart/dynalite/pulls/22","html_url":"https://github.com/mhart/dynalite/pull/22","diff_url":"https://github.com/mhart/dynalite/pull/22.diff","patch_url":"https://github.com/mhart/dynalite/pull/22.patch"},"body":"This project is cool.  I had to do so many hacks for DynamoDB Local, I figured it would be better to just improve this project to have an alternative.  I used our unit tests to cross check this, dynamo local, and real dynamo.  This led me to find a few issues.\r\n\r\nBase64 doesn't have the same ordering as the byte arrays so that made a lot queries return weird results.  I modified the comparison test functions to special case the B type and round trip the buffers to hex strings so they compare naturally.  Comparing as buffers with <, >, <=, etc doesn't work and the Buffer.compare method is not available until Node 0.12.\r\n\r\nUpdates have a slightly different syntax from SDK docs when you look at them over the wire.  The AttributeValue array is not present, only a Value is in all the cases in my project.  I added a second phase of lookup for the compVal to make sure the correct entries can be loaded.\r\n\r\nQuery filters were missing and they were added by simply reusing the existing filter function and logic.  This was trivial, but it does not do any faithful modelling of the effect on Count and ScannedCount.\r\n\r\nLimit's on queries don't cause the LastEvaluatedKey to be set.  The docs say this and the both variants of Dynamo seem to conform to that as well.  That said, the original reason I was looking for an alternative is because I found local Dynamo sometimes did not return a LastEvaluatedKey even when there were more results.  It's probably an instance of the same Base64 comparison issue but they only use code based logic for a test from the final test to decide whether or not to include the LastEvaluatedKey.  Interestingly real Dynamo appears to not return a LastEvaluatedKey for a request that exactly reads the final set of entries.  It must be peaking ahead to determine this."},"comment":{"url":"https://api.github.com/repos/mhart/dynalite/issues/comments/75423645","html_url":"https://github.com/mhart/dynalite/pull/22#issuecomment-75423645","issue_url":"https://api.github.com/repos/mhart/dynalite/issues/22","id":75423645,"user":{"login":"mhart","id":367936,"avatar_url":"https://avatars.githubusercontent.com/u/367936?v=3","gravatar_id":"","url":"https://api.github.com/users/mhart","html_url":"https://github.com/mhart","followers_url":"https://api.github.com/users/mhart/followers","following_url":"https://api.github.com/users/mhart/following{/other_user}","gists_url":"https://api.github.com/users/mhart/gists{/gist_id}","starred_url":"https://api.github.com/users/mhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhart/subscriptions","organizations_url":"https://api.github.com/users/mhart/orgs","repos_url":"https://api.github.com/users/mhart/repos","events_url":"https://api.github.com/users/mhart/events{/privacy}","received_events_url":"https://api.github.com/users/mhart/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T07:22:26Z","updated_at":"2015-02-22T07:22:26Z","body":"Hey, thanks for the PR! A lot of things added!\r\n\r\nLooks like there are some failing tests in there though. It's been a while since I've run them against the live AWS servers, but would be worth just double-checking whether the live system has changed – last time I ran them they all passed.\r\n\r\nI think it would be better/easier to split this PR up into the separate features that you're proposing to add and any bug fixes you think are necessary. And if possible, following the same coding style would be great.\r\n\r\nThanks again!"}}