{"action":"created","issue":{"url":"https://api.github.com/repos/yinqiwen/ardb/issues/171","labels_url":"https://api.github.com/repos/yinqiwen/ardb/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/yinqiwen/ardb/issues/171/comments","events_url":"https://api.github.com/repos/yinqiwen/ardb/issues/171/events","html_url":"https://github.com/yinqiwen/ardb/issues/171","id":69616536,"number":171,"title":"zunionstore and sunionstore broken","user":{"login":"borg286","id":8532481,"avatar_url":"https://avatars.githubusercontent.com/u/8532481?v=3","gravatar_id":"","url":"https://api.github.com/users/borg286","html_url":"https://github.com/borg286","followers_url":"https://api.github.com/users/borg286/followers","following_url":"https://api.github.com/users/borg286/following{/other_user}","gists_url":"https://api.github.com/users/borg286/gists{/gist_id}","starred_url":"https://api.github.com/users/borg286/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borg286/subscriptions","organizations_url":"https://api.github.com/users/borg286/orgs","repos_url":"https://api.github.com/users/borg286/repos","events_url":"https://api.github.com/users/borg286/events{/privacy}","received_events_url":"https://api.github.com/users/borg286/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-20T15:43:26Z","updated_at":"2015-04-21T13:06:26Z","closed_at":null,"body":"When destination is same as one of the source sets it is not included\r\n\r\n127.0.0.1:6379> zadd myset 1 1 2 2 3 3\r\n(integer) 3\r\n127.0.0.1:6379> zadd otherset 3 3 4 4 5 5\r\n(integer) 3\r\n127.0.0.1:6379> zunionstore myset 2 myset otherset\r\n(integer) 3\r\n127.0.0.1:6379> zrange myset 0 999\r\n1) \"3\"\r\n2) \"4\"\r\n3) \"5\"\r\n127.0.0.1:6379> \r\n\r\nIt should be 1, 2, 3, 4, 5"},"comment":{"url":"https://api.github.com/repos/yinqiwen/ardb/issues/comments/94786753","html_url":"https://github.com/yinqiwen/ardb/issues/171#issuecomment-94786753","issue_url":"https://api.github.com/repos/yinqiwen/ardb/issues/171","id":94786753,"user":{"login":"borg286","id":8532481,"avatar_url":"https://avatars.githubusercontent.com/u/8532481?v=3","gravatar_id":"","url":"https://api.github.com/users/borg286","html_url":"https://github.com/borg286","followers_url":"https://api.github.com/users/borg286/followers","following_url":"https://api.github.com/users/borg286/following{/other_user}","gists_url":"https://api.github.com/users/borg286/gists{/gist_id}","starred_url":"https://api.github.com/users/borg286/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borg286/subscriptions","organizations_url":"https://api.github.com/users/borg286/orgs","repos_url":"https://api.github.com/users/borg286/repos","events_url":"https://api.github.com/users/borg286/events{/privacy}","received_events_url":"https://api.github.com/users/borg286/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T13:06:26Z","updated_at":"2015-04-21T13:06:26Z","body":"That would prevent a rolling union or a rolling subtraction. I very much\nwould like such a feature. Why not simply check I'd the destination is one\nof the sources and if so then use that data in the union/inter/diff's first\npass in the for loop.\n\nOn Tue, Apr 21, 2015, 12:59 AM yinqiwen <notifications@github.com> wrote:\n\n> In ardb, it would clear all storedestination key before execute\n> union/inter/diff store operations.\n>\n> It's difficult to implement this feature like redis which would store all\n> calculated data in memory first.\n> IMO,it's better to forbid duplicated destination key in input keys.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/yinqiwen/ardb/issues/171#issuecomment-94688115>.\n>\n"}}