You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "somu-imply (via GitHub)" <gi...@apache.org> on 2023/05/15 22:27:39 UTC

[GitHub] [druid] somu-imply opened a new pull request, #14287: Expr getCacheKey now delegates to children

somu-imply opened a new pull request, #14287:
URL: https://github.com/apache/druid/pull/14287

   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] gianm merged pull request #14287: Expr getCacheKey now delegates to children

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm merged PR #14287:
URL: https://github.com/apache/druid/pull/14287


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] clintropolis commented on a diff in pull request #14287: Expr getCacheKey now delegates to children

Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis commented on code in PR #14287:
URL: https://github.com/apache/druid/pull/14287#discussion_r1198202220


##########
processing/src/main/java/org/apache/druid/math/expr/Expr.java:
##########
@@ -185,10 +185,28 @@ default <T> ExprVectorProcessor<T> asVectorProcessor(VectorInputBindingInspector
     throw Exprs.cannotVectorize(this);
   }
 
+
+  /**
+   * Decorates the cache key builder by adding extra elements if stringify alone is not sufficient
+   * to create the cache key. Override this method in such cases then, for e.g. {@link org.apache.druid.query.expression.LookupExprMacro}}
+   * @param builder
+   */

Review Comment:
   nit: i dont think we really need to link to things that override this, rather we should indicate that it is for use to append additional information to the default implementation of `getCacheKey`, such as if the expression relies on some external state. How about something like:
   
   ```suggestion
     /**
      * Decorates the {@link CacheKeyBuilder} for the default implementation of {@link #getCacheKey()}. The default cache
      * key implementation includes the output of {@link #stringify()} and then uses a {@link Shuttle} to call this method
      * on all children. The stringified representation is sufficient for most expressions, but for any which rely on
      * external state that might change, this method allows the cache key to change when the state does, even if the
      * expression itself is otherwise the same.
      */
   ```



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org