http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java
index 73b7b53..457e0b1 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java
@@ -30,7 +30,9 @@ import org.apache.drill.common.expression.ExpressionPosition;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.client.DrillClient;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
+import org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers;
 import org.apache.drill.exec.expr.holders.BigIntHolder;
 import org.apache.drill.exec.expr.holders.Float4Holder;
 import org.apache.drill.exec.expr.holders.Float8Holder;
@@ -85,6 +87,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -132,6 +135,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -177,6 +181,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -223,6 +228,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -269,6 +275,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -287,7 +294,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       for(int i = 0; i < c0.getAccessor().getValueCount(); i++){
           VarCharHolder holder0 = new VarCharHolder();
           a0.get(i, holder0);
-          assertEquals("123", holder0.toString());
+          assertEquals("123", 
StringFunctionHelpers.toStringFromUTF8(holder0.start, holder0.end, 
holder0.buffer));
           ++count;
 
       }
@@ -316,6 +323,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -334,7 +342,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       for(int i = 0; i < c0.getAccessor().getValueCount(); i++){
           VarBinaryHolder holder0 = new VarBinaryHolder();
           a0.get(i, holder0);
-          assertEquals("123", holder0.toString());
+          assertEquals("123", 
StringFunctionHelpers.toStringFromUTF8(holder0.start, holder0.end, 
holder0.buffer));
           ++count;
 
       }
@@ -361,6 +369,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 
@@ -408,6 +417,7 @@ public class TestCastFunctions extends PopUnitTestBase{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = allocator;
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
     }};
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
index 6cb6ec1..da018c3 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
@@ -26,6 +26,7 @@ import mockit.NonStrictExpectations;
 
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -62,6 +63,7 @@ public class TestComparisonFunctions extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     String planString = 
Resources.toString(Resources.getResource(COMPARISON_TEST_PHYSICAL_PLAN), 
Charsets.UTF_8).replaceAll("EXPRESSION", expression);

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java
index 0a021ad..5111a49 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import io.netty.buffer.ByteBuf;
+import io.netty.buffer.DrillBuf;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -36,7 +36,6 @@ import org.apache.drill.exec.record.RecordBatchLoader;
 import org.apache.drill.exec.rpc.user.QueryResultBatch;
 import org.apache.drill.exec.rpc.user.UserServer;
 import org.apache.drill.exec.server.DrillbitContext;
-import org.apache.drill.exec.util.ByteBufUtil;
 import org.apache.drill.exec.util.ByteBufUtil.HadoopWritables;
 import org.apache.drill.exec.util.VectorUtil;
 import org.apache.drill.exec.vector.ValueVector;
