diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Context.java b/ql/src/java/org/apache/hadoop/hive/ql/Context.java index 1921ea7..19e6d82 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/Context.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/Context.java @@ -712,6 +712,9 @@ public void setResDir(Path resDir) { } public void clear() throws IOException { + // Clear out the CS map for garbage collection + pathToCS.clear(); + // First clear the other contexts created by this query for (Context subContext : rewrittenStatementContexts) { subContext.clear();