drill-site git commit: update release notes to include DRILL-4287 as resolved bug

2016-03-19 Thread bridgetb
Repository: drill-site
Updated Branches:
  refs/heads/asf-site 25782ca2c -> bf910b0d6


update release notes to include DRILL-4287 as resolved bug


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

Branch: refs/heads/asf-site
Commit: bf910b0d677e53c0707f4745b4f57e3d60d45b25
Parents: 25782ca
Author: Bridget Bevens 
Authored: Thu Mar 17 11:46:41 2016 -0700
Committer: Bridget Bevens 
Committed: Thu Mar 17 11:46:41 2016 -0700

--
 docs/apache-drill-1-6-0-release-notes/index.html | 2 ++
 feed.xml | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill-site/blob/bf910b0d/docs/apache-drill-1-6-0-release-notes/index.html
--
diff --git a/docs/apache-drill-1-6-0-release-notes/index.html 
b/docs/apache-drill-1-6-0-release-notes/index.html
index 54ca7e3..28cd6c8 100644
--- a/docs/apache-drill-1-6-0-release-notes/index.html
+++ b/docs/apache-drill-1-6-0-release-notes/index.html
@@ -1103,6 +1103,8 @@
 
 [DRILL-4279] -   
  Improve performance for skipAll query against Text/JSON/Parquet table
 
+[DRILL-4287] -   
  Do lazy reading of parquet metadata cache file
+
 [DRILL-4323] -   
  Hive Native Reader : A simple count(*) throws Incoming batch has an empty 
schema error
 
 [DRILL-4339] -   
  Avro Reader can not read records - Regression

http://git-wip-us.apache.org/repos/asf/drill-site/blob/bf910b0d/feed.xml
--
diff --git a/feed.xml b/feed.xml
index 5d4c1c9..3b48e07 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,8 +6,8 @@
 
 /
 
-Wed, 16 Mar 2016 12:19:34 -0700
-Wed, 16 Mar 2016 12:19:34 -0700
+Thu, 17 Mar 2016 11:42:45 -0700
+Thu, 17 Mar 2016 11:42:45 -0700
 Jekyll v2.5.2
 
   



drill git commit: updated docs.json

2016-03-19 Thread bridgetb
Repository: drill
Updated Branches:
  refs/heads/gh-pages a19ca1d47 -> 0994fd4ff


updated docs.json


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

Branch: refs/heads/gh-pages
Commit: 0994fd4ff798847e89ed54d752bbdc49266dbb47
Parents: a19ca1d
Author: Bridget Bevens 
Authored: Wed Mar 16 09:17:23 2016 -0700
Committer: Bridget Bevens 
Committed: Wed Mar 16 09:17:23 2016 -0700

--
 _data/docs.json | 71 
 1 file changed, 61 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/0994fd4f/_data/docs.json
--
diff --git a/_data/docs.json b/_data/docs.json
index 1b6c66b..66a30c1 100644
--- a/_data/docs.json
+++ b/_data/docs.json
@@ -405,12 +405,29 @@
 "next_title": "Apache Drill 1.4.0 Release Notes", 
 "next_url": "/docs/apache-drill-1-4-0-release-notes/", 
 "parent": "Release Notes", 
-"previous_title": "Release Notes", 
-"previous_url": "/docs/release-notes/", 
+"previous_title": "Apache Drill 1.6.0 Release Notes", 
+"previous_url": "/docs/apache-drill-1-6-0-release-notes/", 
 "relative_path": "_docs/rn/006-1.5.0-rn.md", 
 "title": "Apache Drill 1.5.0 Release Notes", 
 "url": "/docs/apache-drill-1-5-0-release-notes/"
 }, 
+"Apache Drill 1.6.0 Release Notes": {
+"breadcrumbs": [
+{
+"title": "Release Notes", 
+"url": "/docs/release-notes/"
+}
+], 
+"children": [], 
+"next_title": "Apache Drill 1.5.0 Release Notes", 
+"next_url": "/docs/apache-drill-1-5-0-release-notes/", 
+"parent": "Release Notes", 
+"previous_title": "Release Notes", 
+"previous_url": "/docs/release-notes/", 
+"relative_path": "_docs/rn/005-1.6.0-rn.md", 
+"title": "Apache Drill 1.6.0 Release Notes", 
+"url": "/docs/apache-drill-1-6-0-release-notes/"
+}, 
 "Apache Drill Contribution Guidelines": {
 "breadcrumbs": [
 {
@@ -7972,11 +7989,28 @@
 }
 ], 
 "children": [], 
-"next_title": "Apache Drill 1.4.0 Release Notes", 
-"next_url": "/docs/apache-drill-1-4-0-release-notes/", 
+"next_title": "Apache Drill 1.5.0 Release Notes", 
+"next_url": "/docs/apache-drill-1-5-0-release-notes/", 
 "parent": "Release Notes", 
 "previous_title": "Release Notes", 
 "previous_url": "/docs/release-notes/", 
+"relative_path": "_docs/rn/005-1.6.0-rn.md", 
+"title": "Apache Drill 1.6.0 Release Notes", 
+"url": "/docs/apache-drill-1-6-0-release-notes/"
+}, 
+{
+"breadcrumbs": [
+{
+"title": "Release Notes", 
+"url": "/docs/release-notes/"
+}
+], 
+"children": [], 
+"next_title": "Apache Drill 1.4.0 Release Notes", 
+"next_url": "/docs/apache-drill-1-4-0-release-notes/", 
+"parent": "Release Notes", 
+"previous_title": "Apache Drill 1.6.0 Release Notes", 
+"previous_url": "/docs/apache-drill-1-6-0-release-notes/", 
 "relative_path": "_docs/rn/006-1.5.0-rn.md", 
 "title": "Apache Drill 1.5.0 Release Notes", 
 "url": "/docs/apache-drill-1-5-0-release-notes/"
@@ -8203,8 +8237,8 @@
 "url": "/docs/apache-drill-0-4-0-release-notes/"
 }
 ], 
-"next_title": "Apache Drill 1.5.0 Release Notes", 
-"next_url": "/docs/apache-drill-1-5-0-release-notes/", 
+"next_title": "Apache Drill 1.6.0 Release Notes", 
+"next_url": "/docs/apache-drill-1-6-0-release-notes/", 
 "parent": "", 
 "previous_title": "Value Vectors", 
 "previous_url": "/docs/value-vectors/", 
@@ -16639,11 +16673,28 @@
 }
 ], 
 "children": [], 
-"next_title": "Apache Drill 1.4.0 Release Notes", 
-"next_url": "/docs/a

drill git commit: 1.6 download link update

2016-03-19 Thread bridgetb
Repository: drill
Updated Branches:
  refs/heads/gh-pages d9484e641 -> 16eb5a7d3


1.6 download link update


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

Branch: refs/heads/gh-pages
Commit: 16eb5a7d33398295a314e47a6487af7825a6b86e
Parents: d9484e6
Author: Bridget Bevens 
Authored: Wed Mar 16 12:17:01 2016 -0700
Committer: Bridget Bevens 
Committed: Wed Mar 16 12:17:01 2016 -0700

--
 _docs/install/047-installing-drill-on-the-cluster.md | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/16eb5a7d/_docs/install/047-installing-drill-on-the-cluster.md
--
diff --git a/_docs/install/047-installing-drill-on-the-cluster.md 
b/_docs/install/047-installing-drill-on-the-cluster.md
index 0375e7d..1464dad 100644
--- a/_docs/install/047-installing-drill-on-the-cluster.md
+++ b/_docs/install/047-installing-drill-on-the-cluster.md
@@ -1,13 +1,13 @@
 ---
 title: "Installing Drill on the Cluster"
-date: 2016-02-24 02:49:43 UTC
+date: 2016-03-16 19:17:03 UTC
 parent: "Installing Drill in Distributed Mode"
 ---
 You install Drill on nodes in the cluster, configure a cluster ID, and add 
Zookeeper information, as described in the following steps:
 
