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/16 03:44:55 UTC
[17/27] git commit: cleanup comparison function tests. use a single
json file, and abstract out redundant code.
cleanup comparison function tests. use a single json file, and abstract out redundant code.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/be77d5aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/be77d5aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/be77d5aa
Branch: refs/heads/master
Commit: be77d5aaab5ac24b99ea6f28712537cc49b43949
Parents: 2884db7
Author: Steven Phillips <sp...@maprtech.com>
Authored: Thu Aug 15 18:23:07 2013 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Thu Aug 15 18:23:07 2013 -0700
----------------------------------------------------------------------
.../physical/impl/TestComparisonFunctions.java | 749 +++----------------
.../impl/TestComparisonFunctionsNullable.java | 354 ---------
.../resources/functions/comparisonTest.json | 39 +
.../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 -
.../src/test/resources/functions/intEqual.json | 35 -
.../resources/functions/intGreaterThan.json | 35 -
.../functions/intGreaterThanEqual.json | 35 -
.../test/resources/functions/intLessThan.json | 35 -
.../resources/functions/intLessThanEqual.json | 35 -
.../test/resources/functions/intNotEqual.json | 35 -
.../src/test/resources/functions/longEqual.json | 35 -
.../resources/functions/longGreaterThan.json | 35 -
.../functions/longGreaterThanEqual.json | 35 -
.../test/resources/functions/longLessThan.json | 35 -
.../resources/functions/longLessThanEqual.json | 35 -
.../test/resources/functions/longNotEqual.json | 35 -
.../functions/nullableBigIntEqual.json | 35 -
.../functions/nullableBigIntGreaterThan.json | 35 -
.../nullableBigIntGreaterThanEqual.json | 35 -
.../functions/nullableBigIntLessThan.json | 35 -
.../functions/nullableBigIntLessThanEqual.json | 35 -
.../functions/nullableBigIntNotEqual.json | 35 -
.../resources/functions/nullableIntEqual.json | 35 -
.../functions/nullableIntGreaterThan.json | 35 -
.../functions/nullableIntGreaterThanEqual.json | 35 -
.../functions/nullableIntLessThan.json | 35 -
.../functions/nullableIntLessThanEqual.json | 35 -
.../functions/nullableIntNotEqual.json | 35 -
39 files changed, 136 insertions(+), 2266 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/be77d5aa/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 4aa4dae..ff67cf2 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
@@ -1,14 +1,13 @@
package org.apache.drill.exec.physical.impl;
import com.google.common.base.Charsets;
-import com.google.common.io.Files;
+import com.google.common.io.Resources;
import com.yammer.metrics.MetricRegistry;
import mockit.Injectable;
import mockit.NonStrictExpectations;
import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.common.util.FileUtils;
import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
import org.apache.drill.exec.memory.BufferAllocator;
import org.apache.drill.exec.ops.FragmentContext;
@@ -19,7 +18,6 @@ import org.apache.drill.exec.proto.CoordinationProtos;
import org.apache.drill.exec.proto.ExecProtos;
import org.apache.drill.exec.rpc.user.UserServer;
import org.apache.drill.exec.server.DrillbitContext;
-import org.junit.After;
import org.junit.AfterClass;
import org.junit.Test;
@@ -29,655 +27,102 @@ import static org.junit.Assert.assertTrue;
public class TestComparisonFunctions {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestComparisonFunctions.class);
- DrillConfig c = DrillConfig.create();
-
- @Test
- public void testIntEqual(@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/intEqual.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 testBigIntEqual(@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/longEqual.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 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{
-
- 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/intNotEqual.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 testBigIntNotEqual(@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/longNotEqual.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 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{
-
- 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/intGreaterThan.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 testBigIntGreaterThan(@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/longGreaterThan.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 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{
-
- 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/intGreaterThanEqual.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 testBigIntGreaterThanEqual(@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/longGreaterThanEqual.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 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{
-
- 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/intLessThan.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 testBigIntLessThan(@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/longLessThan.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 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{
-
- 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/intLessThanEqual.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 testBigIntLessThanEqual(@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/longLessThanEqual.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 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());
-
- }
+ DrillConfig c = DrillConfig.create();
+ String COMPARISON_TEST_PHYSICAL_PLAN = "functions/comparisonTest.json";
+ PhysicalPlanReader reader;
+ FunctionImplementationRegistry registry;
+ FragmentContext context;
+
+ public void runTest(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection, String expression, int expectedResults) throws Throwable {
+
+ new NonStrictExpectations(){{
+ bitContext.getMetrics(); result = new MetricRegistry("test");
+ bitContext.getAllocator(); result = BufferAllocator.getAllocator(c);
+ }};
+
+ String planString = Resources.toString(Resources.getResource(COMPARISON_TEST_PHYSICAL_PLAN), Charsets.UTF_8).replaceAll("EXPRESSION", expression);
+ if(reader == null) reader = new PhysicalPlanReader(c, c.getMapper(), CoordinationProtos.DrillbitEndpoint.getDefaultInstance());
+ if(registry == null) registry = new FunctionImplementationRegistry(c);
+ if(context == null) context = new FragmentContext(bitContext, ExecProtos.FragmentHandle.getDefaultInstance(), connection, null, registry);
+ PhysicalPlan plan = reader.readPhysicalPlan(planString);
+ SimpleRootExec exec = new SimpleRootExec(ImplCreator.getExec(context, (FragmentRoot) plan.getSortedOperators(false).iterator().next()));
+
+ while(exec.next()){
+ assertEquals(String.format("Expression: %s;", expression), expectedResults, exec.getSelectionVector2().getCount());
+ }
+
+ if(context.getFailureCause() != null){
+ throw context.getFailureCause();
+ }
+
+ assertTrue(!context.isFailed());
+ }
+
+ @Test
+ public void testInt(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+ runTest(bitContext, connection, "intColumn == intColumn", 100);
+ runTest(bitContext, connection, "intColumn != intColumn", 0);
+ runTest(bitContext, connection, "intColumn > intColumn", 0);
+ runTest(bitContext, connection, "intColumn < intColumn", 0);
+ runTest(bitContext, connection, "intColumn >= intColumn", 100);
+ runTest(bitContext, connection, "intColumn <= intColumn", 100);
+ }
+
+ @Test
+ public void testBigInt(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+ runTest(bitContext, connection, "bigIntColumn == bigIntColumn", 100);
+ runTest(bitContext, connection, "bigIntColumn != bigIntColumn", 0);
+ runTest(bitContext, connection, "bigIntColumn > bigIntColumn", 0);
+ runTest(bitContext, connection, "bigIntColumn < bigIntColumn", 0);
+ runTest(bitContext, connection, "bigIntColumn >= bigIntColumn", 100);
+ runTest(bitContext, connection, "bigIntColumn <= bigIntColumn", 100);
+ }
+
+ @Test
+ public void testFloat4(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+ runTest(bitContext, connection, "float4Column == float4Column", 100);
+ runTest(bitContext, connection, "float4Column != float4Column", 0);
+ runTest(bitContext, connection, "float4Column > float4Column", 0);
+ runTest(bitContext, connection, "float4Column < float4Column", 0);
+ runTest(bitContext, connection, "float4Column >= float4Column", 100);
+ runTest(bitContext, connection, "float4Column <= float4Column", 100);
+ }
+
+ @Test
+ public void testFloat8(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+ runTest(bitContext, connection, "float8Column == float8Column", 100);
+ runTest(bitContext, connection, "float8Column != float8Column", 0);
+ runTest(bitContext, connection, "float8Column > float8Column", 0);
+ runTest(bitContext, connection, "float8Column < float8Column", 0);
+ runTest(bitContext, connection, "float8Column >= float8Column", 100);
+ runTest(bitContext, connection, "float8Column <= float8Column", 100);
+ }
+
+ @Test
+ public void testIntNullable(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+ runTest(bitContext, connection, "intNullableColumn == intNullableColumn", 50);
+ runTest(bitContext, connection, "intNullableColumn != intNullableColumn", 0);
+ runTest(bitContext, connection, "intNullableColumn > intNullableColumn", 0);
+ runTest(bitContext, connection, "intNullableColumn < intNullableColumn", 0);
+ runTest(bitContext, connection, "intNullableColumn >= intNullableColumn", 50);
+ runTest(bitContext, connection, "intNullableColumn <= intNullableColumn", 50);
+ }
+ @Test
+ public void testBigIntNullable(@Injectable final DrillbitContext bitContext,
+ @Injectable UserServer.UserClientConnection connection) throws Throwable{
+ runTest(bitContext, connection, "bigIntNullableColumn == bigIntNullableColumn", 50);
+ runTest(bitContext, connection, "bigIntNullableColumn != bigIntNullableColumn", 0);
+ runTest(bitContext, connection, "bigIntNullableColumn > bigIntNullableColumn", 0);
+ runTest(bitContext, connection, "bigIntNullableColumn < bigIntNullableColumn", 0);
+ runTest(bitContext, connection, "bigIntNullableColumn >= bigIntNullableColumn", 50);
+ runTest(bitContext, connection, "bigIntNullableColumn <= bigIntNullableColumn", 50);
+ }
@AfterClass
public static void tearDown() throws Exception{
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/be77d5aa/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java b/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
deleted file mode 100644
index 362fc2b..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctionsNullable.java
+++ /dev/null
@@ -1,354 +0,0 @@
-package org.apache.drill.exec.physical.impl;
-
-import com.google.common.base.Charsets;
-import com.google.common.io.Files;
-import com.yammer.metrics.MetricRegistry;
-
-import mockit.Injectable;
-import mockit.NonStrictExpectations;
-
-import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.common.util.FileUtils;
-import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
-import org.apache.drill.exec.memory.BufferAllocator;
-import org.apache.drill.exec.ops.FragmentContext;
-import org.apache.drill.exec.physical.PhysicalPlan;
-import org.apache.drill.exec.physical.base.FragmentRoot;
-import org.apache.drill.exec.planner.PhysicalPlanReader;
-import org.apache.drill.exec.proto.CoordinationProtos;
-import org.apache.drill.exec.proto.ExecProtos;
-import org.apache.drill.exec.rpc.user.UserServer;
-import org.apache.drill.exec.server.DrillbitContext;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-public class TestComparisonFunctionsNullable {
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestComparisonFunctionsNullable.class);
-
- DrillConfig c = DrillConfig.create();
- @Test
- public void testNullableIntEqual(@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/nullableIntEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
-
- }
-
- @Test
- public void testNullableBigIntEqual(@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/nullableBigIntEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
-
- }
-
- @Test
- public void testNullableIntNotEqual(@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/nullableIntNotEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
-
- }
-
- @Test
- public void testNullableBigIntNotEqual(@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/nullableBigIntNotEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
-
- }
-
- @Test
- public void testNullableIntLessThan(@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/nullableIntLessThan.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 testNullableBigIntLessThan(@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/nullableBigIntLessThan.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
- }
-
- @Test
- public void testNullableIntLessThanEqual(@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/nullableIntLessThanEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
- }
-
- @Test
- public void testNullableBigIntLessThanEqual(@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/nullableBigIntLessThanEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
- }
-
- @Test
- public void testNullableIntGreaterThan(@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/nullableIntGreaterThan.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 testNullableBigIntGreaterThan(@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/nullableBigIntGreaterThan.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 testNullableIntGreaterThanEqual(@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/nullableIntGreaterThanEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
- }
-
- @Test
- public void testNullableBigIntGreaterThanEqual(@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/nullableBigIntGreaterThanEqual.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(50, exec.getSelectionVector2().getCount());
- }
-
- if(context.getFailureCause() != null){
- throw context.getFailureCause();
- }
-
- assertTrue(!context.isFailed());
- }
-
- @AfterClass
- public static void tearDown() throws Exception{
- // pause to get logger to catch up.
- Thread.sleep(1000);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/comparisonTest.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/comparisonTest.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/comparisonTest.json
new file mode 100644
index 0000000..eac6e68
--- /dev/null
+++ b/sandbox/prototype/exec/java-exec/src/test/resources/functions/comparisonTest.json
@@ -0,0 +1,39 @@
+{
+ head:{
+ type:"APACHE_DRILL_PHYSICAL",
+ version:"1",
+ generator:{
+ type:"manual"
+ }
+ },
+ graph:[
+ {
+ @id:1,
+ pop:"mock-sub-scan",
+ url: "http://apache.org",
+ entries:[
+ {records: 100, types: [
+ {name: "intColumn", type: "INT", mode: "REQUIRED"},
+ {name: "bigIntColumn", type: "BIGINT", mode: "REQUIRED"},
+ {name: "float4Column", type: "FLOAT4", mode: "REQUIRED"},
+ {name: "float8Column", type: "FLOAT8", mode: "REQUIRED"},
+ {name: "intNullableColumn", type: "INT", mode: "OPTIONAL"},
+ {name: "bigIntNullableColumn", type: "BIGINT", mode: "OPTIONAL"},
+ {name: "float4NullableColumn", type: "FLOAT4", mode: "OPTIONAL"},
+ {name: "float8NullableColumn", type: "FLOAT8", mode: "OPTIONAL"}
+ ]}
+ ]
+ },
+ {
+ @id:2,
+ child: 1,
+ pop:"filter",
+ expr: "EXPRESSION"
+ },
+ {
+ @id: 3,
+ child: 2,
+ pop: "screen"
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/be77d5aa/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
deleted file mode 100644
index 7ebe3dd..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4Equal.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index de300d7..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThan.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index 51f0a13..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4GreaterThanEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index 95ef169..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThan.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index b58d3b6..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4LessThanEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index ba001d4..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float4NotEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index 9edfd51..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8Equal.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index 08bb328..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThan.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index 67afb47..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8GreaterThanEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index af485b2..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThan.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index 6f5a21e..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8LessThanEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/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
deleted file mode 100644
index cf3d053..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/float8NotEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-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/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/intEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/intEqual.json
deleted file mode 100644
index a1d96ec..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-scan",
- url: "http://apache.org",
- entries:[
- {records: 100, types: [
- {name: "blue", type: "INT", mode: "REQUIRED"},
- {name: "red", type: "BIGINT", mode: "REQUIRED"},
- {name: "yellow", type: "FLOAT8", 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/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThan.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThan.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThan.json
deleted file mode 100644
index 9e21f4b..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThan.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-scan",
- url: "http://apache.org",
- entries:[
- {records: 100, types: [
- {name: "blue", type: "INT", mode: "REQUIRED"},
- {name: "red", type: "BIGINT", mode: "REQUIRED"},
- {name: "yellow", type: "FLOAT8", 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/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThanEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThanEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThanEqual.json
deleted file mode 100644
index 9692f82..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intGreaterThanEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-scan",
- url: "http://apache.org",
- entries:[
- {records: 100, types: [
- {name: "blue", type: "INT", mode: "REQUIRED"},
- {name: "red", type: "BIGINT", mode: "REQUIRED"},
- {name: "yellow", type: "FLOAT8", 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/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThan.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThan.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThan.json
deleted file mode 100644
index d2ec94a..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThan.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-scan",
- url: "http://apache.org",
- entries:[
- {records: 100, types: [
- {name: "blue", type: "INT", mode: "REQUIRED"},
- {name: "red", type: "BIGINT", mode: "REQUIRED"},
- {name: "yellow", type: "FLOAT8", 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/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThanEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThanEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThanEqual.json
deleted file mode 100644
index 834cf7e..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intLessThanEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-scan",
- url: "http://apache.org",
- entries:[
- {records: 100, types: [
- {name: "blue", type: "INT", mode: "REQUIRED"},
- {name: "red", type: "BIGINT", mode: "REQUIRED"},
- {name: "yellow", type: "FLOAT8", 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/be77d5aa/sandbox/prototype/exec/java-exec/src/test/resources/functions/intNotEqual.json
----------------------------------------------------------------------
diff --git a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intNotEqual.json b/sandbox/prototype/exec/java-exec/src/test/resources/functions/intNotEqual.json
deleted file mode 100644
index ceb2913..0000000
--- a/sandbox/prototype/exec/java-exec/src/test/resources/functions/intNotEqual.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- head:{
- type:"APACHE_DRILL_PHYSICAL",
- version:"1",
- generator:{
- type:"manual"
- }
- },
- graph:[
- {
- @id:1,
- pop:"mock-sub-scan",
- url: "http://apache.org",
- entries:[
- {records: 100, types: [
- {name: "blue", type: "INT", mode: "REQUIRED"},
- {name: "red", type: "BIGINT", mode: "REQUIRED"},
- {name: "yellow", type: "FLOAT8", 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