svn commit: r1667611 [2/3] - in /drill/site/trunk/content/drill: ./ docs/ docs/advanced-properties/ docs/alter-session-command/ docs/alter-system-command/ docs/analyzing-yelp-json-data-with-apache-dri

2015-03-18 Thread bridgetb
Modified: drill/site/trunk/content/drill/docs/explain-commands/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/explain-commands/index.html?rev=1667611r1=1667610r2=1667611view=diff
==
--- drill/site/trunk/content/drill/docs/explain-commands/index.html (original)
+++ drill/site/trunk/content/drill/docs/explain-commands/index.html Wed Mar 18 
20:35:57 2015
@@ -120,7 +120,6 @@ query plan text may help you isolate the
 
 pUse the following syntax:/p
 div class=highlightprecode class=language-text 
data-lang=textexplain plan for lt;querygt; ;
-explain plan with implementation for lt;querygt; ;
 /code/pre/div
 pThe following set command increases the default text display (number of
 characters). By default, most of the plan output is not displayed./p
@@ -131,25 +130,18 @@ characters). By default, most of the pla
 pFor example, here is the top portion of the explain output for a
 COUNT(DISTINCT) query on a JSON file:/p
 div class=highlightprecode class=language-text data-lang=text0: 
jdbc:drill:zk=localgt; !set maxwidth 1
-
-0: jdbc:drill:zk=localgt; explain plan for 
-select type t, count(distinct id) 
-from dfs.`/Users/brumsby/drill/donuts.json` 
-where type=#39;donut#39; group by type;
-
-+++
-|text|json|
-+++
-| 00-00Screen
-00-01  Project(t=[$0], EXPR$1=[$1])
-00-02Project(t=[$0], EXPR$1=[$1])
-00-03  HashAgg(group=[{0}], EXPR$1=[COUNT($1)])
-00-04HashAgg(group=[{0, 1}])
-00-05  SelectionVectorRemover
-00-06Filter(condition=[=(CAST($0):CHAR(5) CHARACTER SET 
quot;ISO-8859-1quot; COLLATE quot;ISO-8859-1$en_US$primaryquot;, 
#39;donut#39;)])
-00-07  Project(type=[$1], id=[$2])
-00-08ProducerConsumer
-00-09  Scan(groupscan=[EasyGroupScan 
[selectionRoot=/Users/brumsby/drill/donuts.json, columns = null]])
+0: jdbc:drill:zk=localgt; explain plan for select type t, count(distinct id) 
from dfs.`/home/donuts/donuts.json` where type=#39;donut#39; group by type;
++++
+|   text|   json|
++++
+| 00-00 Screen
+00-01   Project(t=[$0], EXPR$1=[$1])
+00-02   Project(t=[$0], EXPR$1=[$1])
+00-03   HashAgg(group=[{0}], EXPR$1=[COUNT($1)])
+00-04   HashAgg(group=[{0, 1}])
+00-05   SelectionVectorRemover
+00-06   Filter(condition=[=($0, #39;donut#39;)])
+00-07   Scan(groupscan=[EasyGroupScan 
[selectionRoot=/home/donuts/donuts.json, numFiles=1, columns=[`type`, `id`], 
files=[file:/home/donuts/donuts.json]]])...
 ...
 /code/pre/div
 pRead the text output from bottom to top to understand the sequence of
@@ -178,19 +170,17 @@ for submitting the query via Drill APIs.
 pAdd the INCLUDING ALL ATTRIBUTES option to the EXPLAIN command to see cost
 estimates for the query plan. For example:/p
 div class=highlightprecode class=language-text data-lang=text0: 
jdbc:drill:zk=localgt; !set maxwidth 1
-0: jdbc:drill:zk=localgt; explain plan including all attributes for 
-select * from dfs.`/Users/brumsby/drill/donuts.json` where 
type=#39;donut#39;;
-
+0: jdbc:drill:zk=localgt; explain plan including all attributes for select * 
from dfs.`/home/donuts/donuts.json` where type=#39;donut#39;;
 +++
-|text|json|
+|   text|   json|
 +++
-
-| 00-00Screen: rowcount = 1.0, cumulative cost = {4.1 rows, 14.1 cpu, 0.0 
io, 0.0 network}, id = 3110
-00-01  Project(*=[$0], type=[$1]): rowcount = 1.0, cumulative cost = {4.0 
rows, 14.0 cpu, 0.0 io, 0.0 network}, id = 3109
-00-02SelectionVectorRemover: rowcount = 1.0, cumulative cost = {3.0 
rows, 6.0 cpu, 0.0 io, 0.0 network}, id = 3108
-00-03  Filter(condition=[=(CAST($1):CHAR(5) CHARACTER SET 
quot;ISO-8859-1quot; COLLATE quot;ISO-8859-1$en_US$primaryquot;, 
#39;donut#39;)]): rowcount = 1.0, cumulative cost = {2.0 rows, 5.0 cpu, 0.0 
io, 0.0 network}, id = 3107
-00-04ProducerConsumer: rowcount = 1.0, cumulative cost = {1.0 
rows, 1.0 cpu, 0.0 io, 0.0 network}, id = 3106
-00-05  Scan(groupscan=[EasyGroupScan 
[selectionRoot=/Users/brumsby/drill/donuts.json, columns = null]]): rowcount = 
1.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io, 0.0 network}, id = 3101
+| 00-00 Screen: rowcount = 1.0, cumulative cost = {5.1 rows, 21.1 cpu, 0.0 io, 
0.0 network, 0.0 memory}, id = 889
+00-01   Project(*=[$0]): rowcount = 1.0, cumulative cost = {5.0 rows, 21.0 
cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 888
+00-02   Project(T1¦¦*=[$0]): rowcount = 1.0, cumulative cost = {4.0 
rows, 17.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 887
+00-03   SelectionVectorRemover: rowcount = 1.0, cumulative cost = {3.0 
rows, 13.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 886
+00-04   

svn commit: r1667611 [3/3] - in /drill/site/trunk/content/drill: ./ docs/ docs/advanced-properties/ docs/alter-session-command/ docs/alter-system-command/ docs/analyzing-yelp-json-data-with-apache-dri

2015-03-18 Thread bridgetb
Modified: drill/site/trunk/content/drill/docs/sql-commands-summary/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/sql-commands-summary/index.html?rev=1667611r1=1667610r2=1667611view=diff
==
--- drill/site/trunk/content/drill/docs/sql-commands-summary/index.html 
(original)
+++ drill/site/trunk/content/drill/docs/sql-commands-summary/index.html Wed Mar 
18 20:35:57 2015
@@ -70,7 +70,8 @@
 div class=int_text align=leftpThe following table provides a list of 
the SQL commands that Drill supports,
 with their descriptions and example syntax:/p
 
-ptable tbodytrth Command/thth Description/thth 
Syntax/th/trtrtd valign=top ALTER SESSION/tdtd valign=top 
Changes a system setting for the duration of a session. A session ends when 
you quit the Drill shell. For a list of Drill options and their descriptions, 
refer to a href=/docs/planning-and-execution-options rel=nofollowPlanning 
and Execution Options/a./tdtd valign=top codeALTER SESSION SET 
codeoption_name/code=#39;string#39;;br /ALTER SESSION SET 
codeoption_name/code=TRUE | FALSE;/code/td/trtrtd valign=top 
ALTER SYSTEM/tdtd valign=top Permanently changes a system setting. The 
new settings persist across all sessions. For a list of Drill options and their 
descriptions, refer to a href=/docs/planning-and-execution-options/ 
rel=nofollowPlanning and Execution Options/a./tdtd valign=top 
codeALTER SYSTEM codeoption_name/code=#39;string#39;br /ALTER SYSTEM 
codeoption_name/code=TRU
 E | FALSE;/code/td/trtrtd valign=top a 
href=/docs/create-table-as-ctas-commandCREATE TABLE ASbr 
/(CTAS)/a/p/tdtd valign=top Creates a new table and populates the 
new table with rows returned from a SELECT query. Use the CREATE TABLE AS 
(CTAS) statement in place of INSERT INTO. When you issue the CTAS command, you 
create a directory that contains parquet or CSV files. Each workspace in a file 
system has a default file type.pYou can specify which writer you want Drill 
to use when creating a table: parquet, CSV, or JSON (as specified with span 
style=line-height: 1.4285715;the /spancodestore.format/codespan 
style=line-height: 1.4285715; 
optionspanspan)./span/span/span/p/tdtd valign=top 
codeCREATE TABLE new_table_name AS lt;querygt;;/code/td/trtrtd 
valign=top colspan=1 CREATE VIEW/tdtd valign=top colspan=1 Creates 
a new view based on the results of a SELECT query./tdtd valign=top 
colspan=1 co
 deCREATE VIEW view_name [(column_list)] AS 
lt;querygt;;/code/td/trtrtd valign=top colspan=1 DROP 
VIEW/tdtd valign=top colspan=1 Removes one or more views./tdtd 
valign=top colspan=1 codeDROP VIEW view_name [, em 
class=replaceableview_name/em] ...; /code/td/trtrtd 
valign=top colspan=1 a href=/docs/explain-commands 
rel=nofollowEXPLAIN PLAN FOR/a/tdtd valign=top colspan=1 Returns 
the physical plan for a particular query./tdtd valign=top colspan=1 
codeEXPLAIN PLAN FOR lt;querygt;;/code/td/trtrtd valign=top 
colspan=1 a href=/docs/explain-commands/ rel=nofollowEXPLAIN PLAN 
WITHOUT IMPLEMENTATION FOR/a/tdtd valign=top colspan=1 Returns the 
logical plan for a particular query./tdtd valign=top colspan=1 
codeEXPLAIN PLAN WITHOUT IMPLEMENTATION FOR 
lt;querygt;;/code/td/trtrtd valign=top colspan=1 a 
href=/docs/select-statements rel=nofollowSELECT/a
 /tdtd valign=top colspan=1 Retrieves data from tables and 
 files./tdtd valign=top colspan=1 code[WITH subquery]br /SELECT 
 column_list FROM table_name br /[WHERE clause]br /[GROUP BY clause]br 
 /[HAVING clause]br /[ORDER BY clause];/code/td/trtrtd 
 valign=top colspan=1 SHOW DATABASES/tdtd valign=top colspan=1 
 Returns a list of available schemas. Equivalent to SHOW SCHEMAS./tdtd 
 valign=top colspan=1 codeSHOW DATABASES;/code/td/trtrtd 
 valign=top colspan=1 a href=/docs/show-files-command/ 
 rel=nofollowSHOW FILES/a/tdtd valign=top colspan=1 Returns a 
 list of files in a file system schema./tdtd valign=top colspan=1 
 codeSHOW FILES IN filesystem.codeschema_name/code;br /SHOW FILES 
 FROM filesystem.codeschema_name/code;/code/td/trtrtd 
 valign=top colspan=1 SHOW SCHEMAS/tdtd valign=top colspan=1 
 Returns a list of available schemas. Equivalent to SHOW DATABASES./tdt
 d valign=top colspan=1 codeSHOW SCHEMAS;/code/td/trtrtd 
valign=top colspan=1 SHOW TABLES/tdtd valign=top colspan=1 Returns 
a list of tables for all schemas. Optionally, you can first issue the codeUSE 
/codecommand to identify the schema for which you want to view tables.br 
/For example, the following codeUSE/code statement tells Drill that you 
only want information from the codehive.default/code schema:br /codeUSE 
hive.codedefault/code;/code/tdtd valign=top colspan=1 codeSHOW 
TABLES;/code/td/trtrtd valign=top colspan=1 USE/tdtd 
valign=top colspan=1 Change to a particular schema. When you opt to use a 
particular schema, Drill issues queries on that schema only./tdtd 
valign=top colspan=1 codeUSE 
schema_name;/code/td/tr/tbody/table/div  /p

svn commit: r1667611 [1/3] - in /drill/site/trunk/content/drill: ./ docs/ docs/advanced-properties/ docs/alter-session-command/ docs/alter-system-command/ docs/analyzing-yelp-json-data-with-apache-dri

2015-03-18 Thread bridgetb
Author: bridgetb
Date: Wed Mar 18 20:35:57 2015
New Revision: 1667611

URL: http://svn.apache.org/r1667611
Log:
DRILL-2490: convert confluence sql commands pages

Added:
drill/site/trunk/content/drill/docs/alter-session-command/
drill/site/trunk/content/drill/docs/alter-session-command/index.html
drill/site/trunk/content/drill/docs/alter-system-command/
drill/site/trunk/content/drill/docs/alter-system-command/index.html
drill/site/trunk/content/drill/docs/create-view-command/
drill/site/trunk/content/drill/docs/create-view-command/index.html
drill/site/trunk/content/drill/docs/date-time-and-timestamp/
drill/site/trunk/content/drill/docs/date-time-and-timestamp/index.html
drill/site/trunk/content/drill/docs/describe-command/
drill/site/trunk/content/drill/docs/describe-command/index.html
drill/site/trunk/content/drill/docs/handling-different-data-types/
drill/site/trunk/content/drill/docs/handling-different-data-types/index.html
drill/site/trunk/content/drill/docs/show-databases-and-show-schemas-command/

drill/site/trunk/content/drill/docs/show-databases-and-show-schemas-command/index.html
drill/site/trunk/content/drill/docs/show-tables-command/
drill/site/trunk/content/drill/docs/show-tables-command/index.html
drill/site/trunk/content/drill/docs/use-command/
drill/site/trunk/content/drill/docs/use-command/index.html
Modified:
drill/site/trunk/content/drill/docs/advanced-properties/index.html

drill/site/trunk/content/drill/docs/analyzing-yelp-json-data-with-apache-drill/index.html
drill/site/trunk/content/drill/docs/apache-drill-in-10-minutes/index.html
drill/site/trunk/content/drill/docs/apache-drill-tutorial/index.html
drill/site/trunk/content/drill/docs/architectural-highlights/index.html
drill/site/trunk/content/drill/docs/architectural-overview/index.html

drill/site/trunk/content/drill/docs/configuring-odbc-connections-for-linux-and-mac-os-x/index.html
drill/site/trunk/content/drill/docs/connect-to-a-data-source/index.html

drill/site/trunk/content/drill/docs/core-modules-within-a-drillbit/index.html
drill/site/trunk/content/drill/docs/data-types/index.html

drill/site/trunk/content/drill/docs/deploying-apache-drill-in-a-clustered-environment/index.html
drill/site/trunk/content/drill/docs/drill-default-input-format/index.html
drill/site/trunk/content/drill/docs/driver-configuration-options/index.html
drill/site/trunk/content/drill/docs/explain-commands/index.html
drill/site/trunk/content/drill/docs/file-system-storage-plugin/index.html
drill/site/trunk/content/drill/docs/flexibility/index.html
drill/site/trunk/content/drill/docs/getting-started-tutorial/index.html

drill/site/trunk/content/drill/docs/getting-to-know-the-drill-sandbox/index.html
drill/site/trunk/content/drill/docs/hbase-storage-plugin/index.html
drill/site/trunk/content/drill/docs/hive-storage-plugin/index.html
drill/site/trunk/content/drill/docs/index.html
drill/site/trunk/content/drill/docs/install-drill/index.html

drill/site/trunk/content/drill/docs/installing-drill-in-distributed-mode/index.html

drill/site/trunk/content/drill/docs/installing-drill-in-embedded-mode/index.html
drill/site/trunk/content/drill/docs/installing-drill-on-linux/index.html
drill/site/trunk/content/drill/docs/installing-drill-on-mac-os-x/index.html
drill/site/trunk/content/drill/docs/installing-drill-on-windows/index.html

drill/site/trunk/content/drill/docs/installing-the-apache-drill-sandbox/index.html

drill/site/trunk/content/drill/docs/installing-the-mapr-drill-odbc-driver-on-linux/index.html

drill/site/trunk/content/drill/docs/installing-the-mapr-drill-odbc-driver-on-mac-os-x/index.html

drill/site/trunk/content/drill/docs/installing-the-mapr-sandbox-with-apache-drill-on-virtualbox/index.html

drill/site/trunk/content/drill/docs/installing-the-mapr-sandbox-with-apache-drill-on-vmware-player-vmware-fusion/index.html

drill/site/trunk/content/drill/docs/lession-1-learn-about-the-data-set/index.html

drill/site/trunk/content/drill/docs/lession-2-run-queries-with-ansi-sql/index.html

drill/site/trunk/content/drill/docs/lession-3-run-queries-on-complex-data-types/index.html
drill/site/trunk/content/drill/docs/mapr-db-format/index.html

drill/site/trunk/content/drill/docs/mongodb-plugin-for-apache-drill/index.html
drill/site/trunk/content/drill/docs/odbc-jdbc-interfaces/index.html
drill/site/trunk/content/drill/docs/performance/index.html
drill/site/trunk/content/drill/docs/query-data/index.html
drill/site/trunk/content/drill/docs/select-statements/index.html
drill/site/trunk/content/drill/docs/sql-commands-summary/index.html

drill/site/trunk/content/drill/docs/step-1-install-the-mapr-drill-odbc-driver-on-windows/index.html


drill git commit: DRILL-2358: Ensure DrillScanRel differentiates skip-all, scan-all scan-some in a backward compatible fashion

2015-03-18 Thread amansinha
Repository: drill
Updated Branches:
  refs/heads/master 12a7d0179 - 54df129ca


DRILL-2358: Ensure DrillScanRel differentiates skip-all, scan-all  scan-some 
in a backward compatible fashion


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

Branch: refs/heads/master
Commit: 54df129cab544c3df8e75a7dae3f85a91a9ded5a
Parents: 12a7d01
Author: Hanifi Gunes hgu...@maprtech.com
Authored: Thu Mar 5 13:35:48 2015 -0800
Committer: Hanifi Gunes hgu...@maprtech.com
Committed: Wed Mar 18 14:21:23 2015 -0700

--
 .../drill/exec/planner/logical/ColumnList.java  | 200 +++
 .../exec/planner/logical/DrillScanRel.java  |  11 +-
 .../drill/exec/store/AbstractRecordReader.java  |  14 ++
 3 files changed, 222 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/54df129c/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/ColumnList.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/ColumnList.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/ColumnList.java
new file mode 100644
index 000..e448bc5
--- /dev/null
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/ColumnList.java
@@ -0,0 +1,200 @@
+/**
+ * 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.planner.logical;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import com.google.common.base.Objects;
+import com.google.common.base.Preconditions;
+import org.apache.drill.common.expression.SchemaPath;
+import org.apache.drill.exec.physical.base.GroupScan;
+
+/**
+ * A list decorator that wraps a list of columns along with a {@link 
org.apache.drill.exec.planner.logical.ColumnList.Mode mode}
+ * that informs {@link org.apache.drill.exec.store.AbstractRecordReader 
readers} to scan or skip the underlying list of columns.
+ */
+public class ColumnList implements ListSchemaPath {
+
+  public static enum Mode {
+SKIP_ALL,
+SCAN_ALL,
+SCAN_SOME
+  }
+
+  private final ListSchemaPath backend;
+  private final Mode mode;
+
+  protected ColumnList(ListSchemaPath backend, Mode mode) {
+this.backend = Preconditions.checkNotNull(backend);
+this.mode = Preconditions.checkNotNull(mode);
+  }
+
+  public Mode getMode() {
+return mode;
+  }
+
+  public static ColumnList none() {
+return new ColumnList(GroupScan.ALL_COLUMNS, Mode.SKIP_ALL);
+  }
+
+  public static ColumnList all() {
+return new ColumnList(GroupScan.ALL_COLUMNS, Mode.SCAN_ALL);
+  }
+
+  public static ColumnList some(ListSchemaPath columns) {
+return new ColumnList(columns, Mode.SCAN_SOME);
+  }
+
+
+  @Override
+  public int size() {
+return backend.size();
+  }
+
+  @Override
+  public boolean isEmpty() {
+return backend.isEmpty();
+  }
+
+  @Override
+  public boolean contains(Object o) {
+return backend.contains(o);
+  }
+
+  @Override
+  public IteratorSchemaPath iterator() {
+return backend.iterator();
+  }
+
+  @Override
+  public Object[] toArray() {
+return backend.toArray();
+  }
+
+  @Override
+  public T T[] toArray(T[] a) {
+return backend.toArray(a);
+  }
+
+  @Override
+  public boolean add(SchemaPath path) {
+return backend.add(path);
+  }
+
+  @Override
+  public boolean remove(Object o) {
+return backend.remove(o);
+  }
+
+  @Override
+  public boolean containsAll(Collection? c) {
+return backend.containsAll(c);
+  }
+
+  @Override
+  public boolean addAll(Collection? extends SchemaPath c) {
+return backend.addAll(c);
+  }
+
+  @Override
+  public boolean addAll(int index, Collection? extends SchemaPath c) {
+return backend.addAll(index, c);
+  }
+
+  @Override
+  public boolean removeAll(Collection? c) {
+return 

drill git commit: DRILL-2210 Introducing multithreading capability to PartitonerSender

2015-03-18 Thread venki
Repository: drill
Updated Branches:
  refs/heads/master 54df129ca - 49d316a1c


DRILL-2210 Introducing multithreading capability to PartitonerSender


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

Branch: refs/heads/master
Commit: 49d316a1cb22f79061e246b5e197547dac730232
Parents: 54df129
Author: Yuliya Feldman yfeld...@maprtech.com
Authored: Tue Feb 17 00:09:07 2015 -0800
Committer: vkorukanti venki.koruka...@gmail.com
Committed: Wed Mar 18 17:40:37 2015 -0700

--
 .../apache/drill/exec/compile/CodeCompiler.java |  13 +-
 .../apache/drill/exec/ops/FragmentContext.java  |   8 +
 .../apache/drill/exec/ops/OperatorStats.java|  81 
 .../exec/physical/config/IteratorValidator.java |   2 +-
 .../exec/physical/impl/SendingAccountor.java|   9 +-
 .../PartitionSenderRootExec.java|  91 -
 .../impl/partitionsender/Partitioner.java   |  11 +-
 .../partitionsender/PartitionerDecorator.java   | 282 +
 .../partitionsender/PartitionerTemplate.java|  54 ++-
 .../exec/planner/fragment/Materializer.java |   3 +
 .../exec/planner/physical/PlannerSettings.java  |   3 +
 .../drill/exec/server/DrillbitContext.java  |  10 +-
 .../server/options/SystemOptionManager.java |   3 +
 .../org/apache/drill/exec/work/WorkManager.java |   8 +-
 .../exec/physical/impl/TestOptiqPlans.java  |   2 +-
 .../partitionsender/TestPartitionSender.java| 392 +++
 16 files changed, 938 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/49d316a1/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
index 57a6660..f0147ef 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
@@ -18,6 +18,7 @@
 package org.apache.drill.exec.compile;
 
 import java.io.IOException;
+import java.util.List;
 import java.util.concurrent.ExecutionException;
 
 import org.apache.drill.common.config.DrillConfig;
@@ -32,6 +33,7 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
+import com.google.common.collect.Lists;
 
 public class CodeCompiler {
 //  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(CodeCompiler.class);
@@ -53,10 +55,19 @@ public class CodeCompiler {
 
   @SuppressWarnings(unchecked)
   public T T getImplementationClass(final CodeGenerator? cg) throws 
ClassTransformationException, IOException {
+return (T) getImplementationClass(cg, 1).get(0);
+  }
+
+  @SuppressWarnings(unchecked)
+  public T ListT getImplementationClass(final CodeGenerator? cg, int 
instanceNumber) throws ClassTransformationException, IOException {
 cg.generate();
 try {
   final GeneratedClassEntry ce = cache.get(cg);
-  return (T) ce.clazz.newInstance();
+  ListT tList = Lists.newArrayList();
+  for ( int i = 0; i  instanceNumber; i++) {
+tList.add((T) ce.clazz.newInstance());
+  }
+  return tList;
 } catch (ExecutionException | InstantiationException | 
IllegalAccessException e) {
   throw new ClassTransformationException(e);
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/49d316a1/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java 
b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
index 9fc9ad1..2a6660e 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
@@ -222,6 +222,14 @@ public class FragmentContext implements AutoCloseable, 
UdfUtilities {
 return context.getCompiler().getImplementationClass(cg);
   }
 
+  public T ListT getImplementationClass(ClassGeneratorT cg, int 
instanceCount) throws ClassTransformationException, IOException {
+return getImplementationClass(cg.getCodeGenerator(), instanceCount);
+  }
+
+  public T ListT getImplementationClass(CodeGeneratorT cg, int 
instanceCount) throws ClassTransformationException, IOException {
+return 

drill git commit: DRILL-2497: Remove reference to drill-interpreter in build

2015-03-18 Thread adi
Repository: drill
Updated Branches:
  refs/heads/master 49d316a1c - ee5b0bc13


DRILL-2497: Remove reference to drill-interpreter in build


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

Branch: refs/heads/master
Commit: ee5b0bc13f98a839a5ad7b63356a100a0b28c14f
Parents: 49d316a
Author: Patrick Wong pw...@maprtech.com
Authored: Wed Mar 18 15:23:43 2015 -0700
Committer: Aditya Kishore a...@apache.org
Committed: Wed Mar 18 20:21:57 2015 -0700

--
 distribution/pom.xml | 16 
 1 file changed, 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/ee5b0bc1/distribution/pom.xml
--
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 294cd0a..bf934a6 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -169,22 +169,6 @@
 /profile
 
 profile
-  idbuild-interpreter/id
-  activation
-property
-  name!skipInterpreter/name
-/property
-  /activation
-  dependencies
-dependency
-  groupIdorg.apache.drill.exec/groupId
-  artifactIddrill-interpreter/artifactId
-  version${project.version}/version
-/dependency
-  /dependencies
-/profile
-
-profile
   iddefault-hadoop/id
   activation
 property



[2/3] drill git commit: DRILL-2490

2015-03-18 Thread bridgetb
http://git-wip-us.apache.org/repos/asf/drill/blob/923bad37/_docs/sql-ref/001-data-types.md
--
diff --git a/_docs/sql-ref/001-data-types.md b/_docs/sql-ref/001-data-types.md
index bcb506c..39b1468 100644
--- a/_docs/sql-ref/001-data-types.md
+++ b/_docs/sql-ref/001-data-types.md
@@ -1,150 +1,473 @@
 ---
-title: Data Type Casting
+title: Data Types
 parent: SQL Reference
 ---
-The following table lists the type arguments you can use with the cast 
function:
+Depending on the data format, you might need to cast or convert data types 
when Drill reads/writes data.
+
+After Drill reads schema-less data into SQL tables, you need to cast data 
types explicitly to query the data. In some cases, Drill converts schema-less 
data to typed data implicitly. In this case, you do not need to cast. The file 
format of the data and the nature of your query determines the requirement for 
casting or converting. 
+
+Differences in casting depend on the data source. The following list describes 
how Drill treats data types from various data sources:
+
+* HBase  
+  No implicit casting to SQL types. Convert data to appropriate types as shown 
in [Querying HBase.](/docs/querying-hbase/)
+* Hive  
+  Implicitly casts Hive types to SQL types as shown in the Hive [type mapping 
example](/docs/hive-to-drill-data-type-mapping#type-mapping-example)
+* JSON  
+  Implicitly casts JSON data to its [corresponding SQL 
types](/docs/json-data-model#data-type-mapping) or to VARCHAR if Drillis in all 
text mode. 
+* MapR-DB  
+  Implicitly casts MapR-DB data to SQL types when you use [the maprdb 
format](/docs/mapr-db-format) for reading MapR-DB data. The dfs storage plugin 
defines the format when you install Drill from the mapr-drill package on a MapR 
node.
+* Parquet  
+  Implicitly casts Parquet data to the SQL types shown in [SQL Data Types to 
Parquet](/docs/parquet-format/sql-data-types-to-parquet). 
+* Text: CSV, TSV, and other text  
+  Implicitly casts all textual data to VARCHAR.
+
+## Implicit Casting
+
+
+In general, Drill implicitly casts (promotes) one type to another type based 
on the order of precedence shown in the following table. Drill also considers 
the performance cost of implicit casting to one type versus another. Drill 
usually implicitly casts a type from a lower precedence to a type having higher 
precedence. For instance, NULL can be promoted to any other type; SMALLINT can 
be promoted into INT. INT is not promoted to SMALLINT due to possible precision 
loss.
+
+Under certain circumstances, such as queries involving  substr and concat 
functions, Drill reverses the order of precedence and allows a cast to VARCHAR 
from a type of higher precedence than VARCHAR, such as BIGINT. 
+
+The following table lists data types top to bottom, in descending precedence. 
Drill implicitly casts to more data types than are currently supported for 
explicit casting.
 
 table
   tr
-thSQL Type/th
-thDrill Description/th
+thPrecedence/th
+thData Type/th
+thPrecedence/th
+thData Type/th
   /tr
   tr
+td1/td
+tdINTERVAL/td
+td13/td
 tdBIGINT/td
-td8-byte signed integer/td
   /tr
   tr
-tdBOOLEAN/td
-tdTrue or false/td
+td2/td
+tdINTERVALYEAR/td
+td14/td
+tdUINT4/td
   /tr
   tr
-tdDATE/td
-tdYears, months, and days in -­MM-­DD format/td
+td3/td
+tdINTERVLADAY/td
+td15/td
+tdINT/td
   /tr
   tr
-tdNUMERIC, DECIMAL, or DEC(p,s)/td
-td38-digit precision number. Same as numeric(p,s) where precision is p, 
and scale is s. Example: decimal(6,2) has 4 digits before the decimal point and 
2 digits after the decimal point./td
+td4/td
+tdTIMESTAMPTZ/td
+td16/td
+tdUINT2/td
   /tr
   tr
-tdFLOAT/td
-td4-byte single precision floating point number/td
+td5/td
+tdTIMETZ/td
+td17/td
+tdSMALLINT/td
   /tr
   tr
-tdDOUBLE, DOUBLE PRECISION/td
-td8-byte double precision floating point number. /td
+td6/td
+tdTIMESTAMP/td
+td18/td
+tdUINT1/td
   /tr
   tr
-tdINTEGER, INT/td
-td4-byte signed integer/td
+td7/td
+tdDATE/td
+td19/td
+tdVAR16CHAR/td
   /tr
   tr
-tdINTERVAL/td
-tdInteger fields representing a period of time in years, months, day,s 
hours, minutes, seconds and optional milliseconds using ISO 8601 format./td
+td8/td
+tdTIME/td
+td20/td
+tdFIXED16CHAR/td
   /tr
   tr
-tdINTERVALDAY/td
-tdA simple version of the interval type expressing a period of time in 
days, hours, minutes, and seconds only./td
+td9/td
+tdFLOAT8/td
+td21/td
+tdVARCHAR/td
   /tr
   tr
-tdINTERVALYEAR/td
-tdA simple version of interval representing a period of time in years 
and months only./td
+td10/td
+tdDECIMAL/td
+td22/td
+tdFIXEDCHAR/td
   /tr
   tr
-tdSMALLINT/td
-td2-byte signed integer. Supported in Drill 0.9 and later./td
+