-  1. Download the latest version of Apache Drill 
[here](http://www.apache.org/dyn/closer.lua?filename=drill/drill-1.5.0/apache-drill-1.5.0.tar.gz&action=download)
 or from the [Apache Drill mirror 
site](http://www.apache.org/dyn/closer.cgi/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz)
 with the command appropriate for your system:  
-   * `wget 
http://mirrors.sonic.net/apache/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz`  
-   * `curl -o apache-drill-1.5.0.tar.gz 
http://mirrors.sonic.net/apache/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz`  
+  1. Download the latest version of Apache Drill 
[here](http://www.apache.org/dyn/closer.lua?filename=drill/drill-1.6.0/apache-drill-1.6.0.tar.gz&action=download)
 or from the [Apache Drill mirror 
site](http://www.apache.org/dyn/closer.cgi/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz)
 with the command appropriate for your system:  
+   * `wget 
http://apache.mesi.com.ar/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz`  
+   * `curl -o apache-drill-1.6.0.tar.gz 
http://apache.mesi.com.ar/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz`  
   2. Extract the tarball to the directory of your choice, such as `/opt`:  
   `tar -xzvf apache-drill-.tar.gz`
   3. In `drill-override.conf,` use the Drill `cluster ID`, and provide 
ZooKeeper host names and port numbers to configure a connection to your 
ZooKeeper quorum.  



[2/2] drill git commit: DRILL-4484: NPE when querying empty directory

2016-03-19 Thread adeneche
DRILL-4484: NPE when querying  empty directory


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

Branch: refs/heads/master
Commit: 71608ca9fb53ff0af4f1d09f32d61e7280377e7a
Parents: 11fe8d7
Author: adeneche 
Authored: Thu Mar 10 10:40:06 2016 +0100
Committer: adeneche 
Committed: Wed Mar 16 16:53:30 2016 +0100

--
 .../drill/exec/store/dfs/FileSelection.java |   6 +-
 .../exec/store/parquet/ParquetGroupScan.java|  12 +-
 .../store/parquet/TestParquetGroupScan.java | 120 +++
 .../store/parquet/TestParquetMetadataCache.java |  19 ---
 4 files changed, 135 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/71608ca9/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
index dc49281..5b4813a 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
@@ -150,7 +150,11 @@ public class FileSelection {
 logger.debug("FileSelection.minusDirectories() took {} ms, numFiles: {}",
 timer.elapsed(TimeUnit.MILLISECONDS), total);
 
-fileSel.setExpanded();
+// fileSel will be null if we query an empty folder
+if (fileSel != null) {
+  fileSel.setExpanded();
+}
+
 return fileSel;
   }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/71608ca9/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
index 774f515..47172cc 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
@@ -27,6 +27,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.drill.common.exceptions.ExecutionSetupException;
+import org.apache.drill.common.exceptions.UserException;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.logical.FormatPluginConfig;
 import org.apache.drill.common.logical.StoragePluginConfig;
@@ -568,6 +569,7 @@ public class ParquetGroupScan extends AbstractFileGroupScan 
{
* @return file selection read from cache
*
* @throws IOException
+   * @throws UserException when the updated selection is empty, this happens 
if the user selects an empty folder.
*/
   private FileSelection
   initFromMetadataCache(FileSelection selection, Path metaFilePath) throws 
IOException {
@@ -580,7 +582,8 @@ public class ParquetGroupScan extends AbstractFileGroupScan 
{
 List fileNames = Lists.newArrayList();
 List fileStatuses = selection.getStatuses(fs);
 
-if (fileStatuses.size() == 1 && fileStatuses.get(0).isDirectory()) {
+final Path first = fileStatuses.get(0).getPath();
+if (fileStatuses.size() == 1 && 
selection.getSelectionRoot().equals(first.toString())) {
   // we are selecting all files from selection root. Expand the file list 
from the cache
   for (Metadata.ParquetFileMetadata file : 
parquetTableMetadata.getFiles()) {
 fileNames.add(file.getPath());
@@ -590,7 +593,7 @@ public class ParquetGroupScan extends AbstractFileGroupScan 
{
   // we need to expand the files from fileStatuses
   for (FileStatus status : fileStatuses) {
 if (status.isDirectory()) {
-  //TODO read the metadata cache files in parallel
+  //TODO [DRILL-4496] read the metadata cache files in parallel
   final Path metaPath = new Path(status.getPath(), 
Metadata.METADATA_FILENAME);
   final Metadata.ParquetTableMetadataBase metadata = 
Metadata.readBlockMeta(fs, metaPath.toString());
   for (Metadata.ParquetFileMetadata file : metadata.getFiles()) {
@@ -606,6 +609,11 @@ public class ParquetGroupScan extends 
AbstractFileGroupScan {
   fileSet = Sets.newHashSet(fileNames);
 }
 
+if (fileNames.isEmpty()) {
+  // no files were found, most likely we tried to query some empty sub 
folders
+  throw UserException.validationError().message("The table you tried to 
query is empty").build(logger);
+}
+
 // when creating the file selection, set

drill git commit: DRILL-4501: Complete MapOrListWriter for all supported data types

2016-03-19 Thread adi
Repository: drill
Updated Branches:
  refs/heads/master 71608ca9f -> 245da9790


DRILL-4501: Complete MapOrListWriter for all supported data types

Closes #427


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

Branch: refs/heads/master
Commit: 245da9790813569c5da9404e0fc5e45cc88e22bb
Parents: 71608ca
Author: Aditya Kishore 
Authored: Sat Mar 12 11:12:34 2016 -0800
Committer: Aditya Kishore 
Committed: Wed Mar 16 10:25:48 2016 -0700

--
 .../src/main/codegen/templates/BaseWriter.java  |  25 
 .../complex/impl/MapOrListWriterImpl.java   | 125 ++-
 2 files changed, 149 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/245da979/exec/vector/src/main/codegen/templates/BaseWriter.java
--
diff --git a/exec/vector/src/main/codegen/templates/BaseWriter.java 
b/exec/vector/src/main/codegen/templates/BaseWriter.java
index 9ca72c2..f2c6e22 100644
--- a/exec/vector/src/main/codegen/templates/BaseWriter.java
+++ b/exec/vector/src/main/codegen/templates/BaseWriter.java
@@ -106,12 +106,37 @@ package org.apache.drill.exec.vector.complex.writer;
 MapOrListWriter list(String name);
 boolean isMapWriter();
 boolean isListWriter();
+UInt1Writer uInt1(String name);
+UInt2Writer uInt2(String name);
+UInt4Writer uInt4(String name);
+UInt8Writer uInt8(String name);
 VarCharWriter varChar(String name);
+Var16CharWriter var16Char(String name);
+TinyIntWriter tinyInt(String name);
+SmallIntWriter smallInt(String name);
 IntWriter integer(String name);
 BigIntWriter bigInt(String name);
 Float4Writer float4(String name);
 Float8Writer float8(String name);
 BitWriter bit(String name);
+VarBinaryWriter varBinary(String name);
+/**
+ * @deprecated Use {@link #varBinary(String)} instead.
+ */
+@Deprecated
 VarBinaryWriter binary(String name);
+DateWriter date(String name);
+TimeWriter time(String name);
+TimeStampWriter timeStamp(String name);
+IntervalYearWriter intervalYear(String name);
+IntervalDayWriter intervalDay(String name);
+IntervalWriter interval(String name);
+Decimal9Writer decimal9(String name);
+Decimal18Writer decimal18(String name);
+Decimal28DenseWriter decimal28Dense(String name);
+Decimal38DenseWriter decimal38Dense(String name);
+Decimal38SparseWriter decimal38Sparse(String name);
+Decimal28SparseWriter decimal28Sparse(String name);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/245da979/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
--
diff --git 
a/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
 
b/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
index 1cfcdab..302d99e 100644
--- 
a/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
+++ 
b/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
@@ -17,13 +17,32 @@
  */
 package org.apache.drill.exec.vector.complex.impl;
 
-import org.apache.drill.exec.vector.complex.writer.BaseWriter.MapOrListWriter;
 import org.apache.drill.exec.vector.complex.writer.BaseWriter;
+import org.apache.drill.exec.vector.complex.writer.BaseWriter.MapOrListWriter;
 import org.apache.drill.exec.vector.complex.writer.BigIntWriter;
 import org.apache.drill.exec.vector.complex.writer.BitWriter;
+import org.apache.drill.exec.vector.complex.writer.DateWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal18Writer;
+import org.apache.drill.exec.vector.complex.writer.Decimal28DenseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal28SparseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal38DenseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal38SparseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal9Writer;
 import org.apache.drill.exec.vector.complex.writer.Float4Writer;
 import org.apache.drill.exec.vector.complex.writer.Float8Writer;
 import org.apache.drill.exec.vector.complex.writer.IntWriter;
+import org.apache.drill.exec.vector.complex.writer.IntervalDayWriter;
+import org.apache.drill.exec.vector.complex.writer.IntervalWriter;
+import org.apache.drill.exec.vector.complex.writer.IntervalYearWriter;
+import org.apache.drill.exec.vector.complex.writer.SmallIntWriter;
+import org.apache.drill.exec.vector.complex.writer.Time

[1/5] drill-site git commit: 1.6 release

2016-03-19 Thread bridgetb
Repository: drill-site
Updated Branches:
  refs/heads/asf-site 7fce5a822 -> 3f33f4a9f


http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/download/index.html
--
diff --git a/download/index.html b/download/index.html
index e8af8a7..335df1c 100644
--- a/download/index.html
+++ b/download/index.html
@@ -114,23 +114,23 @@
 
 
 
-Drill 1.5 was released on February 16, 2016.
+Drill 1.6 was released on March 16, 2016.
 
 
 
 
-http://www.apache.org/dyn/closer.cgi/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz";
 class="find" id="apachemirror">Find an Apache Mirror
-http://www.apache.org/dyn/closer.lua?filename=drill/drill-1.5.0/apache-drill-1.5.0.tar.gz&action=download";
 class="dl" id="directdownload">Direct File Download
+http://www.apache.org/dyn/closer.cgi/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz";
 class="find" id="apachemirror">Find an Apache Mirror
+http://www.apache.org/dyn/closer.lua?filename=drill/drill-1.6.0/apache-drill-1.6.0.tar.gz&action=download";
 class="dl" id="directdownload">Direct File Download
 Client Drivers 
(ODBC/JDBC)
 
 
 
 
-Additional resources for Drill 1.5:
+Additional resources for Drill 1.6:
 
-Blog post
-https://drill.apache.org/docs/apache-drill-1-5-0-release-notes/";>Release 
notes (JIRA)
-https://github.com/apache/drill/tree/1.5.0";>Source code
+Blog post
+https://drill.apache.org/docs/apache-drill-1-6-0-release-notes/";>Release 
notes (JIRA)
+https://github.com/apache/drill/tree/1.6.0";>Source code
 
 
 If you're looking for an older release, see the release notes.

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/feed.xml
--
diff --git a/feed.xml b/feed.xml
index f6ff706..ba42d1e 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,11 +6,40 @@
 
 /
 
-Tue, 15 Mar 2016 17:21:51 -0700
-Tue, 15 Mar 2016 17:21:51 -0700
+Wed, 16 Mar 2016 09:15:27 -0700
+Wed, 16 Mar 2016 09:15:27 -0700
 Jekyll v2.5.2
 
   
+Drill 1.6 Released
+

Today, we're happy to announce the availability of Drill 1.6.0. You can download it here.

; + +

The release provides the following bug fixes and improvements:

+ +

Inbound Impersonation

+ +

This feature is useful in a multi-tier architecture where queries must run as the end user instead of the application user. See Configuring Inbound Impersonation.

+ +

JDK 1.8 Support

+ +

You can now build and run Drill with JDK 1.8. See Distributed Mode Prerequisites or Embedded Mode Prerequisites.

+ +

Additional Custom Window Frames

+ +

The window function frame clause now supports additional custom frames. See Window Function Syntax.

+ +

A complete list of JIRAs resolved in the 1.6.0 release can be found here.

; + +Wed, 16 Mar 2016 00:00:00 -0700 +/blog/2016/03/16/drill-1.6-released/ +/blog/2016/03/16/drill-1.6-released/ + + +blog + + + + Drill 1.5 Released

Today, we're happy to announce the availability of Drill 1.5.0. You can download it here.

; @@ -450,27 +479,5 @@ Tomer Shiran and Jacques Nadeau

- -Apache Parquet Graduates to a Top-Level Project -

It's an exciting day. Apache Parquet, the de-facto standard columnar format for Hadoop, has graduated to an Apache top-level project.

- -

The Drill project supports a variety of file formats, but Parquet is the highest performing format, and it's the one we recommend to anyone who wants to maximize the performance of their queries. We've had the pleasure of working closely with the Parquet community for over two years, and it's exciting to see how much the project has evolved.

- -

We've made a number of contributions to the project, including support for self-describing data. We just implemented off-heap memory management for the Parquet readers and writers, which will improve Parquet's memory handling. (This enhancement will be available in Parquet 1.8.)

- -

I wanted to congratulate Twitter's Julien Le Dem (@j_;), VP of Apache Parquet, and the entire Parquet community on the g


drill-site git commit: 1.6 download link updates

2016-03-19 Thread bridgetb
Repository: drill-site
Updated Branches:
  refs/heads/asf-site 3f33f4a9f -> 157ceaac4


1.6 download link updates


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

Branch: refs/heads/asf-site
Commit: 157ceaac482542dc6be83e109e998f71d4479bc5
Parents: 3f33f4a
Author: Bridget Bevens 
Authored: Wed Mar 16 12:12:11 2016 -0700
Committer: Bridget Bevens 
Committed: Wed Mar 16 12:12:11 2016 -0700

--
 docs/configuring-inbound-impersonation/index.html | 12 ++--
 docs/drill-in-10-minutes/index.html   | 14 +++---
 .../installing-drill-on-linux-and-mac-os-x/index.html |  8 
 docs/installing-drill-on-windows/index.html   |  4 ++--
 feed.xml  |  4 ++--
 5 files changed, 21 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill-site/blob/157ceaac/docs/configuring-inbound-impersonation/index.html
--
diff --git a/docs/configuring-inbound-impersonation/index.html 
b/docs/configuring-inbound-impersonation/index.html
index 184fadc..7a56af7 100644
--- a/docs/configuring-inbound-impersonation/index.html
+++ b/docs/configuring-inbound-impersonation/index.html
@@ -1060,15 +1060,15 @@
 
 
   
-Drill supports user 
impersonation  where queries run as the user that created a connection. 
However, this user is not necessarily the end user who submits the queries. For 
example, in a classic three-tier architecture, the end user interacts with 
Tableau Desktop, which communicates with a Tableau Server, which in turn 
communicates with a Drill cluster. In this scenario, a proxy user creates a 
connection, and the queries are submitted to Drill by the proxy user on behalf 
of the end user, and not by the end user directly. In this particular case, the 
query runs as the end user.  
+Drill supports user 
impersonation  where queries run as the user that created a connection. 
However, this user is not necessarily the end user who submits the queries. For 
example, in a classic three-tier architecture, the end user interacts with 
Tableau Desktop, which communicates with a Tableau Server, which in turn 
communicates with a Drill cluster. In this scenario, a proxy user creates a 
connection, and the queries are submitted to Drill by the proxy user on behalf 
of the end user, and not by the end user directly. In this particular case, the 
query needs to be run as the end user.  
 
-As of Drill 1.6, an administrator can define inbound impersonation policies 
to impersonate the end user. Impersonating the end user is a natural extension 
of Drill’s impersonation model and accounts for one more user hop in 
the chain. This additional hop requires authorization, meaning that the 
proxy user needs to be authorized to submit queries on behalf of the specified 
end user. Otherwise, any user can impersonate another user. Then, the query 
runs as the end user, and data authorization is based on this user’s access 
permissions. Note that without authentication enabled in 
both communication channels, a user can impersonate any other user.
+As of Drill 1.6, an administrator can define inbound impersonation policies 
to impersonate the end user. The proxy user needs to be authorized to submit 
queries on behalf of the specified end user. Otherwise, any user can 
impersonate another user. Then, the query runs as the end user, and data 
authorization is based on this user’s access permissions. Note that without 
authentication enabled in 
both communication channels, a user can impersonate any other user.
 
 Drill trusts proxy users to provide the correct end user identity 
information. Drill does not authenticate the end user. The proxy user 
(application) is responsible for end user authentication, which is usually 
enabled.
 
   
 
-This image shows how identity is propagated through various layers (with 
authentication enabled). The flow on the left is Drill with user impersonation 
enabled, and the flow on the right is Drill with inbound impersonation enabled. 
t:euser is a property on the connection (u is 
username, pis password, t 
is impersonation_target).  
+This image shows how identity is propagated through various layers (with 
authentication enabled). The flow on the left is Drill with user impersonation 
enabled, and the flow on the right is Drill with user impersonation and inbound 
impersonation enabled. t:euser is a property on the connection 
(u is username, pis 
password, t is impersonation_target).  

 
 Configuring Inbound 
Impersonation
 
@@ -1088,7 +1088,7 

[2/2] drill git commit: 1.6 release updates

2016-03-19 Thread bridgetb
1.6 release updates


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

Branch: refs/heads/gh-pages
Commit: a19ca1d47c3cabc6339df4eb0d3e379e14d52ad3
Parents: 86c7e3f
Author: Bridget Bevens 
Authored: Wed Mar 16 09:09:52 2016 -0700
Committer: Bridget Bevens 
Committed: Wed Mar 16 09:09:52 2016 -0700

--
 _data/version.json  |  10 +-
 .../045-distributed-mode-prerequisites.md   |  11 +-
 .../010-embedded-mode-prerequisites.md  |  11 +-
 _docs/rn/005-1.6.0-rn.md| 125 +++
 blog/_posts/2016-03-16-drill-1.6-released.md|  23 
 5 files changed, 163 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/a19ca1d4/_data/version.json
--
diff --git a/_data/version.json b/_data/version.json
index 9d11f0f..71fd327 100644
--- a/_data/version.json
+++ b/_data/version.json
@@ -1,7 +1,7 @@
 {
-  "display_version": "1.5",
-  "full_version": "1.5.0",
-  "release_date": "February 16, 2016",
-  "blog_post":"/blog/2016/02/16/drill-1.5-released",
-  "release_notes": 
"https://drill.apache.org/docs/apache-drill-1-5-0-release-notes/";
+  "display_version": "1.6",
+  "full_version": "1.6.0",
+  "release_date": "March 16, 2016",
+  "blog_post":"/blog/2016/03/16/drill-1.6-released",
+  "release_notes": 
"https://drill.apache.org/docs/apache-drill-1-6-0-release-notes/";
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/a19ca1d4/_docs/install/045-distributed-mode-prerequisites.md
--
diff --git a/_docs/install/045-distributed-mode-prerequisites.md 
b/_docs/install/045-distributed-mode-prerequisites.md
index 17d3218..6829a76 100644
--- a/_docs/install/045-distributed-mode-prerequisites.md
+++ b/_docs/install/045-distributed-mode-prerequisites.md
@@ -1,6 +1,6 @@
 ---
 title: "Distributed Mode Prerequisites"
-date: 2015-12-30 19:31:38 UTC
+date: 2016-03-16 16:09:54 UTC
 parent: "Installing Drill in Distributed Mode"
 ---
 You can install Apache Drill on one or more nodes to
@@ -10,7 +10,8 @@ run it in a clustered environment.
 
 Before you install Drill on nodes in a cluster, ensure that the cluster meets 
the following prerequisites:
 
-  * Running [Oracle JDK version 
7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
 (Required)  
-  * Running a [ZooKeeper 
quorum](https://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html#sc_RunningReplicatedZooKeeper)
 (Required)  
-  * Running a Hadoop cluster (Recommended)  
-  * Using DNS (Recommended)
+  * (Required) Running Oracle JDK [version 
7](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
 or [version 
8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
  
+  As of Drill 1.6, you can build and run Drill with JDK 1.8. If building 
Drill, note that some unit tests may fail. To avoid this, issue `-DskipTests` 
to skip the unit tests.  
+  * (Required) Running a [ZooKeeper 
quorum](https://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html#sc_RunningReplicatedZooKeeper)
 (Required)  
+  * (Recommended) Running a Hadoop cluster   
+  * (Recommended) Using DNS 

http://git-wip-us.apache.org/repos/asf/drill/blob/a19ca1d4/_docs/install/installing-drill-in-embedded-mode/010-embedded-mode-prerequisites.md
--
diff --git 
a/_docs/install/installing-drill-in-embedded-mode/010-embedded-mode-prerequisites.md
 
b/_docs/install/installing-drill-in-embedded-mode/010-embedded-mode-prerequisites.md
index 42b742f..0ec69ee 100644
--- 
a/_docs/install/installing-drill-in-embedded-mode/010-embedded-mode-prerequisites.md
+++ 
b/_docs/install/installing-drill-in-embedded-mode/010-embedded-mode-prerequisites.md
@@ -1,16 +1,13 @@
 ---
 title: "Embedded Mode Prerequisites"
-date: 2015-12-30 19:31:38 UTC
+date: 2016-03-16 16:09:54 UTC
 parent: "Installing Drill in Embedded Mode"
 ---
-To use Drill only on a single node, install Drill in embedded mode. Installing 
Drill in embedded mode installs Drill locally on your machine. Embedded mode is 
a quick way to install and try Drill without having to
-perform any configuration tasks. A ZooKeeper installation is not required. 
Installing Drill in embedded mode configures the
-local Drillbit service to start automatically when you launch the Drill shell. 
You can install Drill in embedded mode on a machine
-running Linux, Mac OS X, or Windows.
+To use Drill on a single node, install Drill in embedded 

[2/5] drill-site git commit: 1.6 release

2016-03-19 Thread bridgetb
http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/persistent-configuration-storage/index.html
--
diff --git a/docs/persistent-configuration-storage/index.html 
b/docs/persistent-configuration-storage/index.html
index 143b61a..60c6f48 100644
--- a/docs/persistent-configuration-storage/index.html
+++ b/docs/persistent-configuration-storage/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/physical-operators/index.html
--
diff --git a/docs/physical-operators/index.html 
b/docs/physical-operators/index.html
index 12a3f43..d652c0e 100644
--- a/docs/physical-operators/index.html
+++ b/docs/physical-operators/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/planning-and-execution-options/index.html
--
diff --git a/docs/planning-and-execution-options/index.html 
b/docs/planning-and-execution-options/index.html
index 7d6f64c..a075007 100644
--- a/docs/planning-and-execution-options/index.html
+++ b/docs/planning-and-execution-options/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/plugin-configuration-basics/index.html
--
diff --git a/docs/plugin-configuration-basics/index.html 
b/docs/plugin-configuration-basics/index.html
index df89021..4aff24f 100644
--- a/docs/plugin-configuration-basics/index.html
+++ b/docs/plugin-configuration-basics/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/ports-used-by-drill/index.html
--
diff --git a/docs/ports-used-by-drill/index.html 
b/docs/ports-used-by-drill/index.html
index 220cfd6..1519e00 100644
--- a/docs/ports-used-by-drill/index.html
+++ b/docs/ports-used-by-drill/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/project-bylaws/index.html
--
diff --git a/docs/project-bylaws/index.html b/docs/project-bylaws/index.html
index 6c902ec..41a1c7f 100644
--- a/docs/project-bylaws/index.html
+++ b/docs/project-bylaws/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/query-audit-logging/index.html
--
diff --git a/docs/query-audit-logging/index.html 
b/docs/query-audit-logging/index.html
index 3708bac..c6fff7a 100644
--- a/docs/query-audit-logging/index.html
+++ b/docs/query-audit-logging/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/query-data-introduction/index.html
--
diff --git a/docs/query-data-introduction/index.html 
b/docs/query-data-introduction/index.html
index 529d47f..c44e6ec 100644
--- a/docs/query-data-introduction/index.html
+++ b/docs/query-data-introduction/index.html
@@ -941,6 +941,10 @@
   
   
 
+  Apache Drill 1.6.0 Release 
Notes
+
+  
+
   Apache Drill 1.5.0 Release 
Notes
 
   

http://git-wip-us.apache.org/repos/asf/drill-site/blob/3f33f4a9/docs/query

[1/2] drill git commit: DRILL-4376: Wrong results when doing a count(*) on part of directories with metadata cache

2016-03-19 Thread adeneche
Repository: drill
Updated Branches:
  refs/heads/master 050ff9679 -> 71608ca9f


DRILL-4376: Wrong results when doing a count(*) on part of directories with 
metadata cache


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

Branch: refs/heads/master
Commit: 11fe8d7cdb1df4100cd48bcce1de0b2c3c5f983a
Parents: 050ff96
Author: adeneche 
Authored: Wed Mar 9 13:44:02 2016 +0100
Committer: adeneche 
Committed: Wed Mar 16 16:53:23 2016 +0100

--
 .../drill/exec/store/dfs/FileSelection.java |  22 ++--
 .../exec/store/parquet/ParquetGroupScan.java| 101 +--
 .../store/parquet/TestParquetMetadataCache.java |  19 
 3 files changed, 103 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/11fe8d7c/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
index b5b1d8f..dc49281 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
@@ -249,7 +249,7 @@ public class FileSelection {
* @see FileSelection#FileSelection(List, List, String)
*/
   public static FileSelection create(final List statuses, final 
List files, final String root) {
-final boolean bothNonEmptySelection = (statuses != null && statuses.size() 
> 0) && (files != null && files.size() == 0);
+final boolean bothNonEmptySelection = (statuses != null && statuses.size() 
> 0) && (files != null && files.size() > 0);
 final boolean bothEmptySelection = (statuses == null || statuses.size() == 
0) && (files == null || files.size() == 0);
 
 if (bothNonEmptySelection || bothEmptySelection) {
@@ -263,14 +263,7 @@ public class FileSelection {
   if (Strings.isNullOrEmpty(root)) {
 throw new DrillRuntimeException("Selection root is null or empty" + 
root);
   }
-  // Handle wild card
-  final Path rootPath;
-  if (root.contains(WILD_CARD)) {
-final String newRoot = root.substring(0, root.indexOf(WILD_CARD));
-rootPath = new Path(newRoot);
-  } else {
-rootPath = new Path(root);
-  }
+  final Path rootPath = handleWildCard(root);
   final URI uri = statuses.get(0).getPath().toUri();
   final Path path = new Path(uri.getScheme(), uri.getAuthority(), 
rootPath.toUri().getPath());
   selectionRoot = path.toString();
@@ -278,6 +271,17 @@ public class FileSelection {
 return new FileSelection(statuses, files, selectionRoot);
   }
 
+  private static Path handleWildCard(final String root) {
+if (root.contains(WILD_CARD)) {
+  int idx = root.indexOf(WILD_CARD); // first wild card in the path
+  idx = root.lastIndexOf(PATH_SEPARATOR, idx); // file separator right 
before the first wild card
+  final String newRoot = root.substring(0, idx);
+  return new Path(newRoot);
+} else {
+  return new Path(root);
+}
+  }
+
   private static String removeLeadingSlash(String path) {
 if (path.charAt(0) == '/') {
   String newPath = path.substring(1);

http://git-wip-us.apache.org/repos/asf/drill/blob/11fe8d7c/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
index ccfca41..774f515 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
@@ -177,17 +177,7 @@ public class ParquetGroupScan extends 
AbstractFileGroupScan {
 
 this.selectionRoot = selectionRoot;
 
-FileSelection newSelection = null;
-if (!selection.isExpanded()) {
-  // if metadata cache exists, do the expansion of selection using the 
metadata cache;
-  // otherwise let init() handle the expansion
-  FileStatus firstPath = selection.getFirstPath(fs);
-  Path p = new Path(firstPath.getPath(), Metadata.METADATA_FILENAME);
-  if (fs.exists(p)) {
-newSelection = initFromMetadataCache(fs, selection);
-  }
-}
-FileSelection fileSelection = newSelection != null ? newSelection : 
selection;
+final FileSelection fileSelecti

drill git commit: update release notes to include DRILL-4287 as resolved bug

2016-03-19 Thread bridgetb
Repository: drill
Updated Branches:
  refs/heads/gh-pages 16eb5a7d3 -> 93accd167


update release notes to include DRILL-4287 as resolved bug


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

Branch: refs/heads/gh-pages
Commit: 93accd167b5b85da12874001417a8e09423e4315
Parents: 16eb5a7
Author: Bridget Bevens 
Authored: Thu Mar 17 11:33:00 2016 -0700
Committer: Bridget Bevens 
Committed: Thu Mar 17 11:33:00 2016 -0700

--
 _docs/rn/005-1.6.0-rn.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/93accd16/_docs/rn/005-1.6.0-rn.md
--
diff --git a/_docs/rn/005-1.6.0-rn.md b/_docs/rn/005-1.6.0-rn.md
index bb49ff9..1067313 100644
--- a/_docs/rn/005-1.6.0-rn.md
+++ b/_docs/rn/005-1.6.0-rn.md
@@ -43,6 +43,8 @@ This release provides inbound impersonation, support for JDK 
1.8, additional cus
 
 [DRILL-4279] -   
  Improve performance for skipAll query against Text/JSON/Parquet table
 
+[DRILL-4287] -   
  Do lazy reading of parquet metadata cache file
+
 [DRILL-4323] -   
  Hive Native Reader : A simple count(*) throws Incoming batch has an empty 
schema error
 
 [DRILL-4339] -   
  Avro Reader can not read records - Regression
@@ -121,5 +123,4 @@ This release provides inbound impersonation, support for 
JDK 1.8, additional cus
 [DRILL-4295] -   
  Obsolete protobuf generated files under protocol/
 
 
-
-
+
\ No newline at end of file



drill-site git commit: drill download link updates for 1.6

2016-03-19 Thread bridgetb
Repository: drill-site
Updated Branches:
  refs/heads/asf-site 157ceaac4 -> 25782ca2c


drill download link updates for 1.6


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

Branch: refs/heads/asf-site
Commit: 25782ca2ca06fda7d1fb37bdb3eeecf2602488d9
Parents: 157ceaa
Author: Bridget Bevens 
Authored: Wed Mar 16 12:22:57 2016 -0700
Committer: Bridget Bevens 
Committed: Wed Mar 16 12:22:57 2016 -0700

--
 docs/installing-drill-on-the-cluster/index.html | 8 
 feed.xml| 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill-site/blob/25782ca2/docs/installing-drill-on-the-cluster/index.html
--
diff --git a/docs/installing-drill-on-the-cluster/index.html 
b/docs/installing-drill-on-the-cluster/index.html
index 7062562..d6a47a9 100644
--- a/docs/installing-drill-on-the-cluster/index.html
+++ b/docs/installing-drill-on-the-cluster/index.html
@@ -1056,7 +1056,7 @@
 
 
 
- Feb 24, 2016
+ Mar 16, 2016
 
 
 
@@ -1065,11 +1065,11 @@
 You install Drill on nodes in the cluster, configure a cluster ID, 
and add Zookeeper information, as described in the following steps:
 
 
-Download the latest version of Apache Drill http://www.apache.org/dyn/closer.lua?filename=drill/drill-1.5.0/apache-drill-1.5.0.tar.gz&action=download";>here
 or from the http://www.apache.org/dyn/closer.cgi/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz";>Apache
 Drill mirror site with the command appropriate for your system:
+Download the latest version of Apache Drill http://www.apache.org/dyn/closer.lua?filename=drill/drill-1.6.0/apache-drill-1.6.0.tar.gz&action=download";>here
 or from the http://www.apache.org/dyn/closer.cgi/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz";>Apache
 Drill mirror site with the command appropriate for your system:
 
 
-wget 
http://mirrors.sonic.net/apache/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz
-curl -o apache-drill-1.5.0.tar.gz 
http://mirrors.sonic.net/apache/drill/drill-1.5.0/apache-drill-1.5.0.tar.gz
+wget 
http://apache.mesi.com.ar/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz
+curl -o apache-drill-1.6.0.tar.gz 
http://apache.mesi.com.ar/drill/drill-1.6.0/apache-drill-1.6.0.tar.gz
 
 Extract the tarball to the directory of your choice, such as 
/opt:
 tar -xzvf apache-drill-.tar.gz

http://git-wip-us.apache.org/repos/asf/drill-site/blob/25782ca2/feed.xml
--
diff --git a/feed.xml b/feed.xml
index eb95a5c..5d4c1c9 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,8 +6,8 @@
 
 /
 
-Wed, 16 Mar 2016 12:08:27 -0700
-Wed, 16 Mar 2016 12:08:27 -0700
+Wed, 16 Mar 2016 12:19:34 -0700
+Wed, 16 Mar 2016 12:19:34 -0700
 Jekyll v2.5.2
 
   



[3/6] drill git commit: DRILL-4372: Expose the functions return type to Drill

2016-03-19 Thread jni
http://git-wip-us.apache.org/repos/asf/drill/blob/c0293354/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillOperatorTable.java
--
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillOperatorTable.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillOperatorTable.java
index 4dd7963..7fe6020 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillOperatorTable.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillOperatorTable.java
@@ -19,6 +19,12 @@ package org.apache.drill.exec.planner.sql;
 
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.apache.calcite.sql.SqlAggFunction;
+import org.apache.calcite.sql.SqlFunction;
+import org.apache.calcite.sql.SqlPrefixOperator;
+import org.apache.drill.common.expression.FunctionCallFactory;
+import org.apache.drill.exec.expr.fn.DrillFuncHolder;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.calcite.sql.SqlFunctionCategory;
 import org.apache.calcite.sql.SqlIdentifier;
@@ -28,34 +34,50 @@ import org.apache.calcite.sql.SqlSyntax;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 
 import java.util.List;
+import java.util.Map;
 
+/**
+ * Implementation of {@link SqlOperatorTable} that contains standard operators 
and functions provided through
+ * {@link #inner SqlStdOperatorTable}, and Drill User Defined Functions.
+ */
 public class DrillOperatorTable extends SqlStdOperatorTable {
-  static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(DrillOperatorTable.class);
-
+//  private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(DrillOperatorTable.class);
   private static final SqlOperatorTable inner = SqlStdOperatorTable.instance();
-  private List operators;
+  private List operators = Lists.newArrayList();
+  private final Map calciteToWrapper = 
Maps.newIdentityHashMap();
   private ArrayListMultimap opMap = 
ArrayListMultimap.create();
 
   public DrillOperatorTable(FunctionImplementationRegistry registry) {
-operators = Lists.newArrayList();
-operators.addAll(inner.getOperatorList());
-
 registry.register(this);
+operators.addAll(inner.getOperatorList());
+populateWrappedCalciteOperators();
   }
 
   public void add(String name, SqlOperator op) {
 operators.add(op);
-opMap.put(name, op);
+opMap.put(name.toLowerCase(), op);
   }
 
   @Override
-  public void lookupOperatorOverloads(SqlIdentifier opName, 
SqlFunctionCategory category, SqlSyntax syntax, List operatorList) 
{
-inner.lookupOperatorOverloads(opName, category, syntax, operatorList);
-
-if (operatorList.isEmpty() && syntax == SqlSyntax.FUNCTION && 
opName.isSimple()) {
-  List drillOps = opMap.get(opName.getSimple().toLowerCase());
-  if (drillOps != null) {
-operatorList.addAll(drillOps);
+  public void lookupOperatorOverloads(SqlIdentifier opName, 
SqlFunctionCategory category,
+  SqlSyntax syntax, List operatorList) {
+final List calciteOperatorList = Lists.newArrayList();
+inner.lookupOperatorOverloads(opName, category, syntax, 
calciteOperatorList);
+if(!calciteOperatorList.isEmpty()) {
+  for(SqlOperator calciteOperator : calciteOperatorList) {
+if(calciteToWrapper.containsKey(calciteOperator)) {
+  operatorList.add(calciteToWrapper.get(calciteOperator));
+} else {
+  operatorList.add(calciteOperator);
+}
+  }
+} else {
+  // if no function is found, check in Drill UDFs
+  if (operatorList.isEmpty() && syntax == SqlSyntax.FUNCTION && 
opName.isSimple()) {
+List drillOps = 
opMap.get(opName.getSimple().toLowerCase());
+if (drillOps != null && !drillOps.isEmpty()) {
+  operatorList.addAll(drillOps);
+}
   }
 }
   }
@@ -69,4 +91,46 @@ public class DrillOperatorTable extends SqlStdOperatorTable {
   public List getSqlOperator(String name) {
 return opMap.get(name.toLowerCase());
   }
+
+  private void populateWrappedCalciteOperators() {
+for(SqlOperator calciteOperator : inner.getOperatorList()) {
+  final SqlOperator wrapper;
+  if(calciteOperator instanceof SqlAggFunction) {
+wrapper = new DrillCalciteSqlAggFunctionWrapper((SqlAggFunction) 
calciteOperator,
+getFunctionList(calciteOperator.getName()));
+  } else if(calciteOperator instanceof SqlFunction) {
+wrapper = new DrillCalciteSqlFunctionWrapper((SqlFunction) 
calciteOperator,
+getFunctionList(calciteOperator.getName()));
+  } else {
+final String drillOpName = 
FunctionCallFactory.replaceOpWithFuncName(calciteOperator.getName());
+final List drillFuncHolders = 
getFunctionList(drillOpName);
+if(drillFuncHolders.i

[4/6] drill git commit: DRILL-4372: Expose the functions return type to Drill

2016-03-19 Thread jni
DRILL-4372: Expose the functions return type to Drill

- Drill-Calite version update:
This commit needs to have Calcite's patch (CALCITE-1062) to plugin customized 
SqlOperator.

- FunctionTemplate
Add FunctionArgumentNumber annotation. This annotation element tells if the 
number of argument(s) is fixed or arbitrary (e.g., String concatenation 
function).

Due to this modification, there are some minor changes in DrillFuncHolder, 
DrillFunctionRegistry and FunctionAttributes.

- Checker
Add a new Checker (which Calcite uses to validate the legitimacy of the number 
of argument(s) for a function) to allow functions with arbitrary arguments to 
pass Caclite's validation

- Type conversion between Drill and Calcite
DrillConstExector is given a static method getDrillTypeFromCalcite() to convert 
Calcite types to Drill's.

- Extract function's return type inference
Unlike other functions, Extract function's return type can be determined solely 
based on the first argument. A logic is added in to allow this inference to 
happen

- DrillCalcite wrapper:
>From the aspects of return type inference and argument type checks, Calcite's 
>mechanism is very different from Drill's. In addition, currently, there is no 
>straightforward way for Drill to plug-in customized mechanisms to Calcite. 
>Thus, wrappers are provided to serve the objective.

Except for the mechanisms of type inference and argument type checks, these 
wrappers just forward any method calls to the wrapped SqlOpertor, SqlFuncion or 
SqlAggFunction to respond.

A interface DrillCalciteSqlWrapper is also added for the callers of the three 
wrappers to get the wrapped objects easier.

Due to these wrappers, UnsupportedOperatorsVisitor is modified in a minor 
manner.

- Calcite's SqlOpertor, SqlFuncion or SqlAggFunction are wrapped in 
DrillOperatorTable
Instead of returning Caclite's native SqlOpertor, SqlFuncion or SqlAggFunction, 
return the wrapped ones to ensure customized behaviors can be adopted.

- Type inference mechanism
This mechanism is used across all SqlOpertor, SqlFuncion or SqlAggFunction. 
Thus, it is factored out as its own method in TypeInferenceUtils

- Upgrade Drill-Calcite

Bump version number to 1.4.0-drill-test-r16

- Implement two argument version of lpad, rpad

- Implement one argument version of ltrim, rtrim, btrim


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

Branch: refs/heads/master
Commit: c0293354ec79b42ff27ce4ad2113a2ff52a934bd
Parents: 245da97
Author: Hsuan-Yi Chu 
Authored: Thu Mar 3 22:38:04 2016 -0800
Committer: Hsuan-Yi Chu 
Committed: Wed Mar 16 20:57:16 2016 -0700

--
 .../drill/exec/expr/fn/DrillFuncHolder.java |  26 +-
 .../exec/expr/fn/DrillFunctionRegistry.java | 107 ++-
 .../expr/fn/FunctionImplementationRegistry.java |   6 +
 .../exec/expr/fn/impl/StringFunctions.java  | 225 +++
 .../apache/drill/exec/planner/PlannerPhase.java |  10 +
 .../planner/logical/DrillConstExecutor.java |  81 +--
 .../drill/exec/planner/logical/DrillOptiq.java  |  12 -
 .../logical/DrillReduceAggregatesRule.java  | 250 +--
 .../planner/logical/PreProcessLogicalRel.java   |  75 ++-
 .../visitor/InsertLocalExchangeVisitor.java |   2 +-
 .../apache/drill/exec/planner/sql/Checker.java  |  35 +-
 .../sql/DrillCalciteSqlAggFunctionWrapper.java  | 162 +
 .../sql/DrillCalciteSqlFunctionWrapper.java | 147 +
 .../sql/DrillCalciteSqlOperatorWrapper.java | 140 
 .../planner/sql/DrillCalciteSqlWrapper.java |  33 +
 .../exec/planner/sql/DrillConvertletTable.java  |  14 +-
 .../planner/sql/DrillExtractConvertlet.java |   8 +-
 .../exec/planner/sql/DrillOperatorTable.java|  92 ++-
 .../exec/planner/sql/DrillSqlAggOperator.java   |  55 +-
 .../exec/planner/sql/DrillSqlOperator.java  |  81 +--
 .../exec/planner/sql/TypeInferenceUtils.java| 649 +++
 .../sql/handlers/CreateTableHandler.java|   2 +-
 .../planner/sql/handlers/DefaultSqlHandler.java |  10 +-
 .../sql/parser/UnsupportedOperatorsVisitor.java |  21 +-
 .../exec/resolver/DefaultFunctionResolver.java  |  13 +-
 .../exec/resolver/ExactFunctionResolver.java|  10 +-
 .../drill/exec/resolver/FunctionResolver.java   |  17 +-
 .../exec/resolver/FunctionResolverFactory.java  |   3 -
 .../drill/exec/resolver/TypeCastRules.java  |  18 +-
 .../apache/drill/TestDisabledFunctionality.java |  10 -
 .../drill/TestFunctionsWithTypeExpoQueries.java | 281 +++-
 .../exec/expr/fn/impl/TestStringFunctions.java  |  85 +++
 .../testConcatWithMoreThanTwoArgs.tsv   |   5 +
 .../typeExposure/metadata_caching/a.parquet | Bin 0 -> 439 bytes
 .../typeExposure/metadata_caching/b.parquet | Bin 0 -> 474 bytes
 .../common/expre

[5/6] drill git commit: DRILL-4372: (continued) Support for Window functions: - CUME_DIST - DENSE_RANK - PERCENT_RANK - RANK - ROW_NUMBER - NTILE - LEAD - LAG - FIRST_VALUE - LAST_VALUE

2016-03-19 Thread jni
DRILL-4372: (continued) Support for Window functions:
- CUME_DIST
- DENSE_RANK
- PERCENT_RANK
- RANK
- ROW_NUMBER
- NTILE
- LEAD
- LAG
- FIRST_VALUE
- LAST_VALUE


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

Branch: refs/heads/master
Commit: 488ba1aeca7c4bf83ef048a6b3515539c12fdaa9
Parents: c9f8621
Author: Hsuan-Yi Chu 
Authored: Mon Mar 14 16:11:10 2016 -0700
Committer: Hsuan-Yi Chu 
Committed: Fri Mar 18 16:27:22 2016 -0700

--
 .../exec/expr/fn/HiveFunctionRegistry.java  |  19 +--
 .../drill/exec/planner/sql/HiveUDFOperator.java |   2 +-
 .../planner/sql/HiveUDFOperatorNotInfer.java|  44 -
 .../sql/HiveUDFOperatorWithoutInference.java|  44 +
 .../drill/exec/fn/hive/TestInbuiltHiveUDFs.java |  37 ++--
 .../exec/expr/fn/DrillFunctionRegistry.java |  76 -
 .../exec/expr/fn/PluggableFunctionRegistry.java |   6 +-
 .../logical/DrillReduceAggregatesRule.java  |  26 +--
 .../planner/logical/PreProcessLogicalRel.java   |   9 +-
 .../exec/planner/physical/PlannerSettings.java  |   4 +-
 .../sql/DrillCalciteSqlOperatorWrapper.java |   2 -
 .../exec/planner/sql/DrillConvertletTable.java  |   3 +-
 .../planner/sql/DrillExtractConvertlet.java |  21 ++-
 .../exec/planner/sql/DrillOperatorTable.java|  72 
 .../exec/planner/sql/DrillSqlAggOperator.java   |   6 +-
 .../sql/DrillSqlAggOperatorNotInfer.java|  43 -
 .../DrillSqlAggOperatorWithoutInference.java|  43 +
 .../exec/planner/sql/DrillSqlOperator.java  |  12 ++
 .../planner/sql/DrillSqlOperatorNotInfer.java   |  76 -
 .../sql/DrillSqlOperatorWithoutInference.java   |  76 +
 .../drill/exec/planner/sql/SqlConverter.java|  50 +-
 .../exec/planner/sql/TypeInferenceUtils.java|  96 ++-
 .../sql/parser/DrillCalciteWrapperUtility.java  |  76 +
 .../sql/parser/UnsupportedOperatorsVisitor.java |  14 +-
 .../java/org/apache/drill/PlanningBase.java |   2 +-
 .../drill/TestFunctionsWithTypeExpoQueries.java | 168 ++-
 26 files changed, 650 insertions(+), 377 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/488ba1ae/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
--
diff --git 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
index 52bd05b..5e74f6f 100644
--- 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
+++ 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
@@ -18,22 +18,15 @@
 package org.apache.drill.exec.expr.fn;
 
 import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
-import java.util.Collection;
 
-import com.google.common.collect.Lists;
 import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.rel.type.RelDataTypeFactory;
 import org.apache.calcite.sql.SqlOperatorBinding;
 import org.apache.calcite.sql.type.SqlReturnTypeInference;
 import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.exceptions.UserException;
-import org.apache.drill.common.expression.ExpressionPosition;
 import org.apache.drill.common.expression.FunctionCall;
-import org.apache.drill.common.expression.LogicalExpression;
-import org.apache.drill.common.expression.MajorTypeInLogicalExpression;
 import org.apache.drill.common.scanner.ClassPathScanner;
 import org.apache.drill.common.scanner.persistence.ScanResult;
 import org.apache.drill.common.types.TypeProtos;
@@ -43,7 +36,7 @@ import org.apache.drill.common.types.Types;
 import org.apache.drill.exec.expr.fn.impl.hive.ObjectInspectorHelper;
 import org.apache.drill.exec.planner.sql.DrillOperatorTable;
 import org.apache.drill.exec.planner.sql.HiveUDFOperator;
-import org.apache.drill.exec.planner.sql.HiveUDFOperatorNotInfer;
+import org.apache.drill.exec.planner.sql.HiveUDFOperatorWithoutInference;
 import org.apache.drill.exec.planner.sql.TypeInferenceUtils;
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.UDF;
@@ -85,8 +78,8 @@ public class HiveFunctionRegistry implements 
PluggableFunctionRegistry{
   @Override
   public void register(DrillOperatorTable operatorTable) {
 for (String name : Sets.union(methodsGenericUDF.asMap().keySet(), 
methodsUDF.asMap().keySet())) {
-  operatorTable.addDefault(name, new 
HiveUDFOperatorNot

[2/6] drill git commit: DRILL-4372: (continued) Type inference for HiveUDFs

2016-03-19 Thread jni
DRILL-4372: (continued) Type inference for HiveUDFs


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

Branch: refs/heads/master
Commit: 9ecf4a484e2cc03f73aacd1b4f3801bb1909b71f
Parents: c029335
Author: Hsuan-Yi Chu 
Authored: Thu Mar 3 20:14:59 2016 -0800
Committer: Hsuan-Yi Chu 
Committed: Wed Mar 16 20:57:16 2016 -0700

--
 .../exec/expr/fn/HiveFunctionRegistry.java  | 58 +++-
 .../drill/exec/planner/sql/HiveUDFOperator.java | 28 ++
 .../drill/exec/fn/hive/TestInbuiltHiveUDFs.java | 28 ++
 3 files changed, 89 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/9ecf4a48/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
--
diff --git 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
index 728954d..9a4e210 100644
--- 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
+++ 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
@@ -18,18 +18,32 @@
 package org.apache.drill.exec.expr.fn;
 
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
+import java.util.Collection;
 
+import com.google.common.collect.Lists;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeFactory;
+import org.apache.calcite.sql.SqlOperatorBinding;
+import org.apache.calcite.sql.type.SqlReturnTypeInference;
+import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.drill.common.config.DrillConfig;
+import org.apache.drill.common.exceptions.UserException;
+import org.apache.drill.common.expression.ExpressionPosition;
 import org.apache.drill.common.expression.FunctionCall;
+import org.apache.drill.common.expression.LogicalExpression;
+import org.apache.drill.common.expression.MajorTypeInLogicalExpression;
 import org.apache.drill.common.scanner.ClassPathScanner;
 import org.apache.drill.common.scanner.persistence.ScanResult;
+import org.apache.drill.common.types.TypeProtos;
 import org.apache.drill.common.types.TypeProtos.MajorType;
 import org.apache.drill.common.types.TypeProtos.MinorType;
 import org.apache.drill.common.types.Types;
 import org.apache.drill.exec.expr.fn.impl.hive.ObjectInspectorHelper;
 import org.apache.drill.exec.planner.sql.DrillOperatorTable;
 import org.apache.drill.exec.planner.sql.HiveUDFOperator;
+import org.apache.drill.exec.planner.sql.TypeInferenceUtils;
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.UDF;
 import org.apache.hadoop.hive.ql.udf.UDFType;
@@ -70,7 +84,7 @@ public class HiveFunctionRegistry implements 
PluggableFunctionRegistry{
   @Override
   public void register(DrillOperatorTable operatorTable) {
 for (String name : Sets.union(methodsGenericUDF.asMap().keySet(), 
methodsUDF.asMap().keySet())) {
-  operatorTable.add(name, new HiveUDFOperator(name.toUpperCase()));
+  operatorTable.add(name, new HiveUDFOperator(name.toUpperCase(), new 
HiveSqlReturnTypeInference()));
 }
   }
 
@@ -204,4 +218,46 @@ public class HiveFunctionRegistry implements 
PluggableFunctionRegistry{
 return null;
   }
 
+  public class HiveSqlReturnTypeInference implements SqlReturnTypeInference {
+private HiveSqlReturnTypeInference() {
+
+}
+
+@Override
+public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
+  for (RelDataType type : opBinding.collectOperandTypes()) {
+final TypeProtos.MinorType minorType = 
TypeInferenceUtils.getDrillTypeFromCalciteType(type);
+if(minorType == TypeProtos.MinorType.LATE) {
+  return opBinding.getTypeFactory()
+  .createTypeWithNullability(
+  opBinding.getTypeFactory().createSqlType(SqlTypeName.ANY),
+  true);
+}
+  }
+
+  final FunctionCall functionCall = 
TypeInferenceUtils.convertSqlOperatorBindingToFunctionCall(opBinding);
+  final HiveFuncHolder hiveFuncHolder = getFunction(functionCall);
+  if(hiveFuncHolder == null) {
+String operandTypes = "";
+for(int j = 0; j < opBinding.getOperandCount(); ++j) {
+  operandTypes += opBinding.getOperandType(j).getSqlTypeName();
+  if(j < opBinding.getOperandCount() - 1) {
+operandTypes += ",";
+  }
+}
+
+throw UserException
+.functionError()
+

[1/6] drill git commit: DRILL-4372: (continued) Add option to disable/enable function output type inference

2016-03-19 Thread jni
Repository: drill
Updated Branches:
  refs/heads/master 245da9790 -> 600ba9ee1


DRILL-4372: (continued) Add option to disable/enable function output type 
inference


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

Branch: refs/heads/master
Commit: c9f8621d228cca803f967ae91c277f74c6e8e748
Parents: 9ecf4a4
Author: Hsuan-Yi Chu 
Authored: Tue Mar 8 17:57:36 2016 -0800
Committer: Hsuan-Yi Chu 
Committed: Wed Mar 16 20:57:16 2016 -0700

--
 .../exec/expr/fn/HiveFunctionRegistry.java  |   4 +-
 .../planner/sql/HiveUDFOperatorNotInfer.java|  44 
 .../exec/expr/fn/DrillFunctionRegistry.java |  89 +++-
 .../org/apache/drill/exec/ops/QueryContext.java |   2 +-
 .../logical/DrillReduceAggregatesRule.java  | 211 +--
 .../exec/planner/physical/PlannerSettings.java  |   7 +
 .../planner/sql/DrillAvgVarianceConvertlet.java |  14 +-
 .../exec/planner/sql/DrillOperatorTable.java|  86 ++--
 .../exec/planner/sql/DrillSqlAggOperator.java   |  56 -
 .../sql/DrillSqlAggOperatorNotInfer.java|  43 
 .../exec/planner/sql/DrillSqlOperator.java  |  99 -
 .../planner/sql/DrillSqlOperatorNotInfer.java   |  76 +++
 .../drill/exec/planner/sql/SqlConverter.java|  70 +-
 .../exec/planner/sql/TypeInferenceUtils.java|  13 +-
 .../server/options/SystemOptionManager.java |   1 +
 .../drill/TestFunctionsWithTypeExpoQueries.java | 188 -
 16 files changed, 837 insertions(+), 166 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/c9f8621d/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
--
diff --git 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
index 9a4e210..52bd05b 100644
--- 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
+++ 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
@@ -43,6 +43,7 @@ import org.apache.drill.common.types.Types;
 import org.apache.drill.exec.expr.fn.impl.hive.ObjectInspectorHelper;
 import org.apache.drill.exec.planner.sql.DrillOperatorTable;
 import org.apache.drill.exec.planner.sql.HiveUDFOperator;
+import org.apache.drill.exec.planner.sql.HiveUDFOperatorNotInfer;
 import org.apache.drill.exec.planner.sql.TypeInferenceUtils;
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.UDF;
@@ -84,7 +85,8 @@ public class HiveFunctionRegistry implements 
PluggableFunctionRegistry{
   @Override
   public void register(DrillOperatorTable operatorTable) {
 for (String name : Sets.union(methodsGenericUDF.asMap().keySet(), 
methodsUDF.asMap().keySet())) {
-  operatorTable.add(name, new HiveUDFOperator(name.toUpperCase(), new 
HiveSqlReturnTypeInference()));
+  operatorTable.addDefault(name, new 
HiveUDFOperatorNotInfer(name.toUpperCase()));
+  operatorTable.addInference(name, new HiveUDFOperator(name.toUpperCase(), 
new HiveSqlReturnTypeInference()));
 }
   }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/c9f8621d/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/planner/sql/HiveUDFOperatorNotInfer.java
--
diff --git 
a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/planner/sql/HiveUDFOperatorNotInfer.java
 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/planner/sql/HiveUDFOperatorNotInfer.java
new file mode 100644
index 000..0c718f6
--- /dev/null
+++ 
b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/planner/sql/HiveUDFOperatorNotInfer.java
@@ -0,0 +1,44 @@
+/**
+ * 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 perm

[6/6] drill git commit: Bump calcite version to 1.4.0-drill-r11

2016-03-19 Thread jni
Bump calcite version to 1.4.0-drill-r11


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

Branch: refs/heads/master
Commit: 600ba9ee1d7f321036a6390c0ff9d9872b1d80f0
Parents: 488ba1a
Author: Hsuan-Yi Chu 
Authored: Thu Mar 17 21:54:05 2016 -0700
Committer: Hsuan-Yi Chu 
Committed: Fri Mar 18 16:27:27 2016 -0700

--
 .../java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java | 5 -
 pom.xml | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/drill/blob/600ba9ee/exec/java-exec/src/test/java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java
--
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java
 
b/exec/java-exec/src/test/java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java
index 5df71f0..5d16edd 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java
@@ -476,11 +476,6 @@ public class TestFunctionsWithTypeExpoQueries extends 
BaseTestQuery {
   }
 
   @Test
-  @Ignore // This is temporarily turned off due to
-  // [1] [StarColumn] Reverse one change in CALCITE-356,
-  // which regresses AggChecker logic, after * query in schema-less table 
is added.
-  // [2] [StarColumn]
-  // When group-by a column, projecting on a star which cannot be expanded 
at planning time, use ITEM operator to wrap this column
   public void testUDFInGroupBy() throws Exception {
 final String query = "select count(*) as col1, 
substr(lower(UPPER(cast(t3.full_name as varchar(100, 5, 2) as col2, \n" +
 "char_length(substr(lower(UPPER(cast(t3.full_name as varchar(100, 
5, 2)) as col3 \n" +

http://git-wip-us.apache.org/repos/asf/drill/blob/600ba9ee/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 4dfa682..058036b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1279,7 +1279,7 @@
   
 org.apache.calcite
 calcite-core
-1.4.0-drill-test-r16
+1.4.0-drill-r11
 
   
 org.jgrapht