DRILL-1369: Constrain code compilation cache.
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
index 2edc902..a9b0c61 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
@@ -45,7 +45,10 @@
   public CodeCompiler(DrillConfig config, DistributedCache distributedCache, OptionManager systemOptionManager){
     this.transformer = new ClassTransformer(distributedCache);
     this.distributedCache = distributedCache;
-    this.cache = CacheBuilder.newBuilder().build(new Loader());
+    this.cache = CacheBuilder //
+        .newBuilder() //
+        .maximumSize(1000) //
+        .build(new Loader());
     this.systemOptionManager = systemOptionManager;
     this.config = config;
   }