Github user maryannxue commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/298#discussion_r183135634
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/execute/HashJoinPlan.java ---
@@ -488,11 +502,20 @@ public ServerCache execute(HashJoinPlan parent)
throws SQLException {
if (hashExpressions != null) {
ResultIterator iterator = plan.iterator();
try {
- cache =
- parent.hashClient.addHashCache(ranges,
iterator,
+ final byte[] cacheId;
+ if (usePersistentCache) {
--- End diff --
Like I said in an earlier comment, if using persistent cache, we don't need
to call "check" or "add" cache here, instead we catch a specific Exception and
addServerCache at this point. Still, we might wanna return "null" if this is
persistent cache so later on the cache "close" method won't be called by the
HashJoinPlan clean-up routine.
---