Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort ordering not retained in result map #26

Closed
GoogleCodeExporter opened this issue Nov 20, 2015 · 2 comments
Closed

Sort ordering not retained in result map #26

GoogleCodeExporter opened this issue Nov 20, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

When using the "sort" option in SimpleDB, the ordering of the items is not 
retained.

In the implementation of the listItemsWithAttributes() method in Domain.java, 
it stores the results 
of the query in a Hashtable which does not retain insertion order.  This can be 
fixed by using a 
LinkedHashSet wrapped to retain the thread safety of the Hashtable.

Attached is a Subversion diff which implements this change to retain proper 
ordering of sorted 
query results.

Original issue reported on code.google.com by craigwblake@gmail.com on 28 Sep 2008 at 9:23

Attachments:

@GoogleCodeExporter
Copy link
Author

fixed in SVN r192. I used a LinkedHashMap. I didn't wrap it because it isn't 
subject
to conditions which would affect thread safety. There is only one thread 
inserting
into a locally created collection.

Original comment by dkavan...@gmail.com on 6 Oct 2008 at 2:26

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

It looks like the wrong Hashtable was converted to the LinkedHashSet.  The 
"params" map is only used in 
creating the request, the "results" Hashtable is the one that needs to be 
changed to affect the ordering of the 
returned items.

Original comment by craigwblake@gmail.com on 6 Oct 2008 at 2:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant