diff --git a/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java b/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java index b169b81cd..9b0c389c1 100644 --- a/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java +++ b/presto-main/src/main/java/io/prestosql/heuristicindex/IndexCache.java @@ -247,7 +247,10 @@ public class IndexCache cache.invalidate(filterKey); break; case TABLE: - // no need to break index, and lastModifiedTime is not used for TABLE level. no need to do anything + // no need to break index, and lastModifiedTime is not used for TABLE level, but we need to + // toggle back the noCloseFlag, as it was previously set to true. + filterKey.setNoCloseFlag(false); + break; } } catch (ExecutionException e) { diff --git a/presto-spi/src/main/java/io/prestosql/spi/heuristicindex/IndexCacheKey.java b/presto-spi/src/main/java/io/prestosql/spi/heuristicindex/IndexCacheKey.java index 973bffa69..780c2e433 100644 --- a/presto-spi/src/main/java/io/prestosql/spi/heuristicindex/IndexCacheKey.java +++ b/presto-spi/src/main/java/io/prestosql/spi/heuristicindex/IndexCacheKey.java @@ -87,7 +87,7 @@ public class IndexCacheKey public void setNoCloseFlag(boolean flag) { - this.noCloseFlag = true; + this.noCloseFlag = flag; } public boolean skipCloseIndex()