You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by su...@apache.org on 2016/11/02 18:47:07 UTC
[1/5] drill git commit: DRILL-4951: Do Guava.patch earlier so we can
run single Hbase's unit test through command line or IDE
Repository: drill
Updated Branches:
refs/heads/master 83513daf0 -> 190d5d46d
DRILL-4951: Do Guava.patch earlier so we can run single Hbase's unit test through command line or IDE
closes #636
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e146aebe
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e146aebe
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e146aebe
Branch: refs/heads/master
Commit: e146aebe52038a17b43a1bb67852380d11f40cbe
Parents: 6782f0a
Author: chunhui-shi <cs...@maprtech.com>
Authored: Tue Oct 18 13:28:00 2016 -0700
Committer: Sudheesh Katkam <sk...@maprtech.com>
Committed: Wed Nov 2 10:56:01 2016 -0700
----------------------------------------------------------------------
.../java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java | 5 ++---
.../src/test/java/org/apache/drill/hbase/BaseHBaseTest.java | 5 -----
.../java-exec/src/test/java/org/apache/drill/exec/ExecTest.java | 5 +++++
3 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/e146aebe/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java
----------------------------------------------------------------------
diff --git a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java
index b503b00..2760ffe 100644
--- a/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java
+++ b/contrib/format-maprdb/src/test/java/com/mapr/drill/maprdb/tests/json/BaseJsonTest.java
@@ -22,7 +22,6 @@ import java.util.List;
import org.apache.drill.BaseTestQuery;
import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.rpc.user.QueryDataBatch;
-import org.apache.drill.exec.util.GuavaPatcher;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -33,8 +32,8 @@ public class BaseJsonTest extends BaseTestQuery {
@BeforeClass
public static void setupDefaultTestCluster() throws Exception {
- // Invoke the Guava patcher before any code
- GuavaPatcher.patch();
+ // GuavaPatcher.patch is invoked in ExecTest ExecTest-->BaseTestQuery
+ // GuavaPatcher.patch();
// Since we override the class initializer of parent class,
// invoke it explicitly. This will setup a Drill cluster.
http://git-wip-us.apache.org/repos/asf/drill/blob/e146aebe/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java
index 5ce823c..e12c77c 100644
--- a/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java
+++ b/contrib/storage-hbase/src/test/java/org/apache/drill/hbase/BaseHBaseTest.java
@@ -27,7 +27,6 @@ import org.apache.drill.exec.rpc.user.QueryDataBatch;
import org.apache.drill.exec.store.StoragePluginRegistry;
import org.apache.drill.exec.store.hbase.HBaseStoragePlugin;
import org.apache.drill.exec.store.hbase.HBaseStoragePluginConfig;
-import org.apache.drill.exec.util.GuavaPatcher;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.junit.AfterClass;
@@ -39,10 +38,6 @@ import com.google.common.io.Files;
public class BaseHBaseTest extends BaseTestQuery {
- static {
- GuavaPatcher.patch();
- }
-
private static final String HBASE_STORAGE_PLUGIN_NAME = "hbase";
protected static Configuration conf = HBaseConfiguration.create();
http://git-wip-us.apache.org/repos/asf/drill/blob/e146aebe/exec/java-exec/src/test/java/org/apache/drill/exec/ExecTest.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/ExecTest.java b/exec/java-exec/src/test/java/org/apache/drill/exec/ExecTest.java
index 05f0a8d..c13dc48 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/ExecTest.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/ExecTest.java
@@ -31,6 +31,7 @@ import org.apache.drill.exec.planner.PhysicalPlanReaderTestFactory;
import org.apache.drill.exec.server.DrillbitContext;
import org.apache.drill.exec.server.options.SystemOptionManager;
import org.apache.drill.exec.store.sys.store.provider.LocalPersistentStoreProvider;
+import org.apache.drill.exec.util.GuavaPatcher;
import org.apache.drill.test.DrillTest;
import org.junit.After;
import org.junit.BeforeClass;
@@ -41,6 +42,10 @@ import java.io.File;
public class ExecTest extends DrillTest {
protected static SystemOptionManager optionManager;
+ static {
+ GuavaPatcher.patch();
+ }
+
private static final DrillConfig c = DrillConfig.create();
@After
[3/5] drill git commit: DRILL-4927 (part 2): Add support for Null
Equality Joins (mixed comparators)
Posted by su...@apache.org.
DRILL-4927 (part 2): Add support for Null Equality Joins (mixed comparators)
This changes are a subset of the original pull request from DRILL-4539 (PR-462).
- Added changes to support mixed comparators;
- Added tests for it.
closes #635
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/5f34c960
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/5f34c960
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/5f34c960
Branch: refs/heads/master
Commit: 5f34c960e80a0938a4ce2666654a60df17fe402b
Parents: 83513da
Author: Roman Kulyk <ro...@gmail.com>
Authored: Fri Oct 28 13:26:53 2016 +0000
Committer: Sudheesh Katkam <sk...@maprtech.com>
Committed: Wed Nov 2 10:56:01 2016 -0700
----------------------------------------------------------------------
.../physical/impl/aggregate/HashAggBatch.java | 13 ++-
.../impl/aggregate/HashAggTemplate.java | 3 +-
.../physical/impl/common/ChainedHashTable.java | 22 ++--
.../exec/physical/impl/common/Comparator.java | 27 +++++
.../physical/impl/common/HashTableConfig.java | 11 +-
.../exec/physical/impl/join/HashJoinBatch.java | 23 ++--
.../exec/physical/impl/join/JoinUtils.java | 40 +++----
.../exec/physical/impl/join/MergeJoinBatch.java | 14 +--
.../drill/exec/planner/physical/JoinPrel.java | 29 ++---
.../java/org/apache/drill/TestJoinNullable.java | 112 ++++++++++++++++++-
.../resources/jsoninput/nullEqualJoin1.json | 32 ++++++
.../resources/jsoninput/nullEqualJoin2.json | 32 ++++++
12 files changed, 277 insertions(+), 81 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java
index 606a542..d2b42d0 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java
@@ -18,7 +18,9 @@
package org.apache.drill.exec.physical.impl.aggregate;
import java.io.IOException;
+import java.util.List;
+import com.google.common.collect.Lists;
import org.apache.drill.common.exceptions.ExecutionSetupException;
import org.apache.drill.common.exceptions.UserException;
import org.apache.drill.common.expression.ErrorCollector;
@@ -40,6 +42,7 @@ import org.apache.drill.exec.expr.ValueVectorWriteExpression;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.physical.config.HashAggregate;
import org.apache.drill.exec.physical.impl.aggregate.HashAggregator.AggOutcome;
+import org.apache.drill.exec.physical.impl.common.Comparator;
import org.apache.drill.exec.physical.impl.common.HashTable;
import org.apache.drill.exec.physical.impl.common.HashTableConfig;
import org.apache.drill.exec.record.AbstractRecordBatch;
@@ -64,6 +67,7 @@ public class HashAggBatch extends AbstractRecordBatch<HashAggregate> {
private LogicalExpression[] aggrExprs;
private TypedFieldId[] groupByOutFieldIds;
private TypedFieldId[] aggrOutFieldIds; // field ids for the outgoing batch
+ private final List<Comparator> comparators;
private final GeneratorMapping UPDATE_AGGR_INSIDE =
GeneratorMapping.create("setupInterior" /* setup method */, "updateAggrValuesInternal" /* eval method */,
@@ -82,6 +86,13 @@ public class HashAggBatch extends AbstractRecordBatch<HashAggregate> {
public HashAggBatch(HashAggregate popConfig, RecordBatch incoming, FragmentContext context) throws ExecutionSetupException {
super(popConfig, context);
this.incoming = incoming;
+
+ final int numGrpByExprs = popConfig.getGroupByExprs().size();
+ comparators = Lists.newArrayListWithExpectedSize(numGrpByExprs);
+ for (int i=0; i<numGrpByExprs; i++) {
+ // nulls are equal in group by case
+ comparators.add(Comparator.IS_NOT_DISTINCT_FROM);
+ }
}
@Override
@@ -241,7 +252,7 @@ public class HashAggBatch extends AbstractRecordBatch<HashAggregate> {
HashTableConfig htConfig =
// TODO - fix the validator on this option
new HashTableConfig((int)context.getOptions().getOption(ExecConstants.MIN_HASH_TABLE_SIZE),
- HashTable.DEFAULT_LOAD_FACTOR, popConfig.getGroupByExprs(), null /* no probe exprs */);
+ HashTable.DEFAULT_LOAD_FACTOR, popConfig.getGroupByExprs(), null /* no probe exprs */, comparators);
agg.setup(popConfig, htConfig, context, this.stats,
oContext.getAllocator(), incoming, this,
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
index 5e08163..c31264a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
@@ -268,8 +268,7 @@ public abstract class HashAggTemplate implements HashAggregator {
}
ChainedHashTable ht =
- new ChainedHashTable(htConfig, context, allocator, incoming, null /* no incoming probe */, outgoing,
- true /* nulls are equal */);
+ new ChainedHashTable(htConfig, context, allocator, incoming, null /* no incoming probe */, outgoing);
this.htable = ht.createAndSetupHashTable(groupByOutFieldIds);
numGroupByOutFields = groupByOutFieldIds.length;
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java
index 260808c..972e8c7 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/ChainedHashTable.java
@@ -19,6 +19,7 @@ package org.apache.drill.exec.physical.impl.common;
import java.io.IOException;
import java.util.Arrays;
+import java.util.List;
import org.apache.drill.common.expression.ErrorCollector;
import org.apache.drill.common.expression.ErrorCollectorImpl;
@@ -116,11 +117,9 @@ public class ChainedHashTable {
private final RecordBatch incomingBuild;
private final RecordBatch incomingProbe;
private final RecordBatch outgoing;
- private final boolean areNullsEqual;
public ChainedHashTable(HashTableConfig htConfig, FragmentContext context, BufferAllocator allocator,
- RecordBatch incomingBuild, RecordBatch incomingProbe, RecordBatch outgoing,
- boolean areNullsEqual) {
+ RecordBatch incomingBuild, RecordBatch incomingProbe, RecordBatch outgoing) {
this.htConfig = htConfig;
this.context = context;
@@ -128,7 +127,6 @@ public class ChainedHashTable {
this.incomingBuild = incomingBuild;
this.incomingProbe = incomingProbe;
this.outgoing = outgoing;
- this.areNullsEqual = areNullsEqual;
}
public HashTable createAndSetupHashTable(TypedFieldId[] outKeyFieldIds) throws ClassTransformationException,
@@ -197,9 +195,10 @@ public class ChainedHashTable {
// generate code for isKeyMatch(), setValue(), getHash() and outputRecordKeys()
- setupIsKeyMatchInternal(cgInner, KeyMatchIncomingBuildMapping, KeyMatchHtableMapping, keyExprsBuild, htKeyFieldIds);
+ setupIsKeyMatchInternal(cgInner, KeyMatchIncomingBuildMapping, KeyMatchHtableMapping, keyExprsBuild,
+ htConfig.getComparators(), htKeyFieldIds);
setupIsKeyMatchInternal(cgInner, KeyMatchIncomingProbeMapping, KeyMatchHtableProbeMapping, keyExprsProbe,
- htKeyFieldIds);
+ htConfig.getComparators(), htKeyFieldIds);
setupSetValue(cgInner, keyExprsBuild, htKeyFieldIds);
if (outgoing != null) {
@@ -221,7 +220,7 @@ public class ChainedHashTable {
private void setupIsKeyMatchInternal(ClassGenerator<HashTable> cg, MappingSet incomingMapping, MappingSet htableMapping,
- LogicalExpression[] keyExprs, TypedFieldId[] htKeyFieldIds)
+ LogicalExpression[] keyExprs, List<Comparator> comparators, TypedFieldId[] htKeyFieldIds)
throws SchemaChangeException {
cg.setMappingSet(incomingMapping);
@@ -230,19 +229,20 @@ public class ChainedHashTable {
return;
}
- int i = 0;
- for (LogicalExpression expr : keyExprs) {
+ for (int i=0; i<keyExprs.length; i++) {
+ final LogicalExpression expr = keyExprs[i];
cg.setMappingSet(incomingMapping);
HoldingContainer left = cg.addExpr(expr, ClassGenerator.BlkCreateMode.FALSE);
cg.setMappingSet(htableMapping);
- ValueVectorReadExpression vvrExpr = new ValueVectorReadExpression(htKeyFieldIds[i++]);
+ ValueVectorReadExpression vvrExpr = new ValueVectorReadExpression(htKeyFieldIds[i]);
HoldingContainer right = cg.addExpr(vvrExpr, ClassGenerator.BlkCreateMode.FALSE);
JConditional jc;
// codegen for nullable columns if nulls are not equal
- if (!areNullsEqual && left.isOptional() && right.isOptional()) {
+ if (comparators.get(i) == Comparator.EQUALS
+ && left.isOptional() && right.isOptional()) {
jc = cg.getEvalBlock()._if(left.getIsSet().eq(JExpr.lit(0)).
cand(right.getIsSet().eq(JExpr.lit(0))));
jc._then()._return(JExpr.FALSE);
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/Comparator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/Comparator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/Comparator.java
new file mode 100644
index 0000000..fa9b45c
--- /dev/null
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/Comparator.java
@@ -0,0 +1,27 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.physical.impl.common;
+
+/**
+ * Comparator type. Used in Join and Aggregation operators.
+ */
+public enum Comparator {
+ NONE, // No comparator
+ EQUALS, // Equality comparator
+ IS_NOT_DISTINCT_FROM // 'IS NOT DISTINCT FROM' comparator
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableConfig.java
index a6b2587..1e3d7e9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashTableConfig.java
@@ -28,21 +28,22 @@ import java.util.List;
@JsonTypeName("hashtable-config")
public class HashTableConfig {
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(HashTableConfig.class);
-
private final int initialCapacity;
private final float loadFactor;
private final List<NamedExpression> keyExprsBuild;
private final List<NamedExpression> keyExprsProbe;
+ private final List<Comparator> comparators;
@JsonCreator
public HashTableConfig(@JsonProperty("initialCapacity") int initialCapacity, @JsonProperty("loadFactor") float loadFactor,
@JsonProperty("keyExprsBuild") List<NamedExpression> keyExprsBuild,
- @JsonProperty("keyExprsProbe") List<NamedExpression> keyExprsProbe) {
+ @JsonProperty("keyExprsProbe") List<NamedExpression> keyExprsProbe,
+ @JsonProperty("comparators") List<Comparator> comparators) {
this.initialCapacity = initialCapacity;
this.loadFactor = loadFactor;
this.keyExprsBuild = keyExprsBuild;
this.keyExprsProbe = keyExprsProbe;
+ this.comparators = comparators;
}
public int getInitialCapacity() {
@@ -61,4 +62,8 @@ public class HashTableConfig {
return keyExprsProbe;
}
+ public List<Comparator> getComparators() {
+ return comparators;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
index 431ced3..18cfc78 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import com.google.common.collect.Lists;
import org.apache.drill.common.expression.FieldReference;
import org.apache.drill.common.logical.data.JoinCondition;
import org.apache.drill.common.logical.data.NamedExpression;
@@ -44,7 +45,7 @@ import org.apache.drill.exec.physical.impl.common.HashTable;
import org.apache.drill.exec.physical.impl.common.HashTableConfig;
import org.apache.drill.exec.physical.impl.common.HashTableStats;
import org.apache.drill.exec.physical.impl.common.IndexPointer;
-import org.apache.drill.exec.physical.impl.join.JoinUtils.JoinComparator;
+import org.apache.drill.exec.physical.impl.common.Comparator;
import org.apache.drill.exec.physical.impl.sort.RecordBatchData;
import org.apache.drill.exec.record.AbstractRecordBatch;
import org.apache.drill.exec.record.BatchSchema;
@@ -79,6 +80,8 @@ public class HashJoinBatch extends AbstractRecordBatch<HashJoinPOP> {
// Join conditions
private final List<JoinCondition> conditions;
+ private final List<Comparator> comparators;
+
// Runtime generated class implementing HashJoinProbe interface
private HashJoinProbe hashJoinProbe = null;
@@ -285,19 +288,12 @@ public class HashJoinBatch extends AbstractRecordBatch<HashJoinPOP> {
final List<NamedExpression> rightExpr = new ArrayList<>(conditionsSize);
List<NamedExpression> leftExpr = new ArrayList<>(conditionsSize);
- JoinComparator comparator = JoinComparator.NONE;
// Create named expressions from the conditions
for (int i = 0; i < conditionsSize; i++) {
rightExpr.add(new NamedExpression(conditions.get(i).getRight(), new FieldReference("build_side_" + i)));
leftExpr.add(new NamedExpression(conditions.get(i).getLeft(), new FieldReference("probe_side_" + i)));
-
- // Hash join only supports certain types of comparisons
- comparator = JoinUtils.checkAndSetComparison(conditions.get(i), comparator);
}
- assert comparator != JoinComparator.NONE;
- final boolean areNullsEqual = (comparator == JoinComparator.IS_NOT_DISTINCT_FROM) ? true : false;
-
// Set the left named expression to be null if the probe batch is empty.
if (leftUpstream != IterOutcome.OK_NEW_SCHEMA && leftUpstream != IterOutcome.OK) {
leftExpr = null;
@@ -309,12 +305,11 @@ public class HashJoinBatch extends AbstractRecordBatch<HashJoinPOP> {
final HashTableConfig htConfig =
new HashTableConfig((int) context.getOptions().getOption(ExecConstants.MIN_HASH_TABLE_SIZE),
- HashTable.DEFAULT_LOAD_FACTOR, rightExpr, leftExpr);
+ HashTable.DEFAULT_LOAD_FACTOR, rightExpr, leftExpr, comparators);
// Create the chained hash table
final ChainedHashTable ht =
- new ChainedHashTable(htConfig, context, oContext.getAllocator(), this.right, this.left, null,
- areNullsEqual);
+ new ChainedHashTable(htConfig, context, oContext.getAllocator(), this.right, this.left, null);
hashTable = ht.createAndSetupHashTable(null);
}
@@ -500,6 +495,12 @@ public class HashJoinBatch extends AbstractRecordBatch<HashJoinPOP> {
this.right = right;
joinType = popConfig.getJoinType();
conditions = popConfig.getConditions();
+
+ comparators = Lists.newArrayListWithExpectedSize(conditions.size());
+ for (int i=0; i<conditions.size(); i++) {
+ JoinCondition cond = conditions.get(i);
+ comparators.add(JoinUtils.checkAndReturnSupportedJoinComparator(cond));
+ }
}
private void updateStats(HashTable htable) {
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java
index be363d2..caa18be 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java
@@ -21,10 +21,12 @@ package org.apache.drill.exec.physical.impl.join;
import org.apache.calcite.rel.core.Join;
import org.apache.calcite.rel.core.JoinRelType;
import org.apache.calcite.rex.RexNode;
+import org.apache.drill.common.exceptions.UserException;
import org.apache.drill.common.logical.data.JoinCondition;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.plan.RelOptUtil;
import org.apache.calcite.plan.volcano.RelSubset;
+import org.apache.drill.exec.physical.impl.common.Comparator;
import org.apache.drill.exec.planner.logical.DrillAggregateRel;
import org.apache.drill.exec.planner.logical.DrillFilterRel;
import org.apache.drill.exec.planner.logical.DrillProjectRel;
@@ -46,40 +48,28 @@ import java.util.List;
import com.google.common.collect.Lists;
public class JoinUtils {
- public static enum JoinComparator {
- NONE, // No comparator
- EQUALS, // Equality comparator
- IS_NOT_DISTINCT_FROM // 'IS NOT DISTINCT FROM' comparator
- }
- public static enum JoinCategory {
+ public enum JoinCategory {
EQUALITY, // equality join
INEQUALITY, // inequality join: <>, <, >
CARTESIAN // no join condition
}
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(JoinUtils.class);
- // Check the comparator for the join condition. Note that a similar check is also
+ // Check the comparator is supported in join condition. Note that a similar check is also
// done in JoinPrel; however we have to repeat it here because a physical plan
// may be submitted directly to Drill.
- public static JoinComparator checkAndSetComparison(JoinCondition condition,
- JoinComparator comparator) {
- if (condition.getRelationship().equalsIgnoreCase("EQUALS") ||
- condition.getRelationship().equals("==") /* older json plans still have '==' */) {
- if (comparator == JoinComparator.NONE ||
- comparator == JoinComparator.EQUALS) {
- return JoinComparator.EQUALS;
- } else {
- throw new IllegalArgumentException("This type of join does not support mixed comparators.");
- }
- } else if (condition.getRelationship().equalsIgnoreCase("IS_NOT_DISTINCT_FROM")) {
- if (comparator == JoinComparator.NONE ||
- comparator == JoinComparator.IS_NOT_DISTINCT_FROM) {
- return JoinComparator.IS_NOT_DISTINCT_FROM;
- } else {
- throw new IllegalArgumentException("This type of join does not support mixed comparators.");
- }
+ public static Comparator checkAndReturnSupportedJoinComparator(JoinCondition condition) {
+ switch(condition.getRelationship().toUpperCase()) {
+ case "EQUALS":
+ case "==": /* older json plans still have '==' */
+ return Comparator.EQUALS;
+ case "IS_NOT_DISTINCT_FROM":
+ return Comparator.IS_NOT_DISTINCT_FROM;
}
- throw new IllegalArgumentException("Invalid comparator supplied to this join.");
+ throw UserException.unsupportedError()
+ .message("Invalid comparator supplied to this join: ", condition.getRelationship())
+ .build(logger);
}
/**
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
index 234fd3a..90f3f5f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
@@ -22,6 +22,7 @@ import static org.apache.drill.exec.compile.sig.GeneratorMapping.GM;
import java.io.IOException;
import java.util.List;
+import com.google.common.collect.Lists;
import org.apache.calcite.rel.core.JoinRelType;
import org.apache.drill.common.expression.ErrorCollector;
import org.apache.drill.common.expression.ErrorCollectorImpl;
@@ -43,7 +44,7 @@ import org.apache.drill.exec.expr.ExpressionTreeMaterializer;
import org.apache.drill.exec.expr.fn.FunctionGenerationHelper;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.physical.config.MergeJoinPOP;
-import org.apache.drill.exec.physical.impl.join.JoinUtils.JoinComparator;
+import org.apache.drill.exec.physical.impl.common.Comparator;
import org.apache.drill.exec.record.AbstractRecordBatch;
import org.apache.drill.exec.record.BatchSchema;
import org.apache.drill.exec.record.MaterializedField;
@@ -98,10 +99,9 @@ public class MergeJoinBatch extends AbstractRecordBatch<MergeJoinPOP> {
private final RecordIterator rightIterator;
private final JoinStatus status;
private final List<JoinCondition> conditions;
+ private final List<Comparator> comparators;
private final JoinRelType joinType;
private JoinWorker worker;
- private boolean areNullsEqual = false; // whether nulls compare equal
-
private static final String LEFT_INPUT = "LEFT INPUT";
private static final String RIGHT_INPUT = "RIGHT INPUT";
@@ -120,12 +120,10 @@ public class MergeJoinBatch extends AbstractRecordBatch<MergeJoinPOP> {
this.status = new JoinStatus(leftIterator, rightIterator, this);
this.conditions = popConfig.getConditions();
- JoinComparator comparator = JoinComparator.NONE;
+ this.comparators = Lists.newArrayListWithExpectedSize(conditions.size());
for (JoinCondition condition : conditions) {
- comparator = JoinUtils.checkAndSetComparison(condition, comparator);
+ this.comparators.add(JoinUtils.checkAndReturnSupportedJoinComparator(condition));
}
- assert comparator != JoinComparator.NONE;
- areNullsEqual = (comparator == JoinComparator.IS_NOT_DISTINCT_FROM);
}
public JoinRelType getJoinType() {
@@ -461,7 +459,7 @@ public class MergeJoinBatch extends AbstractRecordBatch<MergeJoinPOP> {
// If not 0, it means not equal.
// Null compares to Null should returns null (unknown). In such case, we return 1 to indicate they are not equal.
if (compareLeftExprHolder.isOptional() && compareRightExprHolder.isOptional()
- && ! areNullsEqual) {
+ && comparators.get(i) == Comparator.EQUALS) {
JConditional jc = cg.getEvalBlock()._if(compareLeftExprHolder.getIsSet().eq(JExpr.lit(0)).
cand(compareRightExprHolder.getIsSet().eq(JExpr.lit(0))));
jc._then()._return(JExpr.lit(1));
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/JoinPrel.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/JoinPrel.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/JoinPrel.java
index 6df2949..dbacee8 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/JoinPrel.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/JoinPrel.java
@@ -21,6 +21,7 @@ package org.apache.drill.exec.planner.physical;
import java.util.Iterator;
import java.util.List;
+import org.apache.drill.common.exceptions.UserException;
import org.apache.drill.common.expression.FieldReference;
import org.apache.drill.common.logical.data.JoinCondition;
import org.apache.drill.exec.physical.impl.join.JoinUtils;
@@ -47,6 +48,7 @@ import com.google.common.collect.Lists;
*
*/
public abstract class JoinPrel extends DrillJoinRelBase implements Prel{
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(JoinPrel.class);
protected JoinUtils.JoinCategory joincategory;
@@ -127,27 +129,18 @@ public abstract class JoinPrel extends DrillJoinRelBase implements Prel{
List<RexNode> conjuncts = RelOptUtil.conjunctions(this.getCondition());
short i=0;
- RexNode comp1 = null, comp2 = null;
for (Pair<Integer, Integer> pair : Pair.zip(leftKeys, rightKeys)) {
- if (comp1 == null) {
- comp1 = conjuncts.get(i++);
- if ( ! (comp1.getKind() == SqlKind.EQUALS || comp1.getKind() == SqlKind.IS_NOT_DISTINCT_FROM)) {
- throw new IllegalArgumentException("This type of join only supports '=' and 'is not distinct from' comparators.");
- }
- } else {
- comp2 = conjuncts.get(i++);
- if (comp1.getKind() != comp2.getKind()) {
- // it does not seem necessary at this time to support join conditions which have mixed comparators - e.g
- // 'a1 = a2 AND b1 IS NOT DISTINCT FROM b2'
- String msg = String.format("This type of join does not support mixed comparators: '%s' and '%s'.", comp1, comp2);
- throw new IllegalArgumentException(msg);
- }
-
+ final RexNode conditionExpr = conjuncts.get(i++);
+ final SqlKind kind = conditionExpr.getKind();
+ if (kind != SqlKind.EQUALS && kind != SqlKind.IS_NOT_DISTINCT_FROM) {
+ throw UserException.unsupportedError()
+ .message("Unsupported comparator in join condition %s", conditionExpr)
+ .build(logger);
}
- conditions.add(new JoinCondition(comp1.getKind().toString(), FieldReference.getWithQuotedRef(leftFields.get(pair.left)),
+
+ conditions.add(new JoinCondition(kind.toString(),
+ FieldReference.getWithQuotedRef(leftFields.get(pair.left)),
FieldReference.getWithQuotedRef(rightFields.get(pair.right))));
}
-
}
-
}
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/test/java/org/apache/drill/TestJoinNullable.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestJoinNullable.java b/exec/java-exec/src/test/java/org/apache/drill/TestJoinNullable.java
index b34c7fd..2bd2811 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestJoinNullable.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestJoinNullable.java
@@ -20,7 +20,6 @@ package org.apache.drill;
import static org.junit.Assert.assertEquals;
import org.apache.drill.common.util.TestTools;
-import org.junit.Ignore;
import org.junit.Test;
public class TestJoinNullable extends BaseTestQuery{
@@ -477,7 +476,7 @@ public class TestJoinNullable extends BaseTestQuery{
}
@Test
- public void withNullEqualAdditionFilter() throws Exception {
+ public void testNullEqualAdditionFilter() throws Exception {
final String query = "SELECT * FROM "
+ "cp.`jsoninput/nullableOrdered1.json` t1 JOIN "
+ "cp.`jsoninput/nullableOrdered2.json` t2 "
@@ -493,4 +492,113 @@ public class TestJoinNullable extends BaseTestQuery{
.go();
}
+ @Test
+ public void testMixedEqualAndIsNotDistinctHashJoin() throws Exception {
+ enableJoin(true, false);
+ try {
+ final String query = "SELECT * FROM " +
+ "cp.`jsoninput/nullEqualJoin1.json` t1 JOIN " +
+ "cp.`jsoninput/nullEqualJoin2.json` t2 " +
+ "ON t1.key = t2.key AND t1.data is not distinct from t2.data";
+ nullMixedComparatorEqualJoinHelper(query);
+ } finally {
+ resetJoinOptions();
+ }
+ }
+
+ @Test
+ public void testMixedEqualAndIsNotDistinctMergeJoin() throws Exception {
+ enableJoin(false, true);
+ try {
+ final String query = "SELECT * FROM " +
+ "cp.`jsoninput/nullEqualJoin1.json` t1 JOIN " +
+ "cp.`jsoninput/nullEqualJoin2.json` t2 " +
+ "ON t1.key = t2.key AND t1.data is not distinct from t2.data";
+ nullMixedComparatorEqualJoinHelper(query);
+ } finally {
+ resetJoinOptions();
+ }
+ }
+
+ @Test
+ public void testMixedEqualAndIsNotDistinctFilterHashJoin() throws Exception {
+ enableJoin(true, false);
+ try {
+ final String query = "SELECT * FROM " +
+ "cp.`jsoninput/nullEqualJoin1.json` t1 JOIN " +
+ "cp.`jsoninput/nullEqualJoin2.json` t2 " +
+ "ON t1.key = t2.key " +
+ "WHERE t1.data is not distinct from t2.data";
+ // Expected the filter to be pushed into the join
+ nullMixedComparatorEqualJoinHelper(query);
+ } finally {
+ resetJoinOptions();
+ }
+ }
+
+ @Test
+ public void testMixedEqualAndIsNotDistinctFilterMergeJoin() throws Exception {
+ enableJoin(false, true);
+ try {
+ final String query = "SELECT * FROM " +
+ "cp.`jsoninput/nullEqualJoin1.json` t1 JOIN " +
+ "cp.`jsoninput/nullEqualJoin2.json` t2 " +
+ "ON t1.key = t2.key " +
+ "WHERE t1.data is not distinct from t2.data";
+ // Expected the filter to be pushed into the join
+ nullMixedComparatorEqualJoinHelper(query);
+ } finally {
+ resetJoinOptions();
+ }
+ }
+
+ @Test
+ public void testMixedEqualAndEqualOrHashJoin() throws Exception {
+ enableJoin(true, false);
+ try {
+ final String query = "SELECT * FROM " +
+ "cp.`jsoninput/nullEqualJoin1.json` t1 JOIN " +
+ "cp.`jsoninput/nullEqualJoin2.json` t2 " +
+ "ON t1.key = t2.key " +
+ "AND ((t1.data=t2.data) OR (t1.data IS NULL AND t2.data IS NULL))";
+ // Expected the filter to be pushed into the join
+ nullMixedComparatorEqualJoinHelper(query);
+ } finally {
+ resetJoinOptions();
+ }
+ }
+
+ @Test
+ public void testMixedEqualAndEqualOrMergeJoin() throws Exception {
+ enableJoin(false, true);
+ try {
+ final String query = "SELECT * FROM " +
+ "cp.`jsoninput/nullEqualJoin1.json` t1 JOIN " +
+ "cp.`jsoninput/nullEqualJoin2.json` t2 " +
+ "ON t1.key = t2.key " +
+ "AND ((t1.data=t2.data) OR (t1.data IS NULL AND t2.data IS NULL))";
+ // Expected the filter to be pushed into the join
+ nullMixedComparatorEqualJoinHelper(query);
+ } finally {
+ resetJoinOptions();
+ }
+ }
+
+ public void nullMixedComparatorEqualJoinHelper(final String query) throws Exception {
+ testBuilder()
+ .sqlQuery(query)
+ .unOrdered()
+ .baselineColumns("key", "data", "data0", "key0")
+ .baselineValues("A", "L_A_1", "L_A_1", "A")
+ .baselineValues("A", null, null, "A")
+ .baselineValues("B", null, null, "B")
+ .baselineValues("B", "L_B_1", "L_B_1", "B")
+ .go();
+ }
+
+ private static void resetJoinOptions() throws Exception {
+ test("alter session set `planner.enable_hashjoin` = true");
+ test("alter session set `planner.enable_mergejoin` = false");
+ }
+
}
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin1.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin1.json b/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin1.json
new file mode 100644
index 0000000..50f71b6
--- /dev/null
+++ b/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin1.json
@@ -0,0 +1,32 @@
+{
+ "key":"A",
+ "data":"L_A_1"
+}
+{
+ "key":"A",
+ "data":null
+}
+{
+ "key":"B",
+ "data":"L_B_1"
+}
+{
+ "key":"B",
+ "data":null
+}
+{
+ "key":null,
+ "data":"L_null_1"
+}
+{
+ "key":"A",
+ "data":"L_A_2"
+}
+{
+ "key":null,
+ "data":"L_null_2"
+}
+{
+ "key":"B",
+ "data":"L_B_2"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/5f34c960/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin2.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin2.json b/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin2.json
new file mode 100644
index 0000000..3cd80d9
--- /dev/null
+++ b/exec/java-exec/src/test/resources/jsoninput/nullEqualJoin2.json
@@ -0,0 +1,32 @@
+{
+ "key":null,
+ "data":"R_null_1"
+}
+{
+ "key":"A",
+ "data":"R_A_1"
+}
+{
+ "key":"A",
+ "data":"L_A_1"
+}
+{
+ "key":"B",
+ "data":"L_B_1"
+}
+{
+ "key":"B",
+ "data":null
+}
+{
+ "key":"A",
+ "data":null
+}
+{
+ "key":null,
+ "data":"R_null_2"
+}
+{
+ "key":null,
+ "data":"R_null_3"
+}
\ No newline at end of file
[4/5] drill git commit: DRILL-4986: Allow users to customize the
Drill log file name
Posted by su...@apache.org.
DRILL-4986: Allow users to customize the Drill log file name
Adds a new user-settable environment variable to choose the log file
base name.
closes #641
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e044f5a9
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e044f5a9
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e044f5a9
Branch: refs/heads/master
Commit: e044f5a9d007266b9094fb8899d0a05df0b0dd0d
Parents: e146aeb
Author: Paul Rogers <pr...@maprtech.com>
Authored: Tue Nov 1 11:26:03 2016 -0700
Committer: Sudheesh Katkam <sk...@maprtech.com>
Committed: Wed Nov 2 10:56:02 2016 -0700
----------------------------------------------------------------------
distribution/src/resources/drill-config.sh | 3 ++-
distribution/src/resources/drill-env.sh | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/e044f5a9/distribution/src/resources/drill-config.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-config.sh b/distribution/src/resources/drill-config.sh
index b36d856..ed03b28 100644
--- a/distribution/src/resources/drill-config.sh
+++ b/distribution/src/resources/drill-config.sh
@@ -226,7 +226,8 @@ export DRILL_PID_DIR=${DRILL_PID_DIR:-$DRILL_HOME}
# Prepare log file prefix and the main Drillbit log file.
-export DRILL_LOG_PREFIX="$DRILL_LOG_DIR/drillbit"
+export DRILL_LOG_NAME=${DRILL_LOG_NAME:-"drillbit"}
+export DRILL_LOG_PREFIX="$DRILL_LOG_DIR/$DRILL_LOG_NAME"
export DRILLBIT_LOG_PATH="${DRILL_LOG_PREFIX}.log"
# Class path construction.
http://git-wip-us.apache.org/repos/asf/drill/blob/e044f5a9/distribution/src/resources/drill-env.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-env.sh b/distribution/src/resources/drill-env.sh
index 9e11458..89a0c1e 100644
--- a/distribution/src/resources/drill-env.sh
+++ b/distribution/src/resources/drill-env.sh
@@ -62,6 +62,10 @@
#export DRILLBIT_CODE_CACHE_SIZE=${DRILLBIT_CODE_CACHE_SIZE:-"1G"}
+# Base name for Drill log files. Files are named ${DRILL_LOG_NAME}.out, etc.
+
+# DRILL_LOG_NAME="drillbit"
+
# Location to place Drill logs. Set to $DRILL_HOME/log by default.
#export DRILL_LOG_DIR=${DRILL_LOG_DIR:-$DRILL_HOME/conf}
[2/5] drill git commit: DRILL-4792: Include session options used for
a query as part of the profile
Posted by su...@apache.org.
DRILL-4792: Include session options used for a query as part of the profile
closes #551
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/6782f0ad
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/6782f0ad
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/6782f0ad
Branch: refs/heads/master
Commit: 6782f0ade3344842c34c24bfc80aebeda6ef3df5
Parents: 5f34c96
Author: Arina Ielchiieva <ar...@gmail.com>
Authored: Tue Jul 19 16:54:18 2016 +0000
Committer: Sudheesh Katkam <sk...@maprtech.com>
Committed: Wed Nov 2 10:56:01 2016 -0700
----------------------------------------------------------------------
.../drill/exec/server/options/OptionValue.java | 4 +
.../server/rest/profile/ProfileWrapper.java | 19 +-
.../drill/exec/work/foreman/QueryManager.java | 16 +-
.../src/main/resources/rest/profile/profile.ftl | 36 ++
.../drill/exec/proto/SchemaUserBitShared.java | 14 +
.../apache/drill/exec/proto/UserBitShared.java | 447 ++++++++++++++++---
.../drill/exec/proto/beans/QueryInfo.java | 22 +
.../drill/exec/proto/beans/QueryProfile.java | 22 +
protocol/src/main/protobuf/UserBitShared.proto | 2 +
9 files changed, 513 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
index 8753a51..96fdf0c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
@@ -99,6 +99,10 @@ public class OptionValue implements Comparable<OptionValue> {
this.bool_val = bool_val;
}
+ public String getName() {
+ return name;
+ }
+
@JsonIgnore
public Object getValue() {
switch (kind) {
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
index f73ab90..84cff7a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
@@ -23,6 +23,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile;
@@ -30,17 +31,22 @@ import org.apache.drill.exec.proto.UserBitShared.MinorFragmentProfile;
import org.apache.drill.exec.proto.UserBitShared.OperatorProfile;
import org.apache.drill.exec.proto.UserBitShared.QueryProfile;
import org.apache.drill.exec.proto.helper.QueryIdHelper;
+import org.apache.drill.exec.server.options.OptionList;
+
+import static com.fasterxml.jackson.databind.SerializationFeature.INDENT_OUTPUT;
/**
* Wrapper class for a {@link #profile query profile}, so it to be presented through web UI.
*/
public class ProfileWrapper {
-// private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProfileWrapper.class);
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProfileWrapper.class);
+ private static final ObjectMapper mapper = new ObjectMapper().enable(INDENT_OUTPUT);
private QueryProfile profile;
private String id;
private final List<FragmentWrapper> fragmentProfiles;
private final List<OperatorWrapper> operatorProfiles;
+ private OptionList options;
public ProfileWrapper(final QueryProfile profile) {
this.profile = profile;
@@ -89,6 +95,13 @@ public class ProfileWrapper {
ows.add(new OperatorWrapper(ip.getLeft(), opmap.get(ip)));
}
this.operatorProfiles = ows;
+
+ try {
+ options = mapper.readValue(profile.getOptionsJson(), OptionList.class);
+ } catch (Exception e) {
+ logger.error("Unable to deserialize query options", e);
+ options = new OptionList();
+ }
}
public boolean hasError() {
@@ -136,4 +149,8 @@ public class ProfileWrapper {
}
return sb.append("}").toString();
}
+
+ public OptionList getOptionList() {
+ return options;
+ }
}
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
index b76fd7b..25b88b8 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
@@ -17,6 +17,8 @@
*/
package org.apache.drill.exec.work.foreman;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
import io.netty.buffer.ByteBuf;
import java.util.List;
@@ -48,6 +50,7 @@ import org.apache.drill.exec.proto.helper.QueryIdHelper;
import org.apache.drill.exec.rpc.RpcException;
import org.apache.drill.exec.rpc.control.Controller;
import org.apache.drill.exec.server.DrillbitContext;
+import org.apache.drill.exec.server.options.OptionList;
import org.apache.drill.exec.store.sys.PersistentStore;
import org.apache.drill.exec.store.sys.PersistentStoreConfig;
import org.apache.drill.exec.store.sys.PersistentStoreProvider;
@@ -320,6 +323,7 @@ public class QueryManager implements AutoCloseable {
.setUser(foreman.getQueryContext().getQueryUserName())
.setForeman(foreman.getQueryContext().getCurrentEndpoint())
.setStart(startTime)
+ .setOptionsJson(getQueryOptionsAsJson())
.build();
}
@@ -338,7 +342,8 @@ public class QueryManager implements AutoCloseable {
.setStart(startTime)
.setEnd(endTime)
.setTotalFragments(fragmentDataSet.size())
- .setFinishedFragments(finishedFragments.get());
+ .setFinishedFragments(finishedFragments.get())
+ .setOptionsJson(getQueryOptionsAsJson());
if (ex != null) {
profileBuilder.setError(ex.getMessage(false));
@@ -358,6 +363,15 @@ public class QueryManager implements AutoCloseable {
return profileBuilder.build();
}
+ private String getQueryOptionsAsJson() {
+ try {
+ OptionList optionList = foreman.getQueryContext().getOptions().getOptionList();
+ return foreman.getQueryContext().getLpPersistence().getMapper().writeValueAsString(optionList);
+ } catch (JsonProcessingException e) {
+ throw new DrillRuntimeException("Error while trying to convert option list to json string", e);
+ }
+ }
+
private class OuterIter implements IntObjectPredicate<IntObjectHashMap<FragmentData>> {
private final QueryProfile.Builder profileBuilder;
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/resources/rest/profile/profile.ftl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/rest/profile/profile.ftl b/exec/java-exec/src/main/resources/rest/profile/profile.ftl
index 88dbe21..ef971fb 100644
--- a/exec/java-exec/src/main/resources/rest/profile/profile.ftl
+++ b/exec/java-exec/src/main/resources/rest/profile/profile.ftl
@@ -107,6 +107,42 @@
<p>FOREMAN: ${model.getProfile().getForeman().getAddress()}</p>
<p>TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}</p>
+ <#if (model.getOptionList()?size > 0)>
+ <div class="page-header"></div>
+ <h3>Session Options</h3>
+ <div class="panel-group" id="session-options-accordion">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" href="#session-options-overview">
+ Overview
+ </a>
+ </h4>
+ </div>
+ <div id="session-options-overview" class="panel-collapse collapse in">
+ <div class="panel-body">
+ <table class="table table-bordered">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <#list model.getOptionList() as option>
+ <tr>
+ <td>${option.getName()}</td>
+ <td>${option.getValue()?c}</td>
+ </tr>
+ </#list>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </#if>
+
<div class="page-header"></div>
<h3>Fragment Profiles</h3>
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
index 037484d..f31110d 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
@@ -1616,6 +1616,8 @@ public final class SchemaUserBitShared
if(message.hasForeman())
output.writeObject(5, message.getForeman(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.WRITE, false);
+ if(message.hasOptionsJson())
+ output.writeString(6, message.getOptionsJson(), false);
}
public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryInfo message)
{
@@ -1671,6 +1673,9 @@ public final class SchemaUserBitShared
builder.setForeman(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE));
break;
+ case 6:
+ builder.setOptionsJson(input.readString());
+ break;
default:
input.handleUnknownField(number, this);
}
@@ -1716,6 +1721,7 @@ public final class SchemaUserBitShared
case 3: return "state";
case 4: return "user";
case 5: return "foreman";
+ case 6: return "optionsJson";
default: return null;
}
}
@@ -1732,6 +1738,7 @@ public final class SchemaUserBitShared
fieldMap.put("state", 3);
fieldMap.put("user", 4);
fieldMap.put("foreman", 5);
+ fieldMap.put("optionsJson", 6);
}
}
@@ -1781,6 +1788,8 @@ public final class SchemaUserBitShared
output.writeString(15, message.getErrorId(), false);
if(message.hasErrorNode())
output.writeString(16, message.getErrorNode(), false);
+ if(message.hasOptionsJson())
+ output.writeString(17, message.getOptionsJson(), false);
}
public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryProfile message)
{
@@ -1871,6 +1880,9 @@ public final class SchemaUserBitShared
case 16:
builder.setErrorNode(input.readString());
break;
+ case 17:
+ builder.setOptionsJson(input.readString());
+ break;
default:
input.handleUnknownField(number, this);
}
@@ -1927,6 +1939,7 @@ public final class SchemaUserBitShared
case 14: return "verboseError";
case 15: return "errorId";
case 16: return "errorNode";
+ case 17: return "optionsJson";
default: return null;
}
}
@@ -1954,6 +1967,7 @@ public final class SchemaUserBitShared
fieldMap.put("verboseError", 14);
fieldMap.put("errorId", 15);
fieldMap.put("errorNode", 16);
+ fieldMap.put("optionsJson", 17);
}
}
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
index f0c783b..9a61cbb 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
@@ -11999,6 +11999,21 @@ public final class UserBitShared {
* <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
*/
org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getForemanOrBuilder();
+
+ // optional string options_json = 6;
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ boolean hasOptionsJson();
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ java.lang.String getOptionsJson();
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ com.google.protobuf.ByteString
+ getOptionsJsonBytes();
}
/**
* Protobuf type {@code exec.shared.QueryInfo}
@@ -12090,6 +12105,11 @@ public final class UserBitShared {
bitField0_ |= 0x00000010;
break;
}
+ case 50: {
+ bitField0_ |= 0x00000020;
+ optionsJson_ = input.readBytes();
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -12270,12 +12290,56 @@ public final class UserBitShared {
return foreman_;
}
+ // optional string options_json = 6;
+ public static final int OPTIONS_JSON_FIELD_NUMBER = 6;
+ private java.lang.Object optionsJson_;
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public boolean hasOptionsJson() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public java.lang.String getOptionsJson() {
+ java.lang.Object ref = optionsJson_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ optionsJson_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getOptionsJsonBytes() {
+ java.lang.Object ref = optionsJson_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ optionsJson_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private void initFields() {
query_ = "";
start_ = 0L;
state_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.STARTING;
user_ = "-";
foreman_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
+ optionsJson_ = "";
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@@ -12304,6 +12368,9 @@ public final class UserBitShared {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(5, foreman_);
}
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ output.writeBytes(6, getOptionsJsonBytes());
+ }
getUnknownFields().writeTo(output);
}
@@ -12333,6 +12400,10 @@ public final class UserBitShared {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, foreman_);
}
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(6, getOptionsJsonBytes());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
@@ -12464,6 +12535,8 @@ public final class UserBitShared {
foremanBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
+ optionsJson_ = "";
+ bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@@ -12516,6 +12589,10 @@ public final class UserBitShared {
} else {
result.foreman_ = foremanBuilder_.build();
}
+ if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
+ to_bitField0_ |= 0x00000020;
+ }
+ result.optionsJson_ = optionsJson_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@@ -12551,6 +12628,11 @@ public final class UserBitShared {
if (other.hasForeman()) {
mergeForeman(other.getForeman());
}
+ if (other.hasOptionsJson()) {
+ bitField0_ |= 0x00000020;
+ optionsJson_ = other.optionsJson_;
+ onChanged();
+ }
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@@ -12912,6 +12994,80 @@ public final class UserBitShared {
return foremanBuilder_;
}
+ // optional string options_json = 6;
+ private java.lang.Object optionsJson_ = "";
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public boolean hasOptionsJson() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public java.lang.String getOptionsJson() {
+ java.lang.Object ref = optionsJson_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ optionsJson_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public com.google.protobuf.ByteString
+ getOptionsJsonBytes() {
+ java.lang.Object ref = optionsJson_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ optionsJson_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public Builder setOptionsJson(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000020;
+ optionsJson_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public Builder clearOptionsJson() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ optionsJson_ = getDefaultInstance().getOptionsJson();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string options_json = 6;</code>
+ */
+ public Builder setOptionsJsonBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000020;
+ optionsJson_ = value;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:exec.shared.QueryInfo)
}
@@ -13143,6 +13299,21 @@ public final class UserBitShared {
*/
com.google.protobuf.ByteString
getErrorNodeBytes();
+
+ // optional string options_json = 17;
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ boolean hasOptionsJson();
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ java.lang.String getOptionsJson();
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ com.google.protobuf.ByteString
+ getOptionsJsonBytes();
}
/**
* Protobuf type {@code exec.shared.QueryProfile}
@@ -13306,6 +13477,11 @@ public final class UserBitShared {
errorNode_ = input.readBytes();
break;
}
+ case 138: {
+ bitField0_ |= 0x00008000;
+ optionsJson_ = input.readBytes();
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -13826,6 +14002,49 @@ public final class UserBitShared {
}
}
+ // optional string options_json = 17;
+ public static final int OPTIONS_JSON_FIELD_NUMBER = 17;
+ private java.lang.Object optionsJson_;
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public boolean hasOptionsJson() {
+ return ((bitField0_ & 0x00008000) == 0x00008000);
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public java.lang.String getOptionsJson() {
+ java.lang.Object ref = optionsJson_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ optionsJson_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public com.google.protobuf.ByteString
+ getOptionsJsonBytes() {
+ java.lang.Object ref = optionsJson_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ optionsJson_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private void initFields() {
id_ = org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance();
type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL;
@@ -13843,6 +14062,7 @@ public final class UserBitShared {
verboseError_ = "";
errorId_ = "";
errorNode_ = "";
+ optionsJson_ = "";
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@@ -13904,6 +14124,9 @@ public final class UserBitShared {
if (((bitField0_ & 0x00004000) == 0x00004000)) {
output.writeBytes(16, getErrorNodeBytes());
}
+ if (((bitField0_ & 0x00008000) == 0x00008000)) {
+ output.writeBytes(17, getOptionsJsonBytes());
+ }
getUnknownFields().writeTo(output);
}
@@ -13977,6 +14200,10 @@ public final class UserBitShared {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(16, getErrorNodeBytes());
}
+ if (((bitField0_ & 0x00008000) == 0x00008000)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(17, getOptionsJsonBytes());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
@@ -14140,6 +14367,8 @@ public final class UserBitShared {
bitField0_ = (bitField0_ & ~0x00004000);
errorNode_ = "";
bitField0_ = (bitField0_ & ~0x00008000);
+ optionsJson_ = "";
+ bitField0_ = (bitField0_ & ~0x00010000);
return this;
}
@@ -14245,6 +14474,10 @@ public final class UserBitShared {
to_bitField0_ |= 0x00004000;
}
result.errorNode_ = errorNode_;
+ if (((from_bitField0_ & 0x00010000) == 0x00010000)) {
+ to_bitField0_ |= 0x00008000;
+ }
+ result.optionsJson_ = optionsJson_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@@ -14346,6 +14579,11 @@ public final class UserBitShared {
errorNode_ = other.errorNode_;
onChanged();
}
+ if (other.hasOptionsJson()) {
+ bitField0_ |= 0x00010000;
+ optionsJson_ = other.optionsJson_;
+ onChanged();
+ }
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@@ -15569,6 +15807,80 @@ public final class UserBitShared {
return this;
}
+ // optional string options_json = 17;
+ private java.lang.Object optionsJson_ = "";
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public boolean hasOptionsJson() {
+ return ((bitField0_ & 0x00010000) == 0x00010000);
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public java.lang.String getOptionsJson() {
+ java.lang.Object ref = optionsJson_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ optionsJson_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public com.google.protobuf.ByteString
+ getOptionsJsonBytes() {
+ java.lang.Object ref = optionsJson_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ optionsJson_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public Builder setOptionsJson(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00010000;
+ optionsJson_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public Builder clearOptionsJson() {
+ bitField0_ = (bitField0_ & ~0x00010000);
+ optionsJson_ = getDefaultInstance().getOptionsJson();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string options_json = 17;</code>
+ */
+ public Builder setOptionsJsonBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00010000;
+ optionsJson_ = value;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:exec.shared.QueryProfile)
}
@@ -22219,73 +22531,74 @@ public final class UserBitShared {
"ENQUEUED\020\006\"p\n\tQueryData\022&\n\010query_id\030\001 \001(" +
"\0132\024.exec.shared.QueryId\022\021\n\trow_count\030\002 \001" +
"(\005\022(\n\003def\030\003 \001(\0132\033.exec.shared.RecordBatc" +
- "hDef\"\227\001\n\tQueryInfo\022\r\n\005query\030\001 \001(\t\022\r\n\005sta" +
+ "hDef\"\255\001\n\tQueryInfo\022\r\n\005query\030\001 \001(\t\022\r\n\005sta" +
"rt\030\002 \001(\003\0222\n\005state\030\003 \001(\0162#.exec.shared.Qu",
"eryResult.QueryState\022\017\n\004user\030\004 \001(\t:\001-\022\'\n" +
- "\007foreman\030\005 \001(\0132\026.exec.DrillbitEndpoint\"\272" +
- "\003\n\014QueryProfile\022 \n\002id\030\001 \001(\0132\024.exec.share" +
- "d.QueryId\022$\n\004type\030\002 \001(\0162\026.exec.shared.Qu" +
- "eryType\022\r\n\005start\030\003 \001(\003\022\013\n\003end\030\004 \001(\003\022\r\n\005q" +
- "uery\030\005 \001(\t\022\014\n\004plan\030\006 \001(\t\022\'\n\007foreman\030\007 \001(" +
- "\0132\026.exec.DrillbitEndpoint\0222\n\005state\030\010 \001(\016" +
- "2#.exec.shared.QueryResult.QueryState\022\027\n" +
- "\017total_fragments\030\t \001(\005\022\032\n\022finished_fragm" +
- "ents\030\n \001(\005\022;\n\020fragment_profile\030\013 \003(\0132!.e",
- "xec.shared.MajorFragmentProfile\022\017\n\004user\030" +
- "\014 \001(\t:\001-\022\r\n\005error\030\r \001(\t\022\024\n\014verboseError\030" +
- "\016 \001(\t\022\020\n\010error_id\030\017 \001(\t\022\022\n\nerror_node\030\020 " +
- "\001(\t\"t\n\024MajorFragmentProfile\022\031\n\021major_fra" +
- "gment_id\030\001 \001(\005\022A\n\026minor_fragment_profile" +
- "\030\002 \003(\0132!.exec.shared.MinorFragmentProfil" +
- "e\"\350\002\n\024MinorFragmentProfile\022)\n\005state\030\001 \001(" +
- "\0162\032.exec.shared.FragmentState\022(\n\005error\030\002" +
- " \001(\0132\031.exec.shared.DrillPBError\022\031\n\021minor" +
- "_fragment_id\030\003 \001(\005\0226\n\020operator_profile\030\004",
- " \003(\0132\034.exec.shared.OperatorProfile\022\022\n\nst" +
- "art_time\030\005 \001(\003\022\020\n\010end_time\030\006 \001(\003\022\023\n\013memo" +
- "ry_used\030\007 \001(\003\022\027\n\017max_memory_used\030\010 \001(\003\022(" +
- "\n\010endpoint\030\t \001(\0132\026.exec.DrillbitEndpoint" +
- "\022\023\n\013last_update\030\n \001(\003\022\025\n\rlast_progress\030\013" +
- " \001(\003\"\377\001\n\017OperatorProfile\0221\n\rinput_profil" +
- "e\030\001 \003(\0132\032.exec.shared.StreamProfile\022\023\n\013o" +
- "perator_id\030\003 \001(\005\022\025\n\roperator_type\030\004 \001(\005\022" +
- "\023\n\013setup_nanos\030\005 \001(\003\022\025\n\rprocess_nanos\030\006 " +
- "\001(\003\022#\n\033peak_local_memory_allocated\030\007 \001(\003",
- "\022(\n\006metric\030\010 \003(\0132\030.exec.shared.MetricVal" +
- "ue\022\022\n\nwait_nanos\030\t \001(\003\"B\n\rStreamProfile\022" +
- "\017\n\007records\030\001 \001(\003\022\017\n\007batches\030\002 \001(\003\022\017\n\007sch" +
- "emas\030\003 \001(\003\"J\n\013MetricValue\022\021\n\tmetric_id\030\001" +
- " \001(\005\022\022\n\nlong_value\030\002 \001(\003\022\024\n\014double_value" +
- "\030\003 \001(\001\")\n\010Registry\022\035\n\003jar\030\001 \003(\0132\020.exec.s" +
- "hared.Jar\"/\n\003Jar\022\014\n\004name\030\001 \001(\t\022\032\n\022functi" +
- "on_signature\030\002 \003(\t*5\n\nRpcChannel\022\017\n\013BIT_" +
- "CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002*V\n\tQue" +
- "ryType\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL",
- "\020\003\022\r\n\tEXECUTION\020\004\022\026\n\022PREPARED_STATEMENT\020" +
- "\005*\207\001\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023AWAI" +
- "TING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FINISH" +
- "ED\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\022\032\n\026CANCE" +
- "LLATION_REQUESTED\020\006*\335\005\n\020CoreOperatorType" +
- "\022\021\n\rSINGLE_SENDER\020\000\022\024\n\020BROADCAST_SENDER\020" +
- "\001\022\n\n\006FILTER\020\002\022\022\n\016HASH_AGGREGATE\020\003\022\r\n\tHAS" +
- "H_JOIN\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HASH_PARTITI" +
- "ON_SENDER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGING_RECEIV" +
- "ER\020\010\022\034\n\030ORDERED_PARTITION_SENDER\020\t\022\013\n\007PR",
- "OJECT\020\n\022\026\n\022UNORDERED_RECEIVER\020\013\022\020\n\014RANGE" +
- "_SENDER\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECTION_VECTO" +
- "R_REMOVER\020\016\022\027\n\023STREAMING_AGGREGATE\020\017\022\016\n\n" +
- "TOP_N_SORT\020\020\022\021\n\rEXTERNAL_SORT\020\021\022\t\n\005TRACE" +
- "\020\022\022\t\n\005UNION\020\023\022\014\n\010OLD_SORT\020\024\022\032\n\026PARQUET_R" +
- "OW_GROUP_SCAN\020\025\022\021\n\rHIVE_SUB_SCAN\020\026\022\025\n\021SY" +
- "STEM_TABLE_SCAN\020\027\022\021\n\rMOCK_SUB_SCAN\020\030\022\022\n\016" +
- "PARQUET_WRITER\020\031\022\023\n\017DIRECT_SUB_SCAN\020\032\022\017\n" +
- "\013TEXT_WRITER\020\033\022\021\n\rTEXT_SUB_SCAN\020\034\022\021\n\rJSO" +
- "N_SUB_SCAN\020\035\022\030\n\024INFO_SCHEMA_SUB_SCAN\020\036\022\023",
- "\n\017COMPLEX_TO_JSON\020\037\022\025\n\021PRODUCER_CONSUMER" +
- "\020 \022\022\n\016HBASE_SUB_SCAN\020!\022\n\n\006WINDOW\020\"\022\024\n\020NE" +
- "STED_LOOP_JOIN\020#\022\021\n\rAVRO_SUB_SCAN\020$B.\n\033o" +
- "rg.apache.drill.exec.protoB\rUserBitShare" +
- "dH\001"
+ "\007foreman\030\005 \001(\0132\026.exec.DrillbitEndpoint\022\024" +
+ "\n\014options_json\030\006 \001(\t\"\320\003\n\014QueryProfile\022 \n" +
+ "\002id\030\001 \001(\0132\024.exec.shared.QueryId\022$\n\004type\030" +
+ "\002 \001(\0162\026.exec.shared.QueryType\022\r\n\005start\030\003" +
+ " \001(\003\022\013\n\003end\030\004 \001(\003\022\r\n\005query\030\005 \001(\t\022\014\n\004plan" +
+ "\030\006 \001(\t\022\'\n\007foreman\030\007 \001(\0132\026.exec.DrillbitE" +
+ "ndpoint\0222\n\005state\030\010 \001(\0162#.exec.shared.Que" +
+ "ryResult.QueryState\022\027\n\017total_fragments\030\t" +
+ " \001(\005\022\032\n\022finished_fragments\030\n \001(\005\022;\n\020frag",
+ "ment_profile\030\013 \003(\0132!.exec.shared.MajorFr" +
+ "agmentProfile\022\017\n\004user\030\014 \001(\t:\001-\022\r\n\005error\030" +
+ "\r \001(\t\022\024\n\014verboseError\030\016 \001(\t\022\020\n\010error_id\030" +
+ "\017 \001(\t\022\022\n\nerror_node\030\020 \001(\t\022\024\n\014options_jso" +
+ "n\030\021 \001(\t\"t\n\024MajorFragmentProfile\022\031\n\021major" +
+ "_fragment_id\030\001 \001(\005\022A\n\026minor_fragment_pro" +
+ "file\030\002 \003(\0132!.exec.shared.MinorFragmentPr" +
+ "ofile\"\350\002\n\024MinorFragmentProfile\022)\n\005state\030" +
+ "\001 \001(\0162\032.exec.shared.FragmentState\022(\n\005err" +
+ "or\030\002 \001(\0132\031.exec.shared.DrillPBError\022\031\n\021m",
+ "inor_fragment_id\030\003 \001(\005\0226\n\020operator_profi" +
+ "le\030\004 \003(\0132\034.exec.shared.OperatorProfile\022\022" +
+ "\n\nstart_time\030\005 \001(\003\022\020\n\010end_time\030\006 \001(\003\022\023\n\013" +
+ "memory_used\030\007 \001(\003\022\027\n\017max_memory_used\030\010 \001" +
+ "(\003\022(\n\010endpoint\030\t \001(\0132\026.exec.DrillbitEndp" +
+ "oint\022\023\n\013last_update\030\n \001(\003\022\025\n\rlast_progre" +
+ "ss\030\013 \001(\003\"\377\001\n\017OperatorProfile\0221\n\rinput_pr" +
+ "ofile\030\001 \003(\0132\032.exec.shared.StreamProfile\022" +
+ "\023\n\013operator_id\030\003 \001(\005\022\025\n\roperator_type\030\004 " +
+ "\001(\005\022\023\n\013setup_nanos\030\005 \001(\003\022\025\n\rprocess_nano",
+ "s\030\006 \001(\003\022#\n\033peak_local_memory_allocated\030\007" +
+ " \001(\003\022(\n\006metric\030\010 \003(\0132\030.exec.shared.Metri" +
+ "cValue\022\022\n\nwait_nanos\030\t \001(\003\"B\n\rStreamProf" +
+ "ile\022\017\n\007records\030\001 \001(\003\022\017\n\007batches\030\002 \001(\003\022\017\n" +
+ "\007schemas\030\003 \001(\003\"J\n\013MetricValue\022\021\n\tmetric_" +
+ "id\030\001 \001(\005\022\022\n\nlong_value\030\002 \001(\003\022\024\n\014double_v" +
+ "alue\030\003 \001(\001\")\n\010Registry\022\035\n\003jar\030\001 \003(\0132\020.ex" +
+ "ec.shared.Jar\"/\n\003Jar\022\014\n\004name\030\001 \001(\t\022\032\n\022fu" +
+ "nction_signature\030\002 \003(\t*5\n\nRpcChannel\022\017\n\013" +
+ "BIT_CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002*V\n",
+ "\tQueryType\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYS" +
+ "ICAL\020\003\022\r\n\tEXECUTION\020\004\022\026\n\022PREPARED_STATEM" +
+ "ENT\020\005*\207\001\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023" +
+ "AWAITING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FI" +
+ "NISHED\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\022\032\n\026C" +
+ "ANCELLATION_REQUESTED\020\006*\335\005\n\020CoreOperator" +
+ "Type\022\021\n\rSINGLE_SENDER\020\000\022\024\n\020BROADCAST_SEN" +
+ "DER\020\001\022\n\n\006FILTER\020\002\022\022\n\016HASH_AGGREGATE\020\003\022\r\n" +
+ "\tHASH_JOIN\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HASH_PAR" +
+ "TITION_SENDER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGING_RE",
+ "CEIVER\020\010\022\034\n\030ORDERED_PARTITION_SENDER\020\t\022\013" +
+ "\n\007PROJECT\020\n\022\026\n\022UNORDERED_RECEIVER\020\013\022\020\n\014R" +
+ "ANGE_SENDER\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECTION_V" +
+ "ECTOR_REMOVER\020\016\022\027\n\023STREAMING_AGGREGATE\020\017" +
+ "\022\016\n\nTOP_N_SORT\020\020\022\021\n\rEXTERNAL_SORT\020\021\022\t\n\005T" +
+ "RACE\020\022\022\t\n\005UNION\020\023\022\014\n\010OLD_SORT\020\024\022\032\n\026PARQU" +
+ "ET_ROW_GROUP_SCAN\020\025\022\021\n\rHIVE_SUB_SCAN\020\026\022\025" +
+ "\n\021SYSTEM_TABLE_SCAN\020\027\022\021\n\rMOCK_SUB_SCAN\020\030" +
+ "\022\022\n\016PARQUET_WRITER\020\031\022\023\n\017DIRECT_SUB_SCAN\020" +
+ "\032\022\017\n\013TEXT_WRITER\020\033\022\021\n\rTEXT_SUB_SCAN\020\034\022\021\n",
+ "\rJSON_SUB_SCAN\020\035\022\030\n\024INFO_SCHEMA_SUB_SCAN" +
+ "\020\036\022\023\n\017COMPLEX_TO_JSON\020\037\022\025\n\021PRODUCER_CONS" +
+ "UMER\020 \022\022\n\016HBASE_SUB_SCAN\020!\022\n\n\006WINDOW\020\"\022\024" +
+ "\n\020NESTED_LOOP_JOIN\020#\022\021\n\rAVRO_SUB_SCAN\020$B" +
+ ".\n\033org.apache.drill.exec.protoB\rUserBitS" +
+ "haredH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -22369,13 +22682,13 @@ public final class UserBitShared {
internal_static_exec_shared_QueryInfo_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_shared_QueryInfo_descriptor,
- new java.lang.String[] { "Query", "Start", "State", "User", "Foreman", });
+ new java.lang.String[] { "Query", "Start", "State", "User", "Foreman", "OptionsJson", });
internal_static_exec_shared_QueryProfile_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_exec_shared_QueryProfile_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_shared_QueryProfile_descriptor,
- new java.lang.String[] { "Id", "Type", "Start", "End", "Query", "Plan", "Foreman", "State", "TotalFragments", "FinishedFragments", "FragmentProfile", "User", "Error", "VerboseError", "ErrorId", "ErrorNode", });
+ new java.lang.String[] { "Id", "Type", "Start", "End", "Query", "Plan", "Foreman", "State", "TotalFragments", "FinishedFragments", "FragmentProfile", "User", "Error", "VerboseError", "ErrorId", "ErrorNode", "OptionsJson", });
internal_static_exec_shared_MajorFragmentProfile_descriptor =
getDescriptor().getMessageTypes().get(14);
internal_static_exec_shared_MajorFragmentProfile_fieldAccessorTable = new
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
index 612b483..4331ca3 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
@@ -54,6 +54,7 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>, Sche
private QueryResult.QueryState state;
private String user = DEFAULT_USER;
private DrillbitEndpoint foreman;
+ private String optionsJson;
public QueryInfo()
{
@@ -127,6 +128,19 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>, Sche
return this;
}
+ // optionsJson
+
+ public String getOptionsJson()
+ {
+ return optionsJson;
+ }
+
+ public QueryInfo setOptionsJson(String optionsJson)
+ {
+ this.optionsJson = optionsJson;
+ return this;
+ }
+
// java serialization
public void readExternal(ObjectInput in) throws IOException
@@ -197,6 +211,9 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>, Sche
message.foreman = input.mergeObject(message.foreman, DrillbitEndpoint.getSchema());
break;
+ case 6:
+ message.optionsJson = input.readString();
+ break;
default:
input.handleUnknownField(number, this);
}
@@ -221,6 +238,9 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>, Sche
if(message.foreman != null)
output.writeObject(5, message.foreman, DrillbitEndpoint.getSchema(), false);
+
+ if(message.optionsJson != null)
+ output.writeString(6, message.optionsJson, false);
}
public String getFieldName(int number)
@@ -232,6 +252,7 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>, Sche
case 3: return "state";
case 4: return "user";
case 5: return "foreman";
+ case 6: return "optionsJson";
default: return null;
}
}
@@ -250,6 +271,7 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>, Sche
__fieldMap.put("state", 3);
__fieldMap.put("user", 4);
__fieldMap.put("foreman", 5);
+ __fieldMap.put("optionsJson", 6);
}
}
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
index d3fac19..150db26 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
@@ -67,6 +67,7 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
private String verboseError;
private String errorId;
private String errorNode;
+ private String optionsJson;
public QueryProfile()
{
@@ -283,6 +284,19 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
return this;
}
+ // optionsJson
+
+ public String getOptionsJson()
+ {
+ return optionsJson;
+ }
+
+ public QueryProfile setOptionsJson(String optionsJson)
+ {
+ this.optionsJson = optionsJson;
+ return this;
+ }
+
// java serialization
public void readExternal(ObjectInput in) throws IOException
@@ -390,6 +404,9 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
case 16:
message.errorNode = input.readString();
break;
+ case 17:
+ message.optionsJson = input.readString();
+ break;
default:
input.handleUnknownField(number, this);
}
@@ -455,6 +472,9 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
if(message.errorNode != null)
output.writeString(16, message.errorNode, false);
+
+ if(message.optionsJson != null)
+ output.writeString(17, message.optionsJson, false);
}
public String getFieldName(int number)
@@ -477,6 +497,7 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
case 14: return "verboseError";
case 15: return "errorId";
case 16: return "errorNode";
+ case 17: return "optionsJson";
default: return null;
}
}
@@ -506,6 +527,7 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
__fieldMap.put("verboseError", 14);
__fieldMap.put("errorId", 15);
__fieldMap.put("errorNode", 16);
+ __fieldMap.put("optionsJson", 17);
}
}
http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/protobuf/UserBitShared.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto
index 03b1a0b..5efca2d 100644
--- a/protocol/src/main/protobuf/UserBitShared.proto
+++ b/protocol/src/main/protobuf/UserBitShared.proto
@@ -185,6 +185,7 @@ message QueryInfo {
optional QueryResult.QueryState state = 3;
optional string user = 4 [default = "-"];
optional DrillbitEndpoint foreman = 5;
+ optional string options_json = 6;
}
@@ -205,6 +206,7 @@ message QueryProfile {
optional string verboseError = 14;
optional string error_id = 15;
optional string error_node = 16;
+ optional string options_json = 17;
}
message MajorFragmentProfile {
[5/5] drill git commit: DRILL-4989: Fix
TestParquetWriter.testImpalaParquetBinaryAsTimeStamp_DictChange
Posted by su...@apache.org.
DRILL-4989: Fix TestParquetWriter.testImpalaParquetBinaryAsTimeStamp_DictChange
closes #643
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/190d5d46
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/190d5d46
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/190d5d46
Branch: refs/heads/master
Commit: 190d5d46d8ec21efa31ee6dcb3d0d031efde4280
Parents: e044f5a
Author: Vitalii Diravka <vi...@gmail.com>
Authored: Wed Nov 2 15:51:56 2016 +0000
Committer: Sudheesh Katkam <sk...@maprtech.com>
Committed: Wed Nov 2 10:56:02 2016 -0700
----------------------------------------------------------------------
.../apache/drill/exec/physical/impl/writer/TestParquetWriter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/190d5d46/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
index cf43339..4556b4e 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/writer/TestParquetWriter.java
@@ -773,7 +773,7 @@ public class TestParquetWriter extends BaseTestQuery {
final String TEST_RES_PATH = WORKING_PATH + "/src/test/resources";
try {
testBuilder()
- .sqlQuery("select int96_ts from dfs_test.`%s/parquet/int96_dict_change`", TEST_RES_PATH)
+ .sqlQuery("select int96_ts from dfs_test.`%s/parquet/int96_dict_change` order by int96_ts", TEST_RES_PATH)
.optionSettingQueriesForTestQuery(
"alter session set `%s` = true", ExecConstants.PARQUET_READER_INT96_AS_TIMESTAMP)
.ordered()