GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — InstantAsStringAttributeConverter does not appear to have lexicographically correct sorting as claimed · Issue #2219 · aws/aws-sdk-java-v2 Open DescriptionDescribe the bugInstantAsStringAttributeConverter claims that its provided serialization is lexicographically sortable given that the year of the Instant is non-negative. It seems to also not be lexicographically sortable if any value falls directly on a second, since InstantAsStringAttributeConverter simply calls From Instant's toString():
From DateTimeFormatter's ISO_INSTANT:
The manifestation of this problem was a query on a sort key that, when re-sorted in application code, changed its order. Expected BehaviorWhen using an Instant as a sort key on a DynamoDbBean, I expect sort orderings like this to be returned by a query: Current BehaviorInstead I'm getting orderings like this: since Steps to ReproduceCreate a Dynamo schema with a string sort key, write two instants that share a second, but ensure one of them falls directly on the second while the other has some fractional component. Possible SolutionUse ContextIt's nice to combine the enhanced client's ability to use native Java types with querying by time. In this case the workaround is pretty straightforward for my case. Your Environment
Reacted by Brandon Dahler, Avin, David Deng, F. Emerson, Connor, Robin Liang and pmoncznik Activity
|
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |