Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/442#discussion_r27803484
--- Diff: tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
---
@@ -143,6 +148,18 @@ private QueryContext createQueryContext(Session
session) {
newQueryContext.putAll(CommonTestingUtil.getSessionVarsForTest());
}
+ // Set queryCache in session
+ if (session.getQueryCache() == null) {
+ session.setQueryCache(CacheBuilder.newBuilder()
+ .maximumSize(200)
--- End diff --
Here, the size means the number of items contained in the cache. So, the
actual cache size depends on the size of cached queries. This will have a
problem of potentially exhausting memory. So, it would be better to set the
maximum weight rather than the maximum size.
In addition, I think that the maximum weight and the expiration period
should be configurable. ```ConfVar``` would be a good place because we don't
need to maintain different configurations for each user.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---