You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2013/08/02 05:03:08 UTC
[08/13] git commit: non-nullable float4 and float8 comparison
functions
non-nullable float4 and float8 comparison functions
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/fdb5c41e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/fdb5c41e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/fdb5c41e
Branch: refs/heads/master
Commit: fdb5c41e696915ab76f2cf38b510f80dd64eee87
Parents: 9efdeea
Author: Steven Phillips <sp...@maprtech.com>
Authored: Thu Aug 1 12:30:55 2013 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Thu Aug 1 19:24:43 2013 -0700
----------------------------------------------------------------------
.../exec/expr/fn/impl/ComparisonFunctions.java | 182 +++++++++-
.../physical/impl/TestComparisonFunctions.java | 336 ++++++++++++++++++-
.../test/resources/functions/float4Equal.json | 35 ++
.../resources/functions/float4GreaterThan.json | 35 ++
.../functions/float4GreaterThanEqual.json | 35 ++
.../resources/functions/float4LessThan.json | 35 ++
.../functions/float4LessThanEqual.json | 35 ++
.../resources/functions/float4NotEqual.json | 35 ++
.../test/resources/functions/float8Equal.json | 35 ++
.../resources/functions/float8GreaterThan.json | 35 ++
.../functions/float8GreaterThanEqual.json | 35 ++
.../resources/functions/float8LessThan.json | 35 ++
.../functions/float8LessThanEqual.json | 35 ++
.../resources/functions/float8NotEqual.json | 35 ++
14 files changed, 926 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ComparisonFunctions.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ComparisonFunctions.java b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ComparisonFunctions.java
index 0906c14..21263b0 100644
--- a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ComparisonFunctions.java
+++ b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ComparisonFunctions.java
@@ -10,6 +10,8 @@ import org.apache.drill.exec.expr.annotations.Output;
import org.apache.drill.exec.expr.annotations.Param;
import org.apache.drill.exec.vector.IntHolder;
import org.apache.drill.exec.vector.BigIntHolder;
+import org.apache.drill.exec.vector.Float4Holder;
+import org.apache.drill.exec.vector.Float8Holder;
import org.apache.drill.exec.vector.BitHolder;
import org.apache.drill.exec.record.RecordBatch;
@@ -33,7 +35,7 @@ public class ComparisonFunctions {
}
@FunctionTemplate(name = "equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
- public static class LongEqual implements DrillFunc {
+ public static class BigIntEqual implements DrillFunc {
@Param BigIntHolder left;
@Param BigIntHolder right;
@@ -46,6 +48,34 @@ public class ComparisonFunctions {
}
}
+ @FunctionTemplate(name = "equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float4Equal implements DrillFunc {
+
+ @Param Float4Holder left;
+ @Param Float4Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value == right.value) ? 1 : 0;
+ }
+ }
+
+ @FunctionTemplate(name = "equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float8Equal implements DrillFunc {
+
+ @Param Float8Holder left;
+ @Param Float8Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value == right.value) ? 1 : 0;
+ }
+ }
+
@FunctionTemplate(name = "not equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
public static class IntNotEqual implements DrillFunc {
@@ -61,7 +91,7 @@ public class ComparisonFunctions {
}
@FunctionTemplate(name = "not equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
- public static class LongNotEqual implements DrillFunc {
+ public static class BigIntNotEqual implements DrillFunc {
@Param BigIntHolder left;
@Param BigIntHolder right;
@@ -74,6 +104,34 @@ public class ComparisonFunctions {
}
}
+ @FunctionTemplate(name = "not equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float4NotEqual implements DrillFunc {
+
+ @Param Float4Holder left;
+ @Param Float4Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value != right.value) ? 1 : 0;
+ }
+ }
+
+ @FunctionTemplate(name = "not equal", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float8NotEqual implements DrillFunc {
+
+ @Param Float8Holder left;
+ @Param Float8Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value != right.value) ? 1 : 0;
+ }
+ }
+
@FunctionTemplate(name = "greater than", scope = FunctionTemplate.FunctionScope.SIMPLE)
public static class IntGreaterThan implements DrillFunc {
@@ -89,7 +147,7 @@ public class ComparisonFunctions {
}
@FunctionTemplate(name = "greater than", scope = FunctionTemplate.FunctionScope.SIMPLE)
- public static class LongGreaterThan implements DrillFunc {
+ public static class BigIntGreaterThan implements DrillFunc {
@Param BigIntHolder left;
@Param BigIntHolder right;
@@ -102,6 +160,34 @@ public class ComparisonFunctions {
}
}
+ @FunctionTemplate(name = "greater than", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float4GreaterThan implements DrillFunc {
+
+ @Param Float4Holder left;
+ @Param Float4Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value > right.value) ? 1 : 0;
+ }
+ }
+
+ @FunctionTemplate(name = "greater than", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float8GreaterThan implements DrillFunc {
+
+ @Param Float8Holder left;
+ @Param Float8Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value > right.value) ? 1 : 0;
+ }
+ }
+
@FunctionTemplate(name = "greater than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
public static class IntGreaterThanEqual implements DrillFunc {
@@ -117,7 +203,7 @@ public class ComparisonFunctions {
}
@FunctionTemplate(name = "greater than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
- public static class LongGreaterThanEqual implements DrillFunc {
+ public static class BigIntGreaterThanEqual implements DrillFunc {
@Param BigIntHolder left;
@Param BigIntHolder right;
@@ -130,6 +216,34 @@ public class ComparisonFunctions {
}
}
+ @FunctionTemplate(name = "greater than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float4GreaterThanEqual implements DrillFunc {
+
+ @Param Float4Holder left;
+ @Param Float4Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value >= right.value) ? 1 : 0;
+ }
+ }
+
+ @FunctionTemplate(name = "greater than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float8GreaterThanEqual implements DrillFunc {
+
+ @Param Float8Holder left;
+ @Param Float8Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value >= right.value) ? 1 : 0;
+ }
+ }
+
@FunctionTemplate(name = "less than", scope = FunctionTemplate.FunctionScope.SIMPLE)
public static class IntLessThan implements DrillFunc {
@@ -145,7 +259,7 @@ public class ComparisonFunctions {
}
@FunctionTemplate(name = "less than", scope = FunctionTemplate.FunctionScope.SIMPLE)
- public static class LongLessThan implements DrillFunc {
+ public static class BigIntLessThan implements DrillFunc {
@Param BigIntHolder left;
@Param BigIntHolder right;
@@ -158,6 +272,34 @@ public class ComparisonFunctions {
}
}
+ @FunctionTemplate(name = "less than", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float4LessThan implements DrillFunc {
+
+ @Param Float4Holder left;
+ @Param Float4Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value < right.value) ? 1 : 0;
+ }
+ }
+
+ @FunctionTemplate(name = "less than", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float8LessThan implements DrillFunc {
+
+ @Param Float8Holder left;
+ @Param Float8Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value < right.value) ? 1 : 0;
+ }
+ }
+
@FunctionTemplate(name = "less than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
public static class IntLessThanEqual implements DrillFunc {
@@ -173,7 +315,7 @@ public class ComparisonFunctions {
}
@FunctionTemplate(name = "less than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
- public static class LongLessThanEqual implements DrillFunc {
+ public static class BigIntLessThanEqual implements DrillFunc {
@Param BigIntHolder left;
@Param BigIntHolder right;
@@ -185,4 +327,32 @@ public class ComparisonFunctions {
out.value = (left.value <= right.value) ? 1 : 0;
}
}
+
+ @FunctionTemplate(name = "less than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float4LessThanEqual implements DrillFunc {
+
+ @Param Float4Holder left;
+ @Param Float4Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value <= right.value) ? 1 : 0;
+ }
+ }
+
+ @FunctionTemplate(name = "less than or equal to", scope = FunctionTemplate.FunctionScope.SIMPLE)
+ public static class Float8LessThanEqual implements DrillFunc {
+
+ @Param Float8Holder left;
+ @Param Float8Holder right;
+ @Output BitHolder out;
+
+ public void setup(RecordBatch b) {}
+
+ public void eval() {
+ out.value = (left.value <= right.value) ? 1 : 0;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
index 2e0e106..a52e1d6 100644
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
+++ b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java
@@ -56,7 +56,7 @@ public class TestComparisonFunctions {
}
@Test
- public void testLongEqual(@Injectable final DrillbitContext bitContext,
+ public void testBigIntEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
new NonStrictExpectations(){{
@@ -83,6 +83,60 @@ public class TestComparisonFunctions {
}
@Test
+ public void testFloat4Equal(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float4Equal.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(100, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
+ public void testFloat8Equal(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float8Equal.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(100, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
public void testIntNotEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
@@ -110,7 +164,7 @@ public class TestComparisonFunctions {
}
@Test
- public void testLongNotEqual(@Injectable final DrillbitContext bitContext,
+ public void testBigIntNotEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
new NonStrictExpectations(){{
@@ -137,6 +191,60 @@ public class TestComparisonFunctions {
}
@Test
+ public void testFloat4NotEqual(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float4NotEqual.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(0, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
+ public void testFloat8NotEqual(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float8NotEqual.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(0, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
public void testIntGreaterThan(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
@@ -164,7 +272,7 @@ public class TestComparisonFunctions {
}
@Test
- public void testLongGreaterThan(@Injectable final DrillbitContext bitContext,
+ public void testBigIntGreaterThan(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
new NonStrictExpectations(){{
@@ -191,6 +299,60 @@ public class TestComparisonFunctions {
}
@Test
+ public void testFloat4GreaterThan(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float4GreaterThan.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(0, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
+ public void testFloat8GreaterThan(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/Float8GreaterThan.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(0, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
public void testIntGreaterThanEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
@@ -218,7 +380,7 @@ public class TestComparisonFunctions {
}
@Test
- public void testLongGreaterThanEqual(@Injectable final DrillbitContext bitContext,
+ public void testBigIntGreaterThanEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
new NonStrictExpectations(){{
@@ -245,6 +407,60 @@ public class TestComparisonFunctions {
}
@Test
+ public void testFloat4GreaterThanEqual(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float4GreaterThanEqual.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(100, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
+ public void testFloat8GreaterThanEqual(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float8GreaterThanEqual.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(100, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
public void testIntLessThan(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
@@ -272,7 +488,7 @@ public class TestComparisonFunctions {
}
@Test
- public void testLongLessThan(@Injectable final DrillbitContext bitContext,
+ public void testBigIntLessThan(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
new NonStrictExpectations(){{
@@ -299,6 +515,60 @@ public class TestComparisonFunctions {
}
@Test
+ public void testFloat4LessThan(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float4LessThan.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(0, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
+ public void testFloat8LessThan(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float8LessThan.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(0, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
public void testIntLessThanEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
@@ -326,7 +596,7 @@ public class TestComparisonFunctions {
}
@Test
- public void testLongLessThanEqual(@Injectable final DrillbitContext bitContext,
+ public void testBigIntLessThanEqual(@Injectable final DrillbitContext bitContext,
@Injectable UserServer.UserClientConnection connection) throws Throwable{
new NonStrictExpectations(){{
@@ -352,6 +622,60 @@ public class TestComparisonFunctions {
}
+ @Test
+ public void testFloat4LessThanEqual(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float4LessThanEqual.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(100, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
+ @Test
+ public void testFloat8LessThanEqual(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ PhysicalPlanReader reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ PhysicalPlan plan = reader.readPhysicalPlan(Files.toString(FileUtils.getResourceAsFile("/functions/float8LessThanEqual.json"), Charsets.UTF_8));
+ FunctionImplementationRegistry registry = new FunctionImplementationRegistry(c);
+ FragmentContext context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(100, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+
+ }
+
@After
public void tearDown() throws Exception{
// pause to get logger to catch up.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4Equal.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4Equal.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4Equal.json
new file mode 100644
index 0000000..612b2b4
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4Equal.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue == blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThan.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThan.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThan.json
new file mode 100644
index 0000000..dcbad4c
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThan.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue > blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThanEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThanEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThanEqual.json
new file mode 100644
index 0000000..b5c0d54
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThanEqual.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue >= blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThan.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThan.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThan.json
new file mode 100644
index 0000000..06aafd9
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThan.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue < blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThanEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThanEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThanEqual.json
new file mode 100644
index 0000000..92a27ac
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThanEqual.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue <= blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4NotEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4NotEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4NotEqual.json
new file mode 100644
index 0000000..0b97545
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4NotEqual.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue <> blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8Equal.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8Equal.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8Equal.json
new file mode 100644
index 0000000..1aa93ea
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8Equal.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue == blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThan.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThan.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThan.json
new file mode 100644
index 0000000..ddccef1
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThan.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue > blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThanEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThanEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThanEqual.json
new file mode 100644
index 0000000..665759f
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThanEqual.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue >= blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThan.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThan.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThan.json
new file mode 100644
index 0000000..b86b118
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThan.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue < blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThanEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThanEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThanEqual.json
new file mode 100644
index 0000000..7f622fd
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThanEqual.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue <= blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fdb5c41e/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8NotEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8NotEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8NotEqual.json
new file mode 100644
index 0000000..fdff828
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8NotEqual.json
@@ -0,0 +1,35 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "blue", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "red", type: "BIGINT", mode: "REQUIRED"},
+ {name: "yellow", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "green", type: "INT", mode: "REQUIRED"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "blue <> blue"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file