zabetak commented on a change in pull request #950: [CALCITE-2703] Reduce code
generation and class loading overhead when executing queries in the
EnumerableConvention (Stamatis Zampetakis)
URL: https://github.com/apache/calcite/pull/950#discussion_r259417514
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableInterpretable.java
##########
@@ -82,6 +89,16 @@ public Node implement(final InterpreterImplementor
implementor) {
return new EnumerableNode(enumerable, implementor.compiler, this);
}
+ private static final int BINDABLE_CACHE_MAX_SIZE =
+ Util.getIntProperty("calcite.bindable.cache.maxSize", (size) -> size >=
0, 0);
+ private static final int BINDABLE_CACHE_CONCURRENCY_LEVEL =
+ Util.getIntProperty("calcite.bindable.cache.concurrencyLevel", (level)
-> level > 0, 1);
+ private static final Cache<String, Bindable> BINDABLE_CACHE =
Review comment:
We want to cache `Bindable` objects across connections so I don't see a
relevant class which can hold the cache. Moreover, having the cache stored in
another object would mean that we need to pass it using parameters till
`getBindable` (which by the way is static) and that would introduce many
changes. For the previous reasons, I would rather keep it as it is but if you
see a better option, I am willing to follow:)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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