DRILL-1214: Disable SV4 handling in FilterRecordBatch

Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/d07fee4e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/d07fee4e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/d07fee4e

Branch: refs/heads/master
Commit: d07fee4e1da4219799fe9374bdf7029827c2d287
Parents: 4c91094
Author: Mehant Baid <meha...@gmail.com>
Authored: Tue Aug 5 21:38:55 2014 -0700
Committer: Jacques Nadeau <jacq...@apache.org>
Committed: Wed Aug 6 16:44:21 2014 -0700

----------------------------------------------------------------------
 .../drill/exec/physical/impl/filter/FilterRecordBatch.java    | 7 +++++++
 .../org/apache/drill/exec/planner/physical/FilterPrel.java    | 4 +---
 .../drill/exec/physical/impl/filter/TestSimpleFilter.java     | 2 ++
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d07fee4e/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
index 89a6d09..3ece98b 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
@@ -111,6 +111,12 @@ public class FilterRecordBatch extends 
AbstractSingleRecordBatch<Filter>{
         this.filter = generateSV2Filterer();
         break;
       case FOUR_BYTE:
+        /*
+         * Filter does not support SV4 handling. There are couple of minor 
issues in the
+         * logic that handles SV4 + filter should always be pushed beyond sort 
so disabling
+         * it in FilterPrel.
+         *
+
         // set up the multi-batch selection vector
         this.svAllocator = oContext.getAllocator().getNewPreAllocator();
         if (!svAllocator.preAllocate(incoming.getRecordCount()*4))
@@ -119,6 +125,7 @@ public class FilterRecordBatch extends 
AbstractSingleRecordBatch<Filter>{
         sv4 = new SelectionVector4(svAllocator.getAllocation(), 
incoming.getRecordCount(), Character.MAX_VALUE);
         this.filter = generateSV4Filterer();
         break;
+        */
       default:
         throw new UnsupportedOperationException();
     }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d07fee4e/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/FilterPrel.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/FilterPrel.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/FilterPrel.java
index 337a15f..996e80a 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/FilterPrel.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/FilterPrel.java
@@ -72,13 +72,11 @@ public class FilterPrel extends DrillFilterRelBase 
implements Prel {
 
   @Override
   public SelectionVectorMode[] getSupportedEncodings() {
-    return SelectionVectorMode.ALL;
+    return SelectionVectorMode.NONE_AND_TWO;
   }
 
   @Override
   public SelectionVectorMode getEncoding() {
-    SelectionVectorMode m = ((Prel) this.getChild()).getEncoding();
-    if(m == SelectionVectorMode.FOUR_BYTE) return 
SelectionVectorMode.FOUR_BYTE;
     return SelectionVectorMode.TWO_BYTE;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d07fee4e/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 2def4a6..b95244d 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
@@ -38,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.junit.Ignore;
 import org.junit.Test;
 
 import com.codahale.metrics.MetricRegistry;
@@ -81,6 +82,7 @@ public class TestSimpleFilter extends ExecTest {
   }
 
   @Test
+  @Ignore ("Filter does not support SV4")
   public void testSV4Filter(@Injectable final DrillbitContext bitContext, 
@Injectable UserClientConnection connection) throws Throwable{
     new NonStrictExpectations(){{
       bitContext.getMetrics(); result = new MetricRegistry();

Reply via email to