@@ -323,7 +322,7 @@ public class TestConvertFunctions extends BaseTestQuery {
   public void testHadooopVInt() throws Exception {
     final int _0 = 0;
     final int _9 = 9;
-    final ByteBuf buffer = ByteBufUtil.createBuffer(_9);
+    final DrillBuf buffer = getAllocator().buffer(_9);
 
     long longVal = 0;
     buffer.clear();
@@ -356,6 +355,7 @@ public class TestConvertFunctions extends BaseTestQuery {
     HadoopWritables.writeVInt(buffer, _0, _9, Integer.MIN_VALUE);
     intVal = HadoopWritables.readVInt(buffer, _0, _9);
     assertEquals(intVal, Integer.MIN_VALUE);
+    buffer.release();
   }
 
   protected <T> void verifySQL(String sql, T expectedResults) throws Throwable 
{

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java
index 3e4081d..2ff99c8 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java
@@ -24,6 +24,7 @@ import mockit.NonStrictExpectations;
 
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -72,6 +73,7 @@ public class TestImplicitCastFunctions extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     String planString = Resources.toString(Resources.getResource(planPath), 
Charsets.UTF_8);

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
index a686fa9..93a387f 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
@@ -28,6 +28,7 @@ import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
 import org.apache.drill.exec.cache.DistributedCache;
 import org.apache.drill.exec.client.DrillClient;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.coord.ClusterCoordinator;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.expr.holders.VarBinaryHolder;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java
index 18478a3..d551319 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java
@@ -38,8 +38,10 @@ import org.apache.drill.common.types.TypeProtos;
 import org.apache.drill.common.types.Types;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.DrillFuncHolder;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
+import org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers;
 import org.apache.drill.exec.expr.holders.NullableVarBinaryHolder;
 import org.apache.drill.exec.expr.holders.NullableVarCharHolder;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -156,6 +158,7 @@ public class TestSimpleFunctions extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -174,7 +177,7 @@ public class TestSimpleFunctions extends ExecTest {
         if (!a1.isNull(i)) {
           NullableVarCharHolder holder = new NullableVarCharHolder();
           a1.get(i, holder);
-          assertEquals("aaaa", holder.toString());
+          assertEquals("aaaa", 
StringFunctionHelpers.toStringFromUTF8(holder.start,  holder.end,  
holder.buffer));
           ++count;
         }
       }
@@ -197,6 +200,7 @@ public class TestSimpleFunctions extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -216,7 +220,7 @@ public class TestSimpleFunctions extends ExecTest {
           NullableVarCharHolder holder = new NullableVarCharHolder();
           a1.get(i, holder);
           //when offset is negative, substring return empty string.
-          assertEquals("", holder.toString());
+          assertEquals("", 
StringFunctionHelpers.toStringFromUTF8(holder.start,  holder.end,  
holder.buffer));
           ++count;
         }
       }
@@ -239,6 +243,7 @@ public class TestSimpleFunctions extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -257,7 +262,7 @@ public class TestSimpleFunctions extends ExecTest {
         if (!a1.isNull(i)) {
           NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
           a1.get(i, holder);
-          assertEquals("aa", holder.toString());
+          assertEquals("aa", 
StringFunctionHelpers.toStringFromUTF8(holder.start,  holder.end,  
holder.buffer));
           ++count;
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java
index 0f91366..2e60893 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java
@@ -24,6 +24,8 @@ import mockit.NonStrictExpectations;
 
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.cache.local.LocalCache;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -34,6 +36,8 @@ import org.apache.drill.exec.proto.BitControl.PlanFragment;
 import org.apache.drill.exec.proto.CoordinationProtos;
 import org.apache.drill.exec.rpc.user.UserServer;
 import org.apache.drill.exec.server.DrillbitContext;
+import org.apache.drill.exec.server.options.SystemOptionManager;
+import org.apache.drill.exec.store.sys.local.LocalPStoreProvider;
 import org.apache.drill.exec.vector.ValueVector;
 import org.apache.drill.exec.vector.VarCharVector;
 import org.junit.Test;
@@ -69,12 +73,12 @@ public class TestStringFunctions extends ExecTest {
 
   public void runTest(@Injectable final DrillbitContext bitContext,
                       @Injectable UserServer.UserClientConnection connection, 
Object[] expectedResults, String planPath) throws Throwable {
-
     new NonStrictExpectations(){{
       bitContext.getMetrics(); result = new MetricRegistry();
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     String planString = Resources.toString(Resources.getResource(planPath), 
Charsets.UTF_8);
@@ -91,7 +95,7 @@ public class TestStringFunctions extends ExecTest {
 
       for (int i = 0; i<res.length; i++) {
         assertEquals(String.format("column %s does not match", i), 
expectedResults[i],  res[i]);
-      }      
+      }
     }
 
     if(context.getFailureCause() != null){

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/agg/TestAgg.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/agg/TestAgg.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/agg/TestAgg.java
index 3669c5d..b39566a 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/agg/TestAgg.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/agg/TestAgg.java
@@ -26,6 +26,7 @@ import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -57,6 +58,7 @@ public class TestAgg extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/common/TestHashTable.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/common/TestHashTable.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/common/TestHashTable.java
index e3b4daf..b02249d 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/common/TestHashTable.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/common/TestHashTable.java
@@ -22,6 +22,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -51,6 +52,7 @@ private SimpleRootExec doTest(final DrillbitContext 
bitContext, UserClientConnec
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
index b95244d..a112d92 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/filter/TestSimpleFilter.java
@@ -25,6 +25,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -60,6 +61,7 @@ public class TestSimpleFilter extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 
@@ -89,6 +91,7 @@ public class TestSimpleFilter extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoin.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoin.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoin.java
index b7bd9e8..ed50685 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoin.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestHashJoin.java
@@ -32,6 +32,7 @@ import org.apache.drill.common.util.TestTools;
 import org.apache.drill.exec.cache.DistributedCache;
 import org.apache.drill.exec.cache.local.LocalCache;
 import org.apache.drill.exec.client.DrillClient;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -83,6 +84,7 @@ public class TestHashJoin extends PopUnitTestBase{
             bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
             bitContext.getConfig(); result = c;
             bitContext.getOptionManager(); result = opt;
+            bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
         }};
 
         PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -267,8 +269,8 @@ public class TestHashJoin extends PopUnitTestBase{
       assertEquals(272, count);
     }
   }
-  
-  
+
+
   @Test
   public void testHashJoinExprInCondition() throws Exception {
     RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet();

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoin.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoin.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoin.java
index 65d51dc..7b264c4 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoin.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoin.java
@@ -29,6 +29,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.client.DrillClient;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -77,6 +78,7 @@ public class TestMergeJoin extends PopUnitTestBase {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -128,6 +130,7 @@ public class TestMergeJoin extends PopUnitTestBase {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getConfig(); result = c;
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, 
c.getMapper(),CoordinationProtos.DrillbitEndpoint.getDefaultInstance(), new 
StoragePluginRegistry(bitContext));
@@ -182,6 +185,7 @@ public class TestMergeJoin extends PopUnitTestBase {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getConfig(); result = c;
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, 
c.getMapper(),CoordinationProtos.DrillbitEndpoint.getDefaultInstance(), new 
StoragePluginRegistry(bitContext));
@@ -236,6 +240,7 @@ public class TestMergeJoin extends PopUnitTestBase {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getConfig(); result = c;
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, 
c.getMapper(),CoordinationProtos.DrillbitEndpoint.getDefaultInstance(), new 
StoragePluginRegistry(bitContext));
@@ -286,6 +291,7 @@ public class TestMergeJoin extends PopUnitTestBase {
       bitContext.getAllocator(); result = new TopLevelAllocator();;
       bitContext.getConfig(); result = c;
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -393,5 +399,5 @@ public class TestMergeJoin extends PopUnitTestBase {
       assertEquals(10, count);
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/limit/TestSimpleLimit.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/limit/TestSimpleLimit.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/limit/TestSimpleLimit.java
index 0d5d622..87ee259 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/limit/TestSimpleLimit.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/limit/TestSimpleLimit.java
@@ -28,6 +28,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -62,6 +63,7 @@ public class TestSimpleLimit extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     verifyLimitCount(bitContext, connection, "test1.json", 5);
@@ -74,6 +76,7 @@ public class TestSimpleLimit extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     verifyLimitCount(bitContext, connection, "test3.json", 95);
@@ -91,6 +94,7 @@ public class TestSimpleLimit extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
     verifyLimitCount(bitContext, connection, "test2.json", 69999);

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
index 63fb54b..514e913 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/project/TestSimpleProjection.java
@@ -27,6 +27,7 @@ import org.apache.drill.common.expression.ExpressionPosition;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -67,6 +68,7 @@ public class TestSimpleProjection extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/sort/TestSimpleSort.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/sort/TestSimpleSort.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/sort/TestSimpleSort.java
index f73889d..4f8ba7e 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/sort/TestSimpleSort.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/sort/TestSimpleSort.java
@@ -26,6 +26,7 @@ import org.apache.drill.common.expression.ExpressionPosition;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -64,6 +65,7 @@ public class TestSimpleSort extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 
@@ -113,6 +115,7 @@ public class TestSimpleSort extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
index e05a170..bb7ec69 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/svremover/TestSVRemover.java
@@ -25,6 +25,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -64,6 +65,7 @@ public class TestSVRemover extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceMultiRecordBatch.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceMultiRecordBatch.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceMultiRecordBatch.java
index abe3410..d0d4005 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceMultiRecordBatch.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceMultiRecordBatch.java
@@ -24,6 +24,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -37,6 +38,7 @@ import org.apache.drill.exec.proto.BitControl.PlanFragment;
 import org.apache.drill.exec.proto.CoordinationProtos;
 import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection;
 import org.apache.drill.exec.server.DrillbitContext;
+import org.apache.drill.exec.vector.ValueVector;
 import org.junit.Test;
 
 import com.codahale.metrics.MetricRegistry;
@@ -65,6 +67,7 @@ public class TestTraceMultiRecordBatch extends ExecTest {
             bitContext.getAllocator(); result = new TopLevelAllocator();
             bitContext.getConfig(); result = c;
             bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
+            bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
         }};
 
         PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
@@ -74,6 +77,9 @@ public class TestTraceMultiRecordBatch extends ExecTest {
         SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, 
(FragmentRoot) plan.getSortedOperators(false).iterator().next()));
 
         while(exec.next()) {
+          for(ValueVector vv: exec){
+            vv.clear();
+          }
         }
 
         exec.stop();

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceOutputDump.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceOutputDump.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceOutputDump.java
index 5817e0b..f6766b1 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceOutputDump.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/trace/TestTraceOutputDump.java
@@ -26,6 +26,7 @@ import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecConstants;
 import org.apache.drill.exec.ExecTest;
 import org.apache.drill.exec.cache.VectorAccessibleSerializable;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.TopLevelAllocator;
 import org.apache.drill.exec.ops.FragmentContext;
@@ -80,6 +81,7 @@ public class TestTraceOutputDump extends ExecTest {
             bitContext.getAllocator(); result = new TopLevelAllocator();
             bitContext.getConfig(); result = c;
             bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
+            bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
         }};
 
         PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), 
CoordinationProtos.DrillbitEndpoint.getDefaultInstance());

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/union/TestSimpleUnion.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/union/TestSimpleUnion.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/union/TestSimpleUnion.java
index 576f017..3420169 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/union/TestSimpleUnion.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/union/TestSimpleUnion.java
@@ -27,6 +27,7 @@ import mockit.NonStrictExpectations;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.compile.CodeCompiler;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.memory.BufferAllocator;
 import org.apache.drill.exec.memory.TopLevelAllocator;
@@ -62,6 +63,7 @@ public class TestSimpleUnion extends ExecTest {
       bitContext.getAllocator(); result = new TopLevelAllocator();
       bitContext.getOperatorCreatorRegistry(); result = new 
OperatorCreatorRegistry(c);
       bitContext.getConfig(); result = c;
+      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
     }};
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/record/vector/TestLoad.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/record/vector/TestLoad.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/record/vector/TestLoad.java
index 33bfc71..831bf74 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/record/vector/TestLoad.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/record/vector/TestLoad.java
@@ -19,6 +19,7 @@ package org.apache.drill.exec.record.vector;
 
 import static org.junit.Assert.assertEquals;
 import io.netty.buffer.ByteBuf;
+import io.netty.buffer.DrillBuf;
 
 import java.util.List;
 
@@ -68,7 +69,7 @@ public class TestLoad extends ExecTest {
     for (int i = 0; i < byteBufs.length; i++) {
       bytes += byteBufs[i].writerIndex();
     }
-    ByteBuf byteBuf = allocator.buffer(bytes);
+    DrillBuf byteBuf = allocator.buffer(bytes);
     int index = 0;
     for (int i = 0; i < byteBufs.length; i++) {
       byteBufs[i].readBytes(byteBuf, index, byteBufs[i].writerIndex());

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java 
b/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
index 347cfb0..a5de832 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
@@ -19,6 +19,7 @@ package org.apache.drill.exec.server;
 
 import static org.junit.Assert.assertTrue;
 import io.netty.buffer.ByteBuf;
+import io.netty.buffer.DrillBuf;
 
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -153,7 +154,7 @@ public class TestBitRpc extends ExecTest {
     int v = 0;
 
     @Override
-    public void handle(RemoteConnection connection, FragmentManager manager, 
FragmentRecordBatch fragmentBatch, ByteBuf data, ResponseSender sender)
+    public void handle(RemoteConnection connection, FragmentManager manager, 
FragmentRecordBatch fragmentBatch, DrillBuf data, ResponseSender sender)
         throws RpcException {
       // System.out.println("Received.");
       try {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/store/TestOutputMutator.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/store/TestOutputMutator.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/store/TestOutputMutator.java
index 0161632..b5e8564 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/store/TestOutputMutator.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/store/TestOutputMutator.java
@@ -17,6 +17,8 @@
  */
 package org.apache.drill.exec.store;
 
+import io.netty.buffer.DrillBuf;
+
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -86,4 +88,9 @@ public class TestOutputMutator implements OutputMutator, 
Iterable<VectorWrapper<
     addField(v);
     return (T) v;
   }
+
+  @Override
+  public DrillBuf getManagedBuffer() {
+    return allocator.buffer(255);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
index cbae6ba..e584210 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
@@ -21,6 +21,7 @@ import static 
org.apache.drill.exec.store.parquet.TestFileGenerator.populateFiel
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import io.netty.buffer.DrillBuf;
 
 import java.io.File;
 import java.io.IOException;
@@ -148,16 +149,19 @@ public class ParquetRecordReaderTest extends 
BaseTestQuery{
 
 
   @Test
+  @Ignore
   public void testNonExistentColumnLargeFile() throws Exception {
     testFull(QueryType.SQL, "select non_existent_column, non_existent_col_2 
from dfs.`/tmp/customer.dict.parquet`", "", 1, 1, 150000, false);
   }
 
   @Test
+  @Ignore
   public void testNonExistentColumnsSomePresentColumnsLargeFile() throws 
Exception {
     testFull(QueryType.SQL, "select cust_key, address,  non_existent_column, 
non_existent_col_2 from dfs.`/tmp/customer.dict.parquet`", "", 1, 1, 150000, 
false);
   }
 
   @Test
+  @Ignore
   public void testTPCHPerformace_SF1() throws Exception {
     testFull(QueryType.SQL, "select * from 
dfs.`/tmp/orders_part-m-00001.parquet`", "", 1, 1, 150000, false);
   }
@@ -266,6 +270,11 @@ public class ParquetRecordReaderTest extends BaseTestQuery{
     public boolean isNewSchema() {
       return false;
     }
+
+    @Override
+    public DrillBuf getManagedBuffer() {
+      return allocator.buffer(255);
+    }
   }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
index 8b31958..f2f91f4 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
@@ -18,6 +18,7 @@
 package org.apache.drill.exec.vector.complex.writer;
 
 import static org.junit.Assert.assertEquals;
+import io.netty.buffer.DrillBuf;
 
 import java.io.ByteArrayOutputStream;
 import java.util.List;
@@ -87,8 +88,8 @@ public class TestJsonReader {
     ComplexWriterImpl writer = new ComplexWriterImpl("col", v);
     writer.allocate();
 
-
-    JsonReaderWithState jsonReader = new JsonReaderWithState(new 
ReaderJSONRecordSplitter(compound));
+    DrillBuf buffer = allocator.buffer(255);
+    JsonReaderWithState jsonReader = new JsonReaderWithState(new 
ReaderJSONRecordSplitter(compound), buffer);
     int i =0;
     List<Integer> batchSizes = Lists.newArrayList();
 
@@ -158,6 +159,6 @@ public class TestJsonReader {
     assertEquals((repeatSize+1) * 2, total);
 
     writer.clear();
-
+    buffer.release();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/5c5cef06/exec/java-exec/src/test/sh/runexec
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/sh/runexec 
b/exec/java-exec/src/test/sh/runexec
new file mode 100755
index 0000000..7a45628
--- /dev/null
+++ b/exec/java-exec/src/test/sh/runexec
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PROJECT_ROOT=../../../
+
+mvn dependency:build-classpath -f=$PROJECT_ROOT/pom.xml 
-Dmdep.outputFile=target/sh/cp.txt
+CP=`cat $PROJECT_ROOT/target/sh/cp.txt`
+CP=./:$CP:$PROJECT_ROOT/target/classes:$PROJECT_ROOT/target/test-classes
+java \
+-Dlogback.configurationFile=logback.xml \
+-XX:MaxDirectMemorySize=8192M \
+-XX:+UnlockDiagnosticVMOptions \
+-XX:FreqInlineSize=5000 \
+-XX:InlineSmallCode=5000 \
+-XX:MaxInlineLevel=20 \
+-XX:MaxInlineSize=5000 \
+-XX:MaxRecursiveInlineLevel=1 \
+-cp $CP \
+org.apache.drill.exec.RunRootExec $@

Reply via email to