jdeppe-pivotal commented on a change in pull request #6794:
URL: https://github.com/apache/geode/pull/6794#discussion_r698820931
##########
File path:
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSortedSet.java
##########
@@ -383,6 +387,44 @@ long zrevrank(byte[] member) {
return null;
}
+ long zunionstore(RegionProvider regionProvider, RedisKey key, List<RedisKey>
sourceSets,
+ List<Double> weights, ZAggregator aggregator) {
+ for (int i = 0; i < sourceSets.size(); i++) {
+ RedisSortedSet set =
+ regionProvider.getTypedRedisData(REDIS_SORTED_SET,
sourceSets.get(i), false);
+ if (set == NULL_REDIS_SORTED_SET) {
+ continue;
+ }
+ double weight = weights.get(i);
+
+ Iterator<AbstractOrderedSetEntry> scoreIterator =
Review comment:
Yes, I thought of that but, as I mentioned in previous comments, I'm
reluctant to add code to optimize for corner cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]