You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "julianhyde (via GitHub)" <gi...@apache.org> on 2023/03/24 18:21:25 UTC

[GitHub] [calcite] julianhyde commented on a diff in pull request #3128: [CALCITE-5606] Add SqlLibrary.ALL and change the library of TANH, COSH, SINH to it

julianhyde commented on code in PR #3128:
URL: https://github.com/apache/calcite/pull/3128#discussion_r1147924824


##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperatorTableFactory.java:
##########
@@ -70,18 +71,44 @@ private SqlLibraryOperatorTableFactory(Class... classes) {
   /** A cache that returns an operator table for a given library (or set of
    * libraries). */
   @SuppressWarnings("methodref.receiver.bound.invalid")
-  private final LoadingCache<ImmutableSet<SqlLibrary>, SqlOperatorTable> cache =
+  private final LoadingCache<CacheKey, SqlOperatorTable> cache =
       CacheBuilder.newBuilder().build(CacheLoader.from(this::create));
 
+  /**
+   * Cache key that contains library set and a flag indicate whether include operators under

Review Comment:
   Can you explain why cacheKey is required? After expanding 'all', the set of SqlLibary is canonical.



-- 
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@calcite.apache.org

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