{"action":"created","issue":{"url":"https://api.github.com/repos/npgall/cqengine/issues/142","repository_url":"https://api.github.com/repos/npgall/cqengine","labels_url":"https://api.github.com/repos/npgall/cqengine/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/npgall/cqengine/issues/142/comments","events_url":"https://api.github.com/repos/npgall/cqengine/issues/142/events","html_url":"https://github.com/npgall/cqengine/issues/142","id":227740856,"number":142,"title":"ResultSets can provide more information in custom spliterator","user":{"login":"shollander","id":4641663,"avatar_url":"https://avatars0.githubusercontent.com/u/4641663?v=3","gravatar_id":"","url":"https://api.github.com/users/shollander","html_url":"https://github.com/shollander","followers_url":"https://api.github.com/users/shollander/followers","following_url":"https://api.github.com/users/shollander/following{/other_user}","gists_url":"https://api.github.com/users/shollander/gists{/gist_id}","starred_url":"https://api.github.com/users/shollander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shollander/subscriptions","organizations_url":"https://api.github.com/users/shollander/orgs","repos_url":"https://api.github.com/users/shollander/repos","events_url":"https://api.github.com/users/shollander/events{/privacy}","received_events_url":"https://api.github.com/users/shollander/received_events","type":"User","site_admin":false},"labels":[{"id":251725706,"url":"https://api.github.com/repos/npgall/cqengine/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-10T16:37:00Z","updated_at":"2017-06-02T13:14:27Z","closed_at":null,"body":"Since ResultSet reports a size, it would be nice if the spliterator that it returned would report a size as well (through the _estimateSize()_ method.\r\n\r\nI also noticed that for some reason the spliterator of ResultSet does not split well. Perhaps that can also be improved.\r\n"},"comment":{"url":"https://api.github.com/repos/npgall/cqengine/issues/comments/305783671","html_url":"https://github.com/npgall/cqengine/issues/142#issuecomment-305783671","issue_url":"https://api.github.com/repos/npgall/cqengine/issues/142","id":305783671,"user":{"login":"shollander","id":4641663,"avatar_url":"https://avatars0.githubusercontent.com/u/4641663?v=3","gravatar_id":"","url":"https://api.github.com/users/shollander","html_url":"https://github.com/shollander","followers_url":"https://api.github.com/users/shollander/followers","following_url":"https://api.github.com/users/shollander/following{/other_user}","gists_url":"https://api.github.com/users/shollander/gists{/gist_id}","starred_url":"https://api.github.com/users/shollander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shollander/subscriptions","organizations_url":"https://api.github.com/users/shollander/orgs","repos_url":"https://api.github.com/users/shollander/repos","events_url":"https://api.github.com/users/shollander/events{/privacy}","received_events_url":"https://api.github.com/users/shollander/received_events","type":"User","site_admin":false},"created_at":"2017-06-02T13:14:27Z","updated_at":"2017-06-02T13:14:27Z","body":"@npgall, When calling `trySplit()` on the spliterator of a `ResultSet`, the original spliterator is left with zero elements, and the new spliterator has all the elements of the original. For example, suppose ResultSet r1 has 4 elements.\r\n```\r\nResultSet<MyObject> r1 = collection.retrieve(query);\r\nSpliterator<MyObject> split1 = r1.spliterator();\r\nSpliterator<MyObject> split2 = split1.trySplit();\r\n```\r\nIdealy, the number of items in `r1` should be (somewhat) evenly distributed between `split1` and `split2`. What happens though is that `split2` will now contain all the items and `split1` will be empty."}}
{"actor":{"display_login":"shollander"}}