You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ve...@apache.org on 2015/06/13 01:33:29 UTC
[1/2] drill git commit: DRILL-3273: Pass an empty DeferredObject to
Hive UDFs for null argument value
Repository: drill
Updated Branches:
refs/heads/master 45a82c457 -> d5dc322d5
DRILL-3273: Pass an empty DeferredObject to Hive UDFs for null argument value
+ Handle nulls in ObjectInspector implementations for Drill types.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/50116591
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/50116591
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/50116591
Branch: refs/heads/master
Commit: 501165914458942f8cdb3f80bd9f953facd2dcb8
Parents: 45a82c4
Author: vkorukanti <ve...@gmail.com>
Authored: Wed Jun 10 15:54:06 2015 -0700
Committer: vkorukanti <ve...@gmail.com>
Committed: Fri Jun 12 14:23:32 2015 -0700
----------------------------------------------------------------------
.../codegen/templates/ObjectInspectors.java | 319 +++++++++++--------
.../drill/exec/expr/fn/HiveFuncHolder.java | 4 +-
.../drill/exec/fn/hive/HiveTestUDFImpls.java | 2 +-
.../drill/exec/fn/hive/TestInbuiltHiveUDFs.java | 46 +++
.../drill/exec/fn/hive/TestSampleHiveUDFs.java | 4 +-
.../apache/drill/exec/hive/TestHiveStorage.java | 6 +-
.../exec/store/hive/HiveTestDataGenerator.java | 3 +-
7 files changed, 243 insertions(+), 141 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/main/codegen/templates/ObjectInspectors.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/main/codegen/templates/ObjectInspectors.java b/contrib/storage-hive/core/src/main/codegen/templates/ObjectInspectors.java
index 022806a..10379ff 100644
--- a/contrib/storage-hive/core/src/main/codegen/templates/ObjectInspectors.java
+++ b/contrib/storage-hive/core/src/main/codegen/templates/ObjectInspectors.java
@@ -46,205 +46,264 @@ import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
-public abstract class Drill${entry.drillType}ObjectInspector extends AbstractDrillPrimitiveObjectInspector
- implements ${entry.hiveOI} {
+public class Drill${entry.drillType}ObjectInspector {
+<#assign seq = ["Required", "Optional"]>
+<#list seq as mode>
- public Drill${entry.drillType}ObjectInspector() {
- super(TypeInfoFactory.${entry.hiveType?lower_case}TypeInfo);
- }
+ public static class ${mode} extends AbstractDrillPrimitiveObjectInspector implements ${entry.hiveOI} {
+ public ${mode}() {
+ super(TypeInfoFactory.${entry.hiveType?lower_case}TypeInfo);
+ }
<#if entry.drillType == "VarChar">
- @Override
- public HiveVarcharWritable getPrimitiveWritableObject(Object o) {
- HiveVarcharWritable valW = new HiveVarcharWritable();
- valW.set(getPrimitiveJavaObject(o));
- return valW;
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector {
@Override
- public HiveVarchar getPrimitiveJavaObject(Object o) {
- VarCharHolder h = (VarCharHolder)o;
- String s = StringFunctionHelpers.toStringFromUTF8(h.start, h.end, h.buffer);
- return new HiveVarchar(s, HiveVarchar.MAX_VARCHAR_LENGTH);
+ public HiveVarcharWritable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableVarCharHolder h = (NullableVarCharHolder)o;
+ <#else>
+ final VarCharHolder h = (VarCharHolder)o;
+ </#if>
+ final HiveVarcharWritable valW = new HiveVarcharWritable();
+ valW.set(StringFunctionHelpers.toStringFromUTF8(h.start, h.end, h.buffer), HiveVarchar.MAX_VARCHAR_LENGTH);
+ return valW;
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector {
@Override
public HiveVarchar getPrimitiveJavaObject(Object o) {
- NullableVarCharHolder h = (NullableVarCharHolder)o;
- String s = h.isSet == 0 ? null : StringFunctionHelpers.toStringFromUTF8(h.start, h.end, h.buffer);
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableVarCharHolder h = (NullableVarCharHolder)o;
+ <#else>
+ final VarCharHolder h = (VarCharHolder)o;
+ </#if>
+ final String s = StringFunctionHelpers.toStringFromUTF8(h.start, h.end, h.buffer);
return new HiveVarchar(s, HiveVarchar.MAX_VARCHAR_LENGTH);
}
- }
-
<#elseif entry.drillType == "Var16Char">
-@Override
- public Text getPrimitiveWritableObject(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector {
@Override
- public String getPrimitiveJavaObject(Object o){
- Var16CharHolder h = (Var16CharHolder)o;
- String s = StringFunctionHelpers.toStringFromUTF16(h.start, h.end, h.buffer);
- return s;
+ public Text getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableVar16CharHolder h = (NullableVar16CharHolder)o;
+ <#else>
+ final Var16CharHolder h = (Var16CharHolder)o;
+ </#if>
+ return new Text(StringFunctionHelpers.toStringFromUTF16(h.start, h.end, h.buffer));
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector {
@Override
public String getPrimitiveJavaObject(Object o){
- NullableVar16CharHolder h = (NullableVar16CharHolder)o;
- String s = h.isSet == 0 ? null : StringFunctionHelpers.toStringFromUTF16(h.start, h.end, h.buffer);
- return s;
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableVar16CharHolder h = (NullableVar16CharHolder)o;
+ <#else>
+ final Var16CharHolder h = (Var16CharHolder)o;
+ </#if>
+ return StringFunctionHelpers.toStringFromUTF16(h.start, h.end, h.buffer);
}
- }
<#elseif entry.drillType == "VarBinary">
- @Override
- public BytesWritable getPrimitiveWritableObject(Object o) {
- return new BytesWritable(getPrimitiveJavaObject(o));
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector {
@Override
- public byte[] getPrimitiveJavaObject(Object o) {
- VarBinaryHolder h = (VarBinaryHolder)o;
- byte[] buf = new byte[h.end-h.start];
+ public BytesWritable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableVarBinaryHolder h = (NullableVarBinaryHolder)o;
+ <#else>
+ final VarBinaryHolder h = (VarBinaryHolder)o;
+ </#if>
+ final byte[] buf = new byte[h.end-h.start];
h.buffer.getBytes(h.start, buf, 0, h.end-h.start);
- return buf;
+ return new BytesWritable(buf);
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector {
@Override
public byte[] getPrimitiveJavaObject(Object o) {
- NullableVarBinaryHolder h = (NullableVarBinaryHolder)o;
- byte[] buf = new byte[h.end-h.start];
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableVarBinaryHolder h = (NullableVarBinaryHolder)o;
+ <#else>
+ final VarBinaryHolder h = (VarBinaryHolder)o;
+ </#if>
+ final byte[] buf = new byte[h.end-h.start];
h.buffer.getBytes(h.start, buf, 0, h.end-h.start);
return buf;
}
- }
-
<#elseif entry.drillType == "Bit">
- public static class Required extends Drill${entry.drillType}ObjectInspector {
@Override
public boolean get(Object o) {
+ <#if mode == "Optional">
+ return ((NullableBitHolder)o).value == 0 ? false : true;
+ <#else>
return ((BitHolder)o).value == 0 ? false : true;
+ </#if>
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector {
@Override
- public boolean get(Object o) {
- return ((NullableBitHolder)o).value == 0 ? false : true;
+ public BooleanWritable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ return new BooleanWritable(((NullableBitHolder)o).value == 0 ? false : true);
+ <#else>
+ return new BooleanWritable(((BitHolder)o).value == 0 ? false : true);
+ </#if>
}
- }
-
- @Override
- public BooleanWritable getPrimitiveWritableObject(Object o) {
- return new BooleanWritable(get(o));
- }
-
- @Override
- public Boolean getPrimitiveJavaObject(Object o) {
- return new Boolean(get(o));
- }
+ @Override
+ public Boolean getPrimitiveJavaObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ return new Boolean(((NullableBitHolder)o).value == 0 ? false : true);
+ <#else>
+ return new Boolean(((BitHolder)o).value == 0 ? false : true);
+ </#if>
+ }
<#elseif entry.drillType == "Decimal38Sparse">
- public HiveDecimalWritable getPrimitiveWritableObject(Object o) {
- return new HiveDecimalWritable(getPrimitiveJavaObject(o));
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector{
@Override
public HiveDecimal getPrimitiveJavaObject(Object o){
- Decimal38SparseHolder h = (Decimal38SparseHolder) o;
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableDecimal38SparseHolder h = (NullableDecimal38SparseHolder) o;
+ <#else>
+ final Decimal38SparseHolder h = (Decimal38SparseHolder) o;
+ </#if>
return HiveDecimal.create(DecimalUtility.getBigDecimalFromSparse(h.buffer, h.start, h.nDecimalDigits, h.scale));
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector{
@Override
- public HiveDecimal getPrimitiveJavaObject(Object o){
- NullableDecimal38SparseHolder h = (NullableDecimal38SparseHolder) o;
- return HiveDecimal.create(DecimalUtility.getBigDecimalFromSparse(h.buffer, h.start, h.nDecimalDigits, h.scale));
+ public HiveDecimalWritable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableDecimal38SparseHolder h = (NullableDecimal38SparseHolder) o;
+ <#else>
+ final Decimal38SparseHolder h = (Decimal38SparseHolder) o;
+ </#if>
+ return new HiveDecimalWritable(
+ HiveDecimal.create(DecimalUtility.getBigDecimalFromSparse(h.buffer, h.start, h.nDecimalDigits, h.scale)));
}
- }
<#elseif entry.drillType == "TimeStamp">
- @Override
- public TimestampWritable getPrimitiveWritableObject(Object o) {
- return new TimestampWritable(getPrimitiveJavaObject(o));
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector{
@Override
public java.sql.Timestamp getPrimitiveJavaObject(Object o){
- return new java.sql.Timestamp(((TimeStampHolder)o).value);
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableTimeStampHolder h = (NullableTimeStampHolder) o;
+ <#else>
+ final TimeStampHolder h = (TimeStampHolder) o;
+ </#if>
+ return new java.sql.Timestamp(h.value);
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector{
@Override
- public java.sql.Timestamp getPrimitiveJavaObject(Object o){
- return new java.sql.Timestamp(((NullableTimeStampHolder)o).value);
+ public TimestampWritable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableTimeStampHolder h = (NullableTimeStampHolder) o;
+ <#else>
+ final TimeStampHolder h = (TimeStampHolder) o;
+ </#if>
+ return new TimestampWritable(new java.sql.Timestamp(h.value));
}
- }
<#elseif entry.drillType == "Date">
- @Override
- public DateWritable getPrimitiveWritableObject(Object o) {
- return new DateWritable(getPrimitiveJavaObject(o));
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector{
@Override
public java.sql.Date getPrimitiveJavaObject(Object o){
- return new java.sql.Date(((DateHolder)o).value);
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableDateHolder h = (NullableDateHolder) o;
+ <#else>
+ final DateHolder h = (DateHolder) o;
+ </#if>
+ return new java.sql.Date(h.value);
}
- }
- public static class Optional extends Drill${entry.drillType}ObjectInspector{
@Override
- public java.sql.Date getPrimitiveJavaObject(Object o){
- return new java.sql.Date(((NullableDateHolder)o).value);
+ public DateWritable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final NullableDateHolder h = (NullableDateHolder) o;
+ <#else>
+ final DateHolder h = (DateHolder) o;
+ </#if>
+ return new DateWritable(new java.sql.Date(h.value));
}
- }
+
<#else>
+ @Override
+ public ${entry.javaType} get(Object o){
+ <#if mode == "Optional">
+ return ((Nullable${entry.drillType}Holder)o).value;
+ <#else>
+ return ((${entry.drillType}Holder)o).value;
+ </#if>
+ }
+
<#if entry.drillType == "Int">
- @Override
- public Integer getPrimitiveJavaObject(Object o) {
- return new Integer(get(o));
- }
+ @Override
+ public Integer getPrimitiveJavaObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ </#if>
+ return new Integer(get(o));
+ }
<#else>
- @Override
- public ${entry.javaType?cap_first} getPrimitiveJavaObject(Object o) {
- return new ${entry.javaType?cap_first}(get(o));
- }
-</#if>
-
- @Override
- public ${entry.javaType?cap_first}Writable getPrimitiveWritableObject(Object o) {
- return new ${entry.javaType?cap_first}Writable(get(o));
- }
-
- public static class Required extends Drill${entry.drillType}ObjectInspector{
@Override
- public ${entry.javaType} get(Object o){
- return((${entry.drillType}Holder)o).value;
+ public ${entry.javaType?cap_first} getPrimitiveJavaObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ return new ${entry.javaType?cap_first}(((Nullable${entry.drillType}Holder)o).value);
+ <#else>
+ return new ${entry.javaType?cap_first}(((${entry.drillType}Holder)o).value);
+ </#if>
}
- }
+</#if>
- public static class Optional extends Drill${entry.drillType}ObjectInspector{
@Override
- public ${entry.javaType} get(Object o){
- return((Nullable${entry.drillType}Holder)o).value;
+ public ${entry.javaType?cap_first}Writable getPrimitiveWritableObject(Object o) {
+ <#if mode == "Optional">
+ if (o == null) {
+ return null;
+ }
+ final Nullable${entry.drillType}Holder h = (Nullable${entry.drillType}Holder) o;
+ <#else>
+ final ${entry.drillType}Holder h = (${entry.drillType}Holder)o;
+ </#if>
+ return new ${entry.javaType?cap_first}Writable(h.value);
}
- }
</#if>
+ }
+</#list>
}
</#list>
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFuncHolder.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFuncHolder.java b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFuncHolder.java
index 1c0b02b..a6e76b0 100644
--- a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFuncHolder.java
+++ b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFuncHolder.java
@@ -242,11 +242,11 @@ public class HiveFuncHolder extends AbstractFuncHolder {
// initialize DeferredObject's. For an optional type, assign the value holder only if it is not null
for(int i=0; i<argTypes.length; i++) {
if (inputVariables[i].isOptional()) {
+ sub.assign(workspaceJVars[3].component(JExpr.lit(i)), workspaceJVars[2].component(JExpr.lit(i)));
JBlock conditionalBlock = new JBlock(false, false);
JConditional jc = conditionalBlock._if(inputVariables[i].getIsSet().ne(JExpr.lit(0)));
- jc._then().assign(workspaceJVars[3].component(JExpr.lit(i)), workspaceJVars[2].component(JExpr.lit(i)));
jc._then().assign(JExpr.ref(workspaceJVars[3].component(JExpr.lit(i)), "valueHolder"), inputVariables[i].getHolder());
- jc._else().assign(workspaceJVars[3].component(JExpr.lit(i)), JExpr._null());
+ jc._else().assign(JExpr.ref(workspaceJVars[3].component(JExpr.lit(i)), "valueHolder"), JExpr._null());
sub.add(conditionalBlock);
} else {
sub.assign(workspaceJVars[3].component(JExpr.lit(i)), workspaceJVars[2].component(JExpr.lit(i)));
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/HiveTestUDFImpls.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/HiveTestUDFImpls.java b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/HiveTestUDFImpls.java
index 8fc059b..31e4715 100644
--- a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/HiveTestUDFImpls.java
+++ b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/HiveTestUDFImpls.java
@@ -103,7 +103,7 @@ public class HiveTestUDFImpls {
@Override
public Object evaluate(DeferredObject[] arguments) throws HiveException {
- if (arguments[0] == null) {
+ if (arguments[0] == null || arguments[0].get() == null) {
return null;
}
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java
new file mode 100644
index 0000000..3ee832c
--- /dev/null
+++ b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.fn.hive;
+
+import org.apache.drill.exec.hive.HiveTestBase;
+import org.junit.Test;
+
+public class TestInbuiltHiveUDFs extends HiveTestBase {
+
+ @Test // DRILL-3273
+ public void testConcatWS() throws Exception {
+ testBuilder()
+ .sqlQuery("SELECT concat_ws(string_field, string_part, '|') as rst from hive.readtest")
+ .unOrdered()
+ .baselineColumns("rst")
+ .baselineValues("stringstringfield|")
+ .baselineValues(new Object[] { null })
+ .go();
+ }
+
+ @Test // DRILL-3273
+ public void testEncode() throws Exception {
+ testBuilder()
+ .sqlQuery("SELECT encode(varchar_field, 'UTF-8') as rst from hive.readtest")
+ .unOrdered()
+ .baselineColumns("rst")
+ .baselineValues("varcharfield")
+ .baselineValues(new Object[] { null })
+ .go();
+ }
+}
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestSampleHiveUDFs.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestSampleHiveUDFs.java b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestSampleHiveUDFs.java
index ac11752..86a78e5 100644
--- a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestSampleHiveUDFs.java
+++ b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestSampleHiveUDFs.java
@@ -91,14 +91,14 @@ public class TestSampleHiveUDFs extends HiveTestBase {
@Test
public void stringInOut() throws Exception{
String query = "SELECT testHiveUDFString(string_field) as col1 FROM hive.readtest";
- String expected = "col1\n" + "stringfield\n" + "\n";
+ String expected = "col1\n" + "stringfield\n" + "null\n";
helper(query, expected);
}
@Test
public void binaryInOut() throws Exception{
String query = "SELECT testHiveUDFBinary(binary_field) as col1 FROM hive.readtest";
- String expected = "col1\n" + "binaryfield\n" + "\n";
+ String expected = "col1\n" + "binaryfield\n" + "null\n";
helper(query, expected); helper(query, expected);
}
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/TestHiveStorage.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/TestHiveStorage.java b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/TestHiveStorage.java
index a25a524..27ba9fe 100644
--- a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/TestHiveStorage.java
+++ b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/TestHiveStorage.java
@@ -125,11 +125,7 @@ public class TestHiveStorage extends HiveTestBase {
new DateTime(Timestamp.valueOf("2013-07-05 17:01:00").getTime()),
new DateTime(Date.valueOf("2013-07-05").getTime()))
.baselineValues( // All fields are null, but partition fields have non-null values
- "", // For binary (varchar, string too) empty value is considered as empty string instead of "null"
- null, null, null, null, null, null, null, null, null, null, null, null,
- "", // string_field
- "", // varchar_field
- null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
"binary",
true,
(byte) 64,
http://git-wip-us.apache.org/repos/asf/drill/blob/50116591/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/store/hive/HiveTestDataGenerator.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/store/hive/HiveTestDataGenerator.java b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/store/hive/HiveTestDataGenerator.java
index 5b867a7..d47d035 100644
--- a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/store/hive/HiveTestDataGenerator.java
+++ b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/store/hive/HiveTestDataGenerator.java
@@ -179,7 +179,8 @@ public class HiveTestDataGenerator {
" varchar_part VARCHAR(50)," +
" timestamp_part TIMESTAMP," +
" date_part DATE" +
- ") ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE"
+ ") ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' " +
+ "TBLPROPERTIES ('serialization.null.format'='') "
);
// Add a partition to table 'readtest'
[2/2] drill git commit: DRILL-1169 (conti): Rename folder name
Posted by ve...@apache.org.
DRILL-1169 (conti): Rename folder name
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/d5dc322d
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/d5dc322d
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/d5dc322d
Branch: refs/heads/master
Commit: d5dc322d51f00f0ba9bde7022b164a409d3ca518
Parents: 5011659
Author: Hsuan-Yi Chu <hs...@usc.edu>
Authored: Fri Jun 12 15:43:53 2015 -0700
Committer: vkorukanti <ve...@gmail.com>
Committed: Fri Jun 12 15:47:48 2015 -0700
----------------------------------------------------------------------
.../org/apache/drill/TestUnionDistinct.java | 58 ++++++++++----------
.../TestUnionDistinctQueries/q1.tsv | 5 --
.../TestUnionDistinctQueries/q10.tsv | 30 ----------
.../TestUnionDistinctQueries/q11.tsv | 30 ----------
.../TestUnionDistinctQueries/q12.tsv | 30 ----------
.../TestUnionDistinctQueries/q13.tsv | 20 -------
.../TestUnionDistinctQueries/q14.tsv | 30 ----------
.../TestUnionDistinctQueries/q15.tsv | 8 ---
.../TestUnionDistinctQueries/q16.tsv | 3 -
.../TestUnionDistinctQueries/q17.tsv | 5 --
.../TestUnionDistinctQueries/q18_1.tsv | 4 --
.../TestUnionDistinctQueries/q18_2.tsv | 13 -----
.../TestUnionDistinctQueries/q18_3.tsv | 13 -----
.../TestUnionDistinctQueries/q2.tsv | 4 --
.../TestUnionDistinctQueries/q3.tsv | 5 --
.../TestUnionDistinctQueries/q4.tsv | 25 ---------
.../TestUnionDistinctQueries/q5.tsv | 5 --
.../TestUnionDistinctQueries/q6.tsv | 6 --
.../TestUnionDistinctQueries/q6_1.tsv | 25 ---------
.../TestUnionDistinctQueries/q7.tsv | 2 -
.../TestUnionDistinctQueries/q8.tsv | 30 ----------
.../TestUnionDistinctQueries/q9.tsv | 20 -------
...testAggregationOnUnionDistinctOperator_1.tsv | 4 --
...testAggregationOnUnionDistinctOperator_2.tsv | 4 --
...jectDownOverUnionDistinctImplicitCasting.tsv | 10 ----
...tProjectFiltertPushDownOverUnionDistinct.tsv | 6 --
...jectPushDownOverUnionDistinctWithProject.tsv | 30 ----------
...tPushDownOverUnionDistinctWithoutProject.tsv | 30 ----------
...tPushDownProjectColumnReorderingAndAlias.tsv | 30 ----------
...tWithExpressionPushDownOverUnionDistinct.tsv | 30 ----------
.../testframework/unionDistinct/q1.tsv | 5 ++
.../testframework/unionDistinct/q10.tsv | 30 ++++++++++
.../testframework/unionDistinct/q11.tsv | 30 ++++++++++
.../testframework/unionDistinct/q12.tsv | 30 ++++++++++
.../testframework/unionDistinct/q13.tsv | 20 +++++++
.../testframework/unionDistinct/q14.tsv | 30 ++++++++++
.../testframework/unionDistinct/q15.tsv | 8 +++
.../testframework/unionDistinct/q16.tsv | 3 +
.../testframework/unionDistinct/q17.tsv | 5 ++
.../testframework/unionDistinct/q18_1.tsv | 4 ++
.../testframework/unionDistinct/q18_2.tsv | 13 +++++
.../testframework/unionDistinct/q18_3.tsv | 13 +++++
.../testframework/unionDistinct/q2.tsv | 4 ++
.../testframework/unionDistinct/q3.tsv | 5 ++
.../testframework/unionDistinct/q4.tsv | 25 +++++++++
.../testframework/unionDistinct/q5.tsv | 5 ++
.../testframework/unionDistinct/q6.tsv | 6 ++
.../testframework/unionDistinct/q6_1.tsv | 25 +++++++++
.../testframework/unionDistinct/q7.tsv | 2 +
.../testframework/unionDistinct/q8.tsv | 30 ++++++++++
.../testframework/unionDistinct/q9.tsv | 20 +++++++
...testAggregationOnUnionDistinctOperator_1.tsv | 4 ++
...testAggregationOnUnionDistinctOperator_2.tsv | 4 ++
...jectDownOverUnionDistinctImplicitCasting.tsv | 10 ++++
...tProjectFiltertPushDownOverUnionDistinct.tsv | 6 ++
...jectPushDownOverUnionDistinctWithProject.tsv | 30 ++++++++++
...tPushDownOverUnionDistinctWithoutProject.tsv | 30 ++++++++++
...tPushDownProjectColumnReorderingAndAlias.tsv | 30 ++++++++++
...tWithExpressionPushDownOverUnionDistinct.tsv | 30 ++++++++++
59 files changed, 486 insertions(+), 486 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/java/org/apache/drill/TestUnionDistinct.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestUnionDistinct.java b/exec/java-exec/src/test/java/org/apache/drill/TestUnionDistinct.java
index 8f85b4d..d252459 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestUnionDistinct.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestUnionDistinct.java
@@ -34,7 +34,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q1.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q1.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("n_regionkey")
.build()
@@ -50,7 +50,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q2.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q2.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("n_nationkey")
.build()
@@ -66,7 +66,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q3.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q3.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("n_nationkey")
.build()
@@ -83,7 +83,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q4.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q4.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("n_regionkey")
.build()
@@ -99,7 +99,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q5.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q5.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.INT)
.baselineColumns("r_name", "r_comment", "r_regionkey")
.build()
@@ -115,7 +115,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q6.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q6.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.INT)
.baselineColumns("n_nationkey", "n_regionkey")
.build()
@@ -130,7 +130,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q6_1.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q6_1.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.INT)
.baselineColumns("n_nationkey", "n_nationkey0")
.build()
@@ -145,7 +145,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q7.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q7.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR)
.baselineColumns("col")
.build()
@@ -160,7 +160,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q8.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q8.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.INT)
.baselineColumns("n_name", "n_nationkey")
.build()
@@ -177,7 +177,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q9.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q9.tsv")
.baselineTypes(TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.FLOAT8, TypeProtos.MinorType.VARCHAR,
TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.BIGINT,TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.BIGINT)
.baselineColumns("o_custkey", "o_orderstatus", "o_totalprice", "o_orderdate",
@@ -195,7 +195,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q10.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q10.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.INT, TypeProtos.MinorType.INT)
.baselineColumns("n_name", "LiteralConstant", "n_nationkey", "NumberConstant")
.build()
@@ -220,7 +220,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query1)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q11.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q11.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.INT)
.baselineColumns("n_name", "n_nationkey")
.build()
@@ -229,7 +229,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query2)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q12.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q12.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.INT)
.baselineColumns("r_name", "r_regionkey")
.build()
@@ -274,7 +274,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query1)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q13.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q13.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.BIGINT)
.baselineColumns("n_comment", "n_regionkey")
.build()
@@ -296,7 +296,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q14.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q14.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.VARCHAR)
.baselineColumns("x1", "x2")
.build()
@@ -312,7 +312,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q15.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q15.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.INT, TypeProtos.MinorType.VARCHAR)
.baselineColumns("n_nationkey", "n_regionkey", "n_name")
.build().run();
@@ -331,7 +331,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query1)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q16.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q16.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.INT, TypeProtos.MinorType.VARCHAR)
.baselineColumns("n_nationkey", "n_regionkey", "n_name")
.build()
@@ -340,7 +340,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query2)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q17.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q17.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.INT, TypeProtos.MinorType.VARCHAR)
.baselineColumns("n_nationkey", "n_regionkey", "n_name")
.build()
@@ -367,7 +367,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query1)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testAggregationOnUnionDistinctOperator_1.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testAggregationOnUnionDistinctOperator_1.tsv")
.baselineTypes(TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.BIGINT)
.baselineColumns("calc1", "max", "min", "count")
.build()
@@ -376,7 +376,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query2)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testAggregationOnUnionDistinctOperator_2.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testAggregationOnUnionDistinctOperator_2.tsv")
.baselineTypes(TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.BIGINT, TypeProtos.MinorType.BIGINT)
.baselineColumns("calc1", "min", "max", "count")
.build()
@@ -419,7 +419,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query1)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q18_1.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q18_1.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR)
.baselineColumns("key")
.build()
@@ -428,7 +428,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query2)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q18_2.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q18_2.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR)
.baselineColumns("key")
.build()
@@ -437,7 +437,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query3)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/q18_3.tsv")
+ .csvBaselineFile("testframework/unionDistinct/q18_3.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR)
.baselineColumns("key")
.build()
@@ -590,7 +590,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithProject.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithProject.tsv")
.baselineTypes(TypeProtos.MinorType.INT, TypeProtos.MinorType.VARCHAR)
.baselineColumns("n_nationkey", "n_name")
.build()
@@ -606,7 +606,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithoutProject.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithoutProject.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("n_nationkey")
.build()
@@ -623,7 +623,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testProjectWithExpressionPushDownOverUnionDistinct.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testProjectWithExpressionPushDownOverUnionDistinct.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("col")
.build()
@@ -641,7 +641,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testProjectDownOverUnionDistinctImplicitCasting.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testProjectDownOverUnionDistinctImplicitCasting.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("col")
.build()
@@ -657,7 +657,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testProjectPushDownProjectColumnReorderingAndAlias.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testProjectPushDownProjectColumnReorderingAndAlias.tsv")
.baselineTypes(TypeProtos.MinorType.VARCHAR, TypeProtos.MinorType.INT, TypeProtos.MinorType.VARCHAR)
.baselineColumns("col1", "col2", "col3")
.build()
@@ -674,7 +674,7 @@ public class TestUnionDistinct extends BaseTestQuery {
testBuilder()
.sqlQuery(query)
.unOrdered()
- .csvBaselineFile("testframework/testUnionDistinctQueries/testProjectFiltertPushDownOverUnionDistinct.tsv")
+ .csvBaselineFile("testframework/unionDistinct/testProjectFiltertPushDownOverUnionDistinct.tsv")
.baselineTypes(TypeProtos.MinorType.INT)
.baselineColumns("n_nationkey")
.build()
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q1.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q1.tsv
deleted file mode 100644
index 0254fe8..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q1.tsv
+++ /dev/null
@@ -1,5 +0,0 @@
-0
-1
-4
-3
-2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q10.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q10.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q10.tsv
deleted file mode 100644
index c883125..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q10.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-ALGERIA LEFT 0 1
-ARGENTINA LEFT 1 1
-BRAZIL LEFT 2 1
-CANADA LEFT 3 1
-EGYPT LEFT 4 1
-ETHIOPIA LEFT 5 1
-FRANCE LEFT 6 1
-GERMANY LEFT 7 1
-INDIA LEFT 8 1
-INDONESIA LEFT 9 1
-IRAN LEFT 10 1
-IRAQ LEFT 11 1
-JAPAN LEFT 12 1
-JORDAN LEFT 13 1
-KENYA LEFT 14 1
-MOROCCO LEFT 15 1
-MOZAMBIQUE LEFT 16 1
-PERU LEFT 17 1
-CHINA LEFT 18 1
-ROMANIA LEFT 19 1
-SAUDI ARABIA LEFT 20 1
-VIETNAM LEFT 21 1
-RUSSIA LEFT 22 1
-UNITED KINGDOM LEFT 23 1
-UNITED STATES LEFT 24 1
-RIGHT AFRICA 2 0
-RIGHT AMERICA 2 1
-RIGHT ASIA 2 2
-RIGHT EUROPE 2 3
-RIGHT MIDDLE EAST 2 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q11.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q11.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q11.tsv
deleted file mode 100644
index 2d5b701..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q11.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-ALGERIA 0
-ARGENTINA 1
-BRAZIL 2
-CANADA 3
-EGYPT 4
-ETHIOPIA 5
-FRANCE 6
-GERMANY 7
-INDIA 8
-INDONESIA 9
-IRAN 10
-IRAQ 11
-JAPAN 12
-JORDAN 13
-KENYA 14
-MOROCCO 15
-MOZAMBIQUE 16
-PERU 17
-CHINA 18
-ROMANIA 19
-SAUDI ARABIA 20
-VIETNAM 21
-RUSSIA 22
-UNITED KINGDOM 23
-UNITED STATES 24
-AFRICA 0
-AMERICA 1
-ASIA 2
-EUROPE 3
-MIDDLE EAST 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q12.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q12.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q12.tsv
deleted file mode 100644
index 44f9209..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q12.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-AFRICA 0
-AMERICA 1
-ASIA 2
-EUROPE 3
-MIDDLE EAST 4
-ALGERIA 0
-ARGENTINA 1
-BRAZIL 2
-CANADA 3
-EGYPT 4
-ETHIOPIA 5
-FRANCE 6
-GERMANY 7
-INDIA 8
-INDONESIA 9
-IRAN 10
-IRAQ 11
-JAPAN 12
-JORDAN 13
-KENYA 14
-MOROCCO 15
-MOZAMBIQUE 16
-PERU 17
-CHINA 18
-ROMANIA 19
-SAUDI ARABIA 20
-VIETNAM 21
-RUSSIA 22
-UNITED KINGDOM 23
-UNITED STATES 24
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q13.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q13.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q13.tsv
deleted file mode 100644
index a207902..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q13.tsv
+++ /dev/null
@@ -1,20 +0,0 @@
- haggle. carefully final deposits detect slyly agai 0
-al foxes promise slyly according to the regular accounts. bold requests alon 1
-y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 1
-eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold 1
-y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d 4
-ALGERIA 0
-ARGENTINA 1
-BRAZIL 2
-CANADA 3
-EGYPT 4
-Sheri Nowmer 0
-Derrick Whelply 0
-Michael Spence 0
-Maya Gutierrez 0
-Roberta Damstra 0
-AFRICA 0
-AMERICA 1
-ASIA 2
-EUROPE 3
-MIDDLE EAST 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q14.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q14.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q14.tsv
deleted file mode 100644
index 754dca8..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q14.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-0 ALGERIA
-1 ARGENTINA
-1 BRAZIL
-1 CANADA
-4 EGYPT
-0 ETHIOPIA
-3 FRANCE
-3 GERMANY
-2 INDIA
-2 INDONESIA
-4 IRAN
-4 IRAQ
-2 JAPAN
-4 JORDAN
-0 KENYA
-0 MOROCCO
-0 MOZAMBIQUE
-1 PERU
-2 CHINA
-3 ROMANIA
-4 SAUDI ARABIA
-2 VIETNAM
-3 RUSSIA
-3 UNITED KINGDOM
-1 UNITED STATES
-0 AFRICA
-1 AMERICA
-2 ASIA
-3 EUROPE
-4 MIDDLE EAST
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q15.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q15.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q15.tsv
deleted file mode 100644
index e142333..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q15.tsv
+++ /dev/null
@@ -1,8 +0,0 @@
-0 0 ALGERIA
-1 1 ARGENTINA
-2 1 BRAZIL
-3 1 CANADA
-4 4 EGYPT
-1 0 abc
-1 1 abc
-1 4 abc
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q16.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q16.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q16.tsv
deleted file mode 100644
index aa6e733..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q16.tsv
+++ /dev/null
@@ -1,3 +0,0 @@
-1 0 abc
-1 1 abc
-1 4 abc
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q17.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q17.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q17.tsv
deleted file mode 100644
index 27aa989..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q17.tsv
+++ /dev/null
@@ -1,5 +0,0 @@
-0 0 ALGERIA
-1 1 ARGENTINA
-2 1 BRAZIL
-3 1 CANADA
-4 4 EGYPT
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_1.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_1.tsv
deleted file mode 100644
index 5cb3a5e..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_1.tsv
+++ /dev/null
@@ -1,4 +0,0 @@
-2011-07-26
-2015-03-26 19:04:55.542
-2015-03-26 19:04:55.543
-2015-03-26 19:04:55.544
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_2.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_2.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_2.tsv
deleted file mode 100644
index 123efc6..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_2.tsv
+++ /dev/null
@@ -1,13 +0,0 @@
-2009-03-03
-2001-08-27
-2011-07-26
-1970-09-02
-1983-04-24
-2007-02-01
-1977-08-03
-1962-05-14
-1950-02-16
-1983-09-05
-2000-09-09
-1960-08-18
-2015-03-26 19:04:55.544
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_3.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_3.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_3.tsv
deleted file mode 100644
index 123efc6..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q18_3.tsv
+++ /dev/null
@@ -1,13 +0,0 @@
-2009-03-03
-2001-08-27
-2011-07-26
-1970-09-02
-1983-04-24
-2007-02-01
-1977-08-03
-1962-05-14
-1950-02-16
-1983-09-05
-2000-09-09
-1960-08-18
-2015-03-26 19:04:55.544
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q2.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q2.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q2.tsv
deleted file mode 100644
index b178657..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q2.tsv
+++ /dev/null
@@ -1,4 +0,0 @@
-1
-2
-3
-4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q3.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q3.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q3.tsv
deleted file mode 100644
index 59dd464..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q3.tsv
+++ /dev/null
@@ -1,5 +0,0 @@
-1
-2
-0
-3
-4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q4.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q4.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q4.tsv
deleted file mode 100644
index 7472138..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q4.tsv
+++ /dev/null
@@ -1,25 +0,0 @@
-0
-1
-4
-3
-2
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q5.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q5.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q5.tsv
deleted file mode 100644
index b803523..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q5.tsv
+++ /dev/null
@@ -1,5 +0,0 @@
-AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 0
-AMERICA hs use ironic, even requests. s 1
-ASIA ges. thinly even pinto beans ca 2
-EUROPE ly final courts cajole furiously final excuse 3
-MIDDLE EAST uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6.tsv
deleted file mode 100644
index e7127dd..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6.tsv
+++ /dev/null
@@ -1,6 +0,0 @@
-1 1
-2 1
-3 1
-17 1
-24 1
-2 2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6_1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6_1.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6_1.tsv
deleted file mode 100644
index d32c846..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q6_1.tsv
+++ /dev/null
@@ -1,25 +0,0 @@
-0 0
-1 1
-2 2
-3 3
-4 4
-5 5
-6 6
-7 7
-8 8
-9 9
-10 10
-11 11
-12 12
-13 13
-14 14
-15 15
-16 16
-17 17
-18 18
-19 19
-20 20
-21 21
-22 22
-23 23
-24 24
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q7.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q7.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q7.tsv
deleted file mode 100644
index 3e75b5f..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q7.tsv
+++ /dev/null
@@ -1,2 +0,0 @@
-abc
-abcdefgh
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q8.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q8.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q8.tsv
deleted file mode 100644
index 4e9cb34..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q8.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-ALGERIA 0
-ARGENTINA 1
-BRAZIL 2
-CANADA 3
-EGYPT 4
-ETHIOPIA 5
-FRANCE 6
-GERMANY 7
-INDIA 8
-INDONESIA 9
-IRAN 10
-IRAQ 11
-JAPAN 12
-JORDAN 13
-KENYA 14
-MOROCCO 15
-MOZAMBIQUE 16
-PERU 17
-CHINA 18
-ROMANIA 19
-SAUDI ARABIA 20
-VIETNAM 21
-RUSSIA 22
-UNITED KINGDOM 23
-UNITED STATES 24
-lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 0
-hs use ironic, even requests. s 1
-ges. thinly even pinto beans ca 2
-ly final courts cajole furiously final excuse 3
-uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q9.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q9.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q9.tsv
deleted file mode 100644
index 2fd5e7b..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/q9.tsv
+++ /dev/null
@@ -1,20 +0,0 @@
-1292 F 104190.66 1994-01-20T00:00:00.000-08:00 5-LOW Clerk#000000743 0 y pending requests integrate 66
-890 F 108594.87 1994-03-13T00:00:00.000-08:00 4-NOT SPECIFIED Clerk#000000973 0 e carefully ironic packages. pending 99
-1180 F 67636.54 1994-01-01T00:00:00.000-08:00 4-NOT SPECIFIED Clerk#000000735 0 efully dogged deposits. furiou 290
-1411 F 88375.89 1994-03-13T00:00:00.000-08:00 1-URGENT Clerk#000000923 0 dolites. carefully regular pinto beans cajol 291
-392 F 121127.17 1994-03-26T00:00:00.000-08:00 1-URGENT Clerk#000000959 0 arefully pending foxes sleep blithely. slyly express accoun 323
-1066 F 25542.02 1994-03-08T00:00:00.000-08:00 2-HIGH Clerk#000000932 0 ke slyly bold pinto beans. blithely regular accounts against the spe 352
-1270 F 3266.69 1994-02-17T00:00:00.000-08:00 2-HIGH Clerk#000000062 0 ing to the regular asymptotes. final, pending foxes about the blithely sil 389
-547 F 132531.73 1994-02-06T00:00:00.000-08:00 3-MEDIUM Clerk#000000468 0 ironic, even packages. thinly unusual accounts sleep along the slyly unusual 417
-793 F 34950.94 1994-03-10T00:00:00.000-08:00 1-URGENT Clerk#000000448 0 special pinto beans use quickly furiously even depende 673
-553 F 53948.73 1994-02-13T00:00:00.000-08:00 3-MEDIUM Clerk#000000437 0 ts haggle quickly across the slyl 833
-163 P 95469.44 1995-03-18T00:00:00.000-08:00 1-URGENT Clerk#000000632 0 ular requests are blithely pending orbits-- even requests against the deposit 65
-602 F 119718.02 1995-01-25T00:00:00.000-08:00 2-HIGH Clerk#000000648 0 haggle quickly. stealthily bold asymptotes haggle among the furiously even re 386
-475 P 213638.07 1995-03-05T00:00:00.000-08:00 4-NOT SPECIFIED Clerk#000000293 0 d theodolites. boldly bold foxes since the pack 450
-578 P 261882.19 1995-03-25T00:00:00.000-08:00 2-HIGH Clerk#000000354 0 g dependencies. regular accounts 643
-1333 F 75392.93 1995-03-18T00:00:00.000-08:00 1-URGENT Clerk#000000191 0 kly express requests. fluffily silent accounts poach furiously 775
-1367 F 192178.48 1995-01-05T00:00:00.000-08:00 1-URGENT Clerk#000000516 0 posits. ironic, pending requests cajole. even theodol 802
-490 P 88281.28 1995-03-20T00:00:00.000-08:00 1-URGENT Clerk#000000316 0 wake quickly against 897
-658 F 315638.02 1995-03-02T00:00:00.000-08:00 5-LOW Clerk#000000450 0 ithely express pinto beans. 928
-275 F 41838.38 1995-02-11T00:00:00.000-08:00 1-URGENT Clerk#000000125 0 t, even deposits hang about the slyly special i 1056
-1232 P 131664.83 1995-03-04T00:00:00.000-08:00 3-MEDIUM Clerk#000000006 0 re quickly along the blithe 1092
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_1.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_1.tsv
deleted file mode 100644
index d114555..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_1.tsv
+++ /dev/null
@@ -1,4 +0,0 @@
-10 2 1 4
-20 5 3 4
-100 2 1 4
-110 5 3 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_2.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_2.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_2.tsv
deleted file mode 100644
index 53d874e..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testAggregationOnUnionDistinctOperator_2.tsv
+++ /dev/null
@@ -1,4 +0,0 @@
-10 1 2 4
-20 3 5 4
-100 1 2 4
-110 3 5 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectDownOverUnionDistinctImplicitCasting.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectDownOverUnionDistinctImplicitCasting.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectDownOverUnionDistinctImplicitCasting.tsv
deleted file mode 100644
index 7c84ba7..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectDownOverUnionDistinctImplicitCasting.tsv
+++ /dev/null
@@ -1,10 +0,0 @@
-0
-0
-2
-2
-4
-4
-6
-6
-8
-8
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectFiltertPushDownOverUnionDistinct.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectFiltertPushDownOverUnionDistinct.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectFiltertPushDownOverUnionDistinct.tsv
deleted file mode 100644
index c7a7ace..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectFiltertPushDownOverUnionDistinct.tsv
+++ /dev/null
@@ -1,6 +0,0 @@
-1
-2
-3
-1
-2
-3
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithProject.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithProject.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithProject.tsv
deleted file mode 100644
index 7d708b0..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithProject.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-0 ALGERIA
-1 ARGENTINA
-2 BRAZIL
-3 CANADA
-4 EGYPT
-5 ETHIOPIA
-6 FRANCE
-7 GERMANY
-8 INDIA
-9 INDONESIA
-10 IRAN
-11 IRAQ
-12 JAPAN
-13 JORDAN
-14 KENYA
-15 MOROCCO
-16 MOZAMBIQUE
-17 PERU
-18 CHINA
-19 ROMANIA
-20 SAUDI ARABIA
-21 VIETNAM
-22 RUSSIA
-23 UNITED KINGDOM
-24 UNITED STATES
-0 AFRICA
-1 AMERICA
-2 ASIA
-3 EUROPE
-4 MIDDLE EAST
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithoutProject.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithoutProject.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithoutProject.tsv
deleted file mode 100644
index c977edd..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownOverUnionDistinctWithoutProject.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-0
-1
-2
-3
-4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownProjectColumnReorderingAndAlias.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownProjectColumnReorderingAndAlias.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownProjectColumnReorderingAndAlias.tsv
deleted file mode 100644
index 05bb0ff..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectPushDownProjectColumnReorderingAndAlias.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
- haggle. carefully final deposits detect slyly agai 0 ALGERIA
-al foxes promise slyly according to the regular accounts. bold requests alon 1 ARGENTINA
-y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2 BRAZIL
-eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold 3 CANADA
-y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d 4 EGYPT
-ven packages wake quickly. regu 5 ETHIOPIA
-refully final requests. regular, ironi 6 FRANCE
-l platelets. regular accounts x-ray: unusual, regular acco 7 GERMANY
-ss excuses cajole slyly across the packages. deposits print aroun 8 INDIA
- slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull 9 INDONESIA
-efully alongside of the slyly final dependencies. 10 IRAN
-nic deposits boost atop the quickly final requests? quickly regula 11 IRAQ
-ously. final, express gifts cajole a 12 JAPAN
-ic deposits are blithely about the carefully regular pa 13 JORDAN
- pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t 14 KENYA
-rns. blithely bold courts among the closely regular packages use furiously bold platelets? 15 MOROCCO
-s. ironic, unusual asymptotes wake blithely r 16 MOZAMBIQUE
-platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun 17 PERU
-c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos 18 CHINA
-ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account 19 ROMANIA
-ts. silent requests haggle. closely express packages sleep across the blithely 20 SAUDI ARABIA
-hely enticingly express accounts. even, final 21 VIETNAM
- requests against the platelets use never according to the quickly regular pint 22 RUSSIA
-eans boost carefully special requests. accounts are. carefull 23 UNITED KINGDOM
-y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be 24 UNITED STATES
-lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 0 AFRICA
-hs use ironic, even requests. s 1 AMERICA
-ges. thinly even pinto beans ca 2 ASIA
-ly final courts cajole furiously final excuse 3 EUROPE
-uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 4 MIDDLE EAST
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectWithExpressionPushDownOverUnionDistinct.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectWithExpressionPushDownOverUnionDistinct.tsv b/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectWithExpressionPushDownOverUnionDistinct.tsv
deleted file mode 100644
index 4a9efcd..0000000
--- a/exec/java-exec/src/test/resources/testframework/TestUnionDistinctQueries/testProjectWithExpressionPushDownOverUnionDistinct.tsv
+++ /dev/null
@@ -1,30 +0,0 @@
-0
-2
-4
-6
-8
-10
-12
-14
-16
-18
-20
-22
-24
-26
-28
-30
-32
-34
-36
-38
-40
-42
-44
-46
-48
-0
-2
-4
-6
-8
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q1.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q1.tsv
new file mode 100644
index 0000000..0254fe8
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q1.tsv
@@ -0,0 +1,5 @@
+0
+1
+4
+3
+2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q10.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q10.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q10.tsv
new file mode 100644
index 0000000..c883125
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q10.tsv
@@ -0,0 +1,30 @@
+ALGERIA LEFT 0 1
+ARGENTINA LEFT 1 1
+BRAZIL LEFT 2 1
+CANADA LEFT 3 1
+EGYPT LEFT 4 1
+ETHIOPIA LEFT 5 1
+FRANCE LEFT 6 1
+GERMANY LEFT 7 1
+INDIA LEFT 8 1
+INDONESIA LEFT 9 1
+IRAN LEFT 10 1
+IRAQ LEFT 11 1
+JAPAN LEFT 12 1
+JORDAN LEFT 13 1
+KENYA LEFT 14 1
+MOROCCO LEFT 15 1
+MOZAMBIQUE LEFT 16 1
+PERU LEFT 17 1
+CHINA LEFT 18 1
+ROMANIA LEFT 19 1
+SAUDI ARABIA LEFT 20 1
+VIETNAM LEFT 21 1
+RUSSIA LEFT 22 1
+UNITED KINGDOM LEFT 23 1
+UNITED STATES LEFT 24 1
+RIGHT AFRICA 2 0
+RIGHT AMERICA 2 1
+RIGHT ASIA 2 2
+RIGHT EUROPE 2 3
+RIGHT MIDDLE EAST 2 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q11.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q11.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q11.tsv
new file mode 100644
index 0000000..2d5b701
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q11.tsv
@@ -0,0 +1,30 @@
+ALGERIA 0
+ARGENTINA 1
+BRAZIL 2
+CANADA 3
+EGYPT 4
+ETHIOPIA 5
+FRANCE 6
+GERMANY 7
+INDIA 8
+INDONESIA 9
+IRAN 10
+IRAQ 11
+JAPAN 12
+JORDAN 13
+KENYA 14
+MOROCCO 15
+MOZAMBIQUE 16
+PERU 17
+CHINA 18
+ROMANIA 19
+SAUDI ARABIA 20
+VIETNAM 21
+RUSSIA 22
+UNITED KINGDOM 23
+UNITED STATES 24
+AFRICA 0
+AMERICA 1
+ASIA 2
+EUROPE 3
+MIDDLE EAST 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q12.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q12.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q12.tsv
new file mode 100644
index 0000000..44f9209
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q12.tsv
@@ -0,0 +1,30 @@
+AFRICA 0
+AMERICA 1
+ASIA 2
+EUROPE 3
+MIDDLE EAST 4
+ALGERIA 0
+ARGENTINA 1
+BRAZIL 2
+CANADA 3
+EGYPT 4
+ETHIOPIA 5
+FRANCE 6
+GERMANY 7
+INDIA 8
+INDONESIA 9
+IRAN 10
+IRAQ 11
+JAPAN 12
+JORDAN 13
+KENYA 14
+MOROCCO 15
+MOZAMBIQUE 16
+PERU 17
+CHINA 18
+ROMANIA 19
+SAUDI ARABIA 20
+VIETNAM 21
+RUSSIA 22
+UNITED KINGDOM 23
+UNITED STATES 24
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q13.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q13.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q13.tsv
new file mode 100644
index 0000000..a207902
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q13.tsv
@@ -0,0 +1,20 @@
+ haggle. carefully final deposits detect slyly agai 0
+al foxes promise slyly according to the regular accounts. bold requests alon 1
+y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 1
+eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold 1
+y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d 4
+ALGERIA 0
+ARGENTINA 1
+BRAZIL 2
+CANADA 3
+EGYPT 4
+Sheri Nowmer 0
+Derrick Whelply 0
+Michael Spence 0
+Maya Gutierrez 0
+Roberta Damstra 0
+AFRICA 0
+AMERICA 1
+ASIA 2
+EUROPE 3
+MIDDLE EAST 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q14.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q14.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q14.tsv
new file mode 100644
index 0000000..754dca8
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q14.tsv
@@ -0,0 +1,30 @@
+0 ALGERIA
+1 ARGENTINA
+1 BRAZIL
+1 CANADA
+4 EGYPT
+0 ETHIOPIA
+3 FRANCE
+3 GERMANY
+2 INDIA
+2 INDONESIA
+4 IRAN
+4 IRAQ
+2 JAPAN
+4 JORDAN
+0 KENYA
+0 MOROCCO
+0 MOZAMBIQUE
+1 PERU
+2 CHINA
+3 ROMANIA
+4 SAUDI ARABIA
+2 VIETNAM
+3 RUSSIA
+3 UNITED KINGDOM
+1 UNITED STATES
+0 AFRICA
+1 AMERICA
+2 ASIA
+3 EUROPE
+4 MIDDLE EAST
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q15.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q15.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q15.tsv
new file mode 100644
index 0000000..e142333
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q15.tsv
@@ -0,0 +1,8 @@
+0 0 ALGERIA
+1 1 ARGENTINA
+2 1 BRAZIL
+3 1 CANADA
+4 4 EGYPT
+1 0 abc
+1 1 abc
+1 4 abc
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q16.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q16.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q16.tsv
new file mode 100644
index 0000000..aa6e733
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q16.tsv
@@ -0,0 +1,3 @@
+1 0 abc
+1 1 abc
+1 4 abc
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q17.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q17.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q17.tsv
new file mode 100644
index 0000000..27aa989
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q17.tsv
@@ -0,0 +1,5 @@
+0 0 ALGERIA
+1 1 ARGENTINA
+2 1 BRAZIL
+3 1 CANADA
+4 4 EGYPT
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_1.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_1.tsv
new file mode 100644
index 0000000..5cb3a5e
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_1.tsv
@@ -0,0 +1,4 @@
+2011-07-26
+2015-03-26 19:04:55.542
+2015-03-26 19:04:55.543
+2015-03-26 19:04:55.544
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_2.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_2.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_2.tsv
new file mode 100644
index 0000000..123efc6
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_2.tsv
@@ -0,0 +1,13 @@
+2009-03-03
+2001-08-27
+2011-07-26
+1970-09-02
+1983-04-24
+2007-02-01
+1977-08-03
+1962-05-14
+1950-02-16
+1983-09-05
+2000-09-09
+1960-08-18
+2015-03-26 19:04:55.544
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_3.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_3.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_3.tsv
new file mode 100644
index 0000000..123efc6
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q18_3.tsv
@@ -0,0 +1,13 @@
+2009-03-03
+2001-08-27
+2011-07-26
+1970-09-02
+1983-04-24
+2007-02-01
+1977-08-03
+1962-05-14
+1950-02-16
+1983-09-05
+2000-09-09
+1960-08-18
+2015-03-26 19:04:55.544
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q2.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q2.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q2.tsv
new file mode 100644
index 0000000..b178657
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q2.tsv
@@ -0,0 +1,4 @@
+1
+2
+3
+4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q3.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q3.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q3.tsv
new file mode 100644
index 0000000..59dd464
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q3.tsv
@@ -0,0 +1,5 @@
+1
+2
+0
+3
+4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q4.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q4.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q4.tsv
new file mode 100644
index 0000000..7472138
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q4.tsv
@@ -0,0 +1,25 @@
+0
+1
+4
+3
+2
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q5.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q5.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q5.tsv
new file mode 100644
index 0000000..b803523
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q5.tsv
@@ -0,0 +1,5 @@
+AFRICA lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 0
+AMERICA hs use ironic, even requests. s 1
+ASIA ges. thinly even pinto beans ca 2
+EUROPE ly final courts cajole furiously final excuse 3
+MIDDLE EAST uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q6.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q6.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q6.tsv
new file mode 100644
index 0000000..e7127dd
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q6.tsv
@@ -0,0 +1,6 @@
+1 1
+2 1
+3 1
+17 1
+24 1
+2 2
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q6_1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q6_1.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q6_1.tsv
new file mode 100644
index 0000000..d32c846
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q6_1.tsv
@@ -0,0 +1,25 @@
+0 0
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+10 10
+11 11
+12 12
+13 13
+14 14
+15 15
+16 16
+17 17
+18 18
+19 19
+20 20
+21 21
+22 22
+23 23
+24 24
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q7.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q7.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q7.tsv
new file mode 100644
index 0000000..3e75b5f
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q7.tsv
@@ -0,0 +1,2 @@
+abc
+abcdefgh
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q8.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q8.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q8.tsv
new file mode 100644
index 0000000..4e9cb34
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q8.tsv
@@ -0,0 +1,30 @@
+ALGERIA 0
+ARGENTINA 1
+BRAZIL 2
+CANADA 3
+EGYPT 4
+ETHIOPIA 5
+FRANCE 6
+GERMANY 7
+INDIA 8
+INDONESIA 9
+IRAN 10
+IRAQ 11
+JAPAN 12
+JORDAN 13
+KENYA 14
+MOROCCO 15
+MOZAMBIQUE 16
+PERU 17
+CHINA 18
+ROMANIA 19
+SAUDI ARABIA 20
+VIETNAM 21
+RUSSIA 22
+UNITED KINGDOM 23
+UNITED STATES 24
+lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 0
+hs use ironic, even requests. s 1
+ges. thinly even pinto beans ca 2
+ly final courts cajole furiously final excuse 3
+uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/q9.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/q9.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/q9.tsv
new file mode 100644
index 0000000..2fd5e7b
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/q9.tsv
@@ -0,0 +1,20 @@
+1292 F 104190.66 1994-01-20T00:00:00.000-08:00 5-LOW Clerk#000000743 0 y pending requests integrate 66
+890 F 108594.87 1994-03-13T00:00:00.000-08:00 4-NOT SPECIFIED Clerk#000000973 0 e carefully ironic packages. pending 99
+1180 F 67636.54 1994-01-01T00:00:00.000-08:00 4-NOT SPECIFIED Clerk#000000735 0 efully dogged deposits. furiou 290
+1411 F 88375.89 1994-03-13T00:00:00.000-08:00 1-URGENT Clerk#000000923 0 dolites. carefully regular pinto beans cajol 291
+392 F 121127.17 1994-03-26T00:00:00.000-08:00 1-URGENT Clerk#000000959 0 arefully pending foxes sleep blithely. slyly express accoun 323
+1066 F 25542.02 1994-03-08T00:00:00.000-08:00 2-HIGH Clerk#000000932 0 ke slyly bold pinto beans. blithely regular accounts against the spe 352
+1270 F 3266.69 1994-02-17T00:00:00.000-08:00 2-HIGH Clerk#000000062 0 ing to the regular asymptotes. final, pending foxes about the blithely sil 389
+547 F 132531.73 1994-02-06T00:00:00.000-08:00 3-MEDIUM Clerk#000000468 0 ironic, even packages. thinly unusual accounts sleep along the slyly unusual 417
+793 F 34950.94 1994-03-10T00:00:00.000-08:00 1-URGENT Clerk#000000448 0 special pinto beans use quickly furiously even depende 673
+553 F 53948.73 1994-02-13T00:00:00.000-08:00 3-MEDIUM Clerk#000000437 0 ts haggle quickly across the slyl 833
+163 P 95469.44 1995-03-18T00:00:00.000-08:00 1-URGENT Clerk#000000632 0 ular requests are blithely pending orbits-- even requests against the deposit 65
+602 F 119718.02 1995-01-25T00:00:00.000-08:00 2-HIGH Clerk#000000648 0 haggle quickly. stealthily bold asymptotes haggle among the furiously even re 386
+475 P 213638.07 1995-03-05T00:00:00.000-08:00 4-NOT SPECIFIED Clerk#000000293 0 d theodolites. boldly bold foxes since the pack 450
+578 P 261882.19 1995-03-25T00:00:00.000-08:00 2-HIGH Clerk#000000354 0 g dependencies. regular accounts 643
+1333 F 75392.93 1995-03-18T00:00:00.000-08:00 1-URGENT Clerk#000000191 0 kly express requests. fluffily silent accounts poach furiously 775
+1367 F 192178.48 1995-01-05T00:00:00.000-08:00 1-URGENT Clerk#000000516 0 posits. ironic, pending requests cajole. even theodol 802
+490 P 88281.28 1995-03-20T00:00:00.000-08:00 1-URGENT Clerk#000000316 0 wake quickly against 897
+658 F 315638.02 1995-03-02T00:00:00.000-08:00 5-LOW Clerk#000000450 0 ithely express pinto beans. 928
+275 F 41838.38 1995-02-11T00:00:00.000-08:00 1-URGENT Clerk#000000125 0 t, even deposits hang about the slyly special i 1056
+1232 P 131664.83 1995-03-04T00:00:00.000-08:00 3-MEDIUM Clerk#000000006 0 re quickly along the blithe 1092
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_1.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_1.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_1.tsv
new file mode 100644
index 0000000..d114555
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_1.tsv
@@ -0,0 +1,4 @@
+10 2 1 4
+20 5 3 4
+100 2 1 4
+110 5 3 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_2.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_2.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_2.tsv
new file mode 100644
index 0000000..53d874e
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testAggregationOnUnionDistinctOperator_2.tsv
@@ -0,0 +1,4 @@
+10 1 2 4
+20 3 5 4
+100 1 2 4
+110 3 5 4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectDownOverUnionDistinctImplicitCasting.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectDownOverUnionDistinctImplicitCasting.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectDownOverUnionDistinctImplicitCasting.tsv
new file mode 100644
index 0000000..7c84ba7
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectDownOverUnionDistinctImplicitCasting.tsv
@@ -0,0 +1,10 @@
+0
+0
+2
+2
+4
+4
+6
+6
+8
+8
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectFiltertPushDownOverUnionDistinct.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectFiltertPushDownOverUnionDistinct.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectFiltertPushDownOverUnionDistinct.tsv
new file mode 100644
index 0000000..c7a7ace
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectFiltertPushDownOverUnionDistinct.tsv
@@ -0,0 +1,6 @@
+1
+2
+3
+1
+2
+3
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithProject.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithProject.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithProject.tsv
new file mode 100644
index 0000000..7d708b0
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithProject.tsv
@@ -0,0 +1,30 @@
+0 ALGERIA
+1 ARGENTINA
+2 BRAZIL
+3 CANADA
+4 EGYPT
+5 ETHIOPIA
+6 FRANCE
+7 GERMANY
+8 INDIA
+9 INDONESIA
+10 IRAN
+11 IRAQ
+12 JAPAN
+13 JORDAN
+14 KENYA
+15 MOROCCO
+16 MOZAMBIQUE
+17 PERU
+18 CHINA
+19 ROMANIA
+20 SAUDI ARABIA
+21 VIETNAM
+22 RUSSIA
+23 UNITED KINGDOM
+24 UNITED STATES
+0 AFRICA
+1 AMERICA
+2 ASIA
+3 EUROPE
+4 MIDDLE EAST
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithoutProject.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithoutProject.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithoutProject.tsv
new file mode 100644
index 0000000..c977edd
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownOverUnionDistinctWithoutProject.tsv
@@ -0,0 +1,30 @@
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+0
+1
+2
+3
+4
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownProjectColumnReorderingAndAlias.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownProjectColumnReorderingAndAlias.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownProjectColumnReorderingAndAlias.tsv
new file mode 100644
index 0000000..05bb0ff
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectPushDownProjectColumnReorderingAndAlias.tsv
@@ -0,0 +1,30 @@
+ haggle. carefully final deposits detect slyly agai 0 ALGERIA
+al foxes promise slyly according to the regular accounts. bold requests alon 1 ARGENTINA
+y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2 BRAZIL
+eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold 3 CANADA
+y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d 4 EGYPT
+ven packages wake quickly. regu 5 ETHIOPIA
+refully final requests. regular, ironi 6 FRANCE
+l platelets. regular accounts x-ray: unusual, regular acco 7 GERMANY
+ss excuses cajole slyly across the packages. deposits print aroun 8 INDIA
+ slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull 9 INDONESIA
+efully alongside of the slyly final dependencies. 10 IRAN
+nic deposits boost atop the quickly final requests? quickly regula 11 IRAQ
+ously. final, express gifts cajole a 12 JAPAN
+ic deposits are blithely about the carefully regular pa 13 JORDAN
+ pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t 14 KENYA
+rns. blithely bold courts among the closely regular packages use furiously bold platelets? 15 MOROCCO
+s. ironic, unusual asymptotes wake blithely r 16 MOZAMBIQUE
+platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun 17 PERU
+c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos 18 CHINA
+ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account 19 ROMANIA
+ts. silent requests haggle. closely express packages sleep across the blithely 20 SAUDI ARABIA
+hely enticingly express accounts. even, final 21 VIETNAM
+ requests against the platelets use never according to the quickly regular pint 22 RUSSIA
+eans boost carefully special requests. accounts are. carefull 23 UNITED KINGDOM
+y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be 24 UNITED STATES
+lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to 0 AFRICA
+hs use ironic, even requests. s 1 AMERICA
+ges. thinly even pinto beans ca 2 ASIA
+ly final courts cajole furiously final excuse 3 EUROPE
+uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 4 MIDDLE EAST
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/d5dc322d/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectWithExpressionPushDownOverUnionDistinct.tsv
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectWithExpressionPushDownOverUnionDistinct.tsv b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectWithExpressionPushDownOverUnionDistinct.tsv
new file mode 100644
index 0000000..4a9efcd
--- /dev/null
+++ b/exec/java-exec/src/test/resources/testframework/unionDistinct/testProjectWithExpressionPushDownOverUnionDistinct.tsv
@@ -0,0 +1,30 @@
+0
+2
+4
+6
+8
+10
+12
+14
+16
+18
+20
+22
+24
+26
+28
+30
+32
+34
+36
+38
+40
+42
+44
+46
+48
+0
+2
+4
+6
+8
\ No newline at end of file