surekhasaharan commented on a change in pull request #7325: Fix result-level 
cache for queries
URL: https://github.com/apache/incubator-druid/pull/7325#discussion_r275015283
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/query/groupby/having/GreaterThanHavingSpec.java
 ##########
 @@ -119,4 +122,15 @@ public String toString()
     sb.append('}');
     return sb.toString();
   }
+
+  @Override
+  public byte[] getCacheKey()
+  {
+    return new CacheKeyBuilder(HavingSpecUtil.CACHE_TYPE_ID_GREATER_THAN)
+        .appendString(aggregationName)
+        .appendByteArray(StringUtils.toUtf8(String.valueOf(value)))
+        .appendStrings(aggregators.keySet())
+        .appendCacheables(aggregators.values())
 
 Review comment:
   not sure the best way to add the `aggregators` map to CacheKeyBuilder, I am 
adding the keys and values separately, is that okay ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to