You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ts...@apache.org on 2015/01/15 06:11:48 UTC

svn commit: r1651949 [12/13] - in /drill/site/trunk/content/drill: ./ blog/2014/11/19/sql-on-mongodb/ blog/2014/12/02/drill-top-level-project/ blog/2014/12/09/running-sql-queries-on-amazon-s3/ blog/2014/12/11/apache-drill-qa-panelist-spotlight/ blog/20...

Added: 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=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/sql-commands-summary/index.html (added)
+++ drill/site/trunk/content/drill/docs/sql-commands-summary/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>SQL Commands Summary - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>SQL Commands Summary</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>The following table provides a list of the SQL commands that Drill supports,
+with their descriptions and example syntax:</p>
+
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Command</th><th class="confluenceTh">Description</th><th class="confluenceTh">Syntax</th></tr><tr><td valign="top" class="confluenceTd">ALTER SESSION</td><td valign="top" class="confluenceTd">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="https://cwiki.apache.org/confluence/display/DRILL/Planning+and+Execution+Options" rel="nofollow">Planning and Execution Options</a>.</td><td valign="top" class="confluenceTd"><code>ALTER SESSION SET `option_name`='string';<br />ALTER SESSION SET `option_name`=TRUE | FALSE;</code></td></tr><tr><td valign="top" class="confluenceTd">ALTER SYSTEM</td><td valign="top" class="confluenceTd">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="h
 ttps://cwiki.apache.org/confluence/display/DRILL/Planning+and+Execution+Options" rel="nofollow">Planning and Execution Options</a>.</td><td valign="top" class="confluenceTd"><code>ALTER SYSTEM `option_name`='string'<br />ALTER SYSTEM `option_name`=TRUE | FALSE;</code></td></tr><tr><td valign="top" class="confluenceTd"><p><a href="/confluence/display/DRILL/CREATE+TABLE+AS+%28CTAS%29+Command">CREATE TABLE AS<br />(CTAS)</a></p></td><td valign="top" class="confluenceTd"><p>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.</p><p>You 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 </span><code>store.format</code><span style="line-height
 : 1.4285715;"> option<span><span>).</span></span></span></p></td><td valign="top" class="confluenceTd"><code>CREATE TABLE new_table_name AS &lt;query&gt;;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd">CREATE VIEW</td><td valign="top" colspan="1" class="confluenceTd"><p>Creates a new view based on the results of a SELECT query.</p></td><td valign="top" colspan="1" class="confluenceTd"><code>CREATE VIEW view_name [(column_list)] AS &lt;query&gt;;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd">DROP VIEW</td><td valign="top" colspan="1" class="confluenceTd">Removes one or more views.</td><td valign="top" colspan="1" class="confluenceTd"><code>DROP VIEW view_name [, <em class="replaceable">view_name</em>] ...;     </code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd"><a href="https://cwiki.apache.org/confluence/display/DRILL/EXPLAIN+Commands" rel="nofollow">EXPLAIN PLAN FOR</a></td><td valign="top" colspan="1" class="conflue
 nceTd">Returns the physical plan for a particular query.</td><td valign="top" colspan="1" class="confluenceTd"><code>EXPLAIN PLAN FOR &lt;query&gt;;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd"><a href="https://cwiki.apache.org/confluence/display/DRILL/EXPLAIN+Commands" rel="nofollow">EXPLAIN PLAN WITHOUT IMPLEMENTATION FOR</a></td><td valign="top" colspan="1" class="confluenceTd">Returns the logical plan for a particular query.</td><td valign="top" colspan="1" class="confluenceTd"><code>EXPLAIN PLAN WITHOUT IMPLEMENTATION FOR &lt;query&gt;;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd"><a href="https://cwiki.apache.org/confluence/display/DRILL/SELECT+Statements" rel="nofollow">SELECT</a></td><td valign="top" colspan="1" class="confluenceTd">Retrieves data from tables and files.</td><td valign="top" colspan="1" class="confluenceTd"><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></tr><tr><td valign="top" colspan="1" class="confluenceTd">SHOW DATABASES</td><td valign="top" colspan="1" class="confluenceTd">Returns a list of available schemas. Equivalent to SHOW SCHEMAS.</td><td valign="top" colspan="1" class="confluenceTd"><code>SHOW DATABASES;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd"><a href="https://cwiki.apache.org/confluence/display/DRILL/SHOW+FILES+Command" rel="nofollow">SHOW FILES</a></td><td valign="top" colspan="1" class="confluenceTd">Returns a list of files in a file system schema.</td><td valign="top" colspan="1" class="confluenceTd"><code>SHOW FILES IN filesystem.`schema_name`;<br />SHOW FILES FROM filesystem.`schema_name`;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd">SHOW SCHEMAS</td><td valign="top" colspan="1" class="confluenceTd">Returns a list of available schemas. Equivalent to SHOW DATABASES.</td><td valign="top" colspan="1" clas
 s="confluenceTd"><code>SHOW SCHEMAS;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd">SHOW TABLES</td><td valign="top" colspan="1" class="confluenceTd">Returns a list of tables for all schemas. Optionally, you can first issue the <code>USE </code>command to identify the schema for which you want to view tables.<br />For example, the following <code>USE</code> statement tells Drill that you only want information from the <code>hive.default</code> schema:<br /><code>USE hive.`default`;</code></td><td valign="top" colspan="1" class="confluenceTd"><code>SHOW TABLES;</code></td></tr><tr><td valign="top" colspan="1" class="confluenceTd">USE</td><td valign="top" colspan="1" class="confluenceTd">Change to a particular schema. When you opt to use a particular schema, Drill issues queries on that schema only.</td><td valign="top" colspan="1" class="confluenceTd"><code>USE schema_name;</code></td></tr></tbody></table></div>  
+  
+
+<p>Click on any of the following links for more information about the various
+commands:</p>
+
+<ul>
+<li><a href="/confluence/display/DRILL/CREATE+TABLE+AS+%28CTAS%29+Command">CREATE TABLE AS (CTAS) Command</a></li>
+<li><a href="/confluence/display/DRILL/EXPLAIN+Commands">EXPLAIN Commands</a></li>
+<li><a href="/confluence/display/DRILL/SELECT+Statements">SELECT Statements</a></li>
+<li><a href="/confluence/display/DRILL/SHOW+FILES+Command">SHOW FILES Command</a></li>
+</ul>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/sql-functions/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/sql-functions/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/sql-functions/index.html (added)
+++ drill/site/trunk/content/drill/docs/sql-functions/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,564 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>SQL Functions - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>SQL Functions</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>You can use the following types of functions in your Drill queries:</p>
+
+<ul>
+<li>Scalar Functions</li>
+<li>Aggregate Functions</li>
+<li>Aggregate Statistics Functions</li>
+<li>Convert Functions</li>
+<li>Nested Data Functions</li>
+</ul>
+
+<h2 id="scalar-functions">Scalar Functions</h2>
+
+<h3 id="math">Math</h3>
+
+<p>You can use the following scalar math functions in your Drill queries:</p>
+
+<ul>
+<li>ABS</li>
+<li>CEIL</li>
+<li>CEILING</li>
+<li>DIV</li>
+<li>FLOOR</li>
+<li>MOD</li>
+<li>POWER </li>
+<li>RANDOM</li>
+<li>ROUND</li>
+<li>SIGN</li>
+<li>SQRT</li>
+<li>TRUNC</li>
+</ul>
+
+<h3 id="string-functions">String Functions</h3>
+
+<p>The following table provides the string functions that you can use in your
+Drill queries:</p>
+
+<table><thead>
+<tr>
+<th>Function</th>
+<th>Return Type</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>char_length(string) or character_length(string)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>concat(str &quot;any&quot; [, str &quot;any&quot; [, ...] ])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>convert_from(string bytea, src_encoding name)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>convert_to(string text, dest_encoding name)</td>
+<td>bytea</td>
+</tr>
+<tr>
+<td>initcap(string)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>left(str text, n int)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>length(string)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>length(string bytes, encoding name )</td>
+<td>int</td>
+</tr>
+<tr>
+<td>lower(string)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>lpad(string text, length int [, fill text])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>ltrim(string text [, characters text])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>position(substring in string)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>regexp_replace(string text, pattern text, replacement text [, flags text])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>replace(string text, from text, to text)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>right(str text, n int)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>rpad(string text, length int [, fill text])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>rtrim(string text [, characters text])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>strpos(string, substring)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>substr(string, from [, count])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>substring(string [from int] [for int])</td>
+<td>text</td>
+</tr>
+<tr>
+<td>trim([leading</td>
+<td>trailing</td>
+</tr>
+<tr>
+<td>upper(string)</td>
+<td>text</td>
+</tr>
+</tbody></table>
+
+<h3 id="date/time-functions">Date/Time Functions</h3>
+
+<p>The following table provides the date/time functions that you can use in your
+Drill queries:</p>
+
+<table><thead>
+<tr>
+<th><strong>Function</strong></th>
+<th><strong>Return Type</strong></th>
+</tr>
+</thead><tbody>
+<tr>
+<td>current_date</td>
+<td>date</td>
+</tr>
+<tr>
+<td>current_time</td>
+<td>time with time zone</td>
+</tr>
+<tr>
+<td>current_timestamp</td>
+<td>timestamp with time zone</td>
+</tr>
+<tr>
+<td>date_add(date,interval expr type)</td>
+<td>date/datetime</td>
+</tr>
+<tr>
+<td>date_part(text, timestamp)</td>
+<td>double precision</td>
+</tr>
+<tr>
+<td>date_part(text, interval)</td>
+<td>double precision</td>
+</tr>
+<tr>
+<td>date_sub(date,INTERVAL expr type)</td>
+<td>date/datetime</td>
+</tr>
+<tr>
+<td>extract(field from interval)</td>
+<td>double precision</td>
+</tr>
+<tr>
+<td>extract(field from timestamp)</td>
+<td>double precision</td>
+</tr>
+<tr>
+<td>localtime</td>
+<td>time</td>
+</tr>
+<tr>
+<td>localtimestamp</td>
+<td>timestamp</td>
+</tr>
+<tr>
+<td>now()</td>
+<td>timestamp with time zone</td>
+</tr>
+<tr>
+<td>timeofday()</td>
+<td>text</td>
+</tr>
+</tbody></table>
+
+<h3 id="data-type-formatting-functions">Data Type Formatting Functions</h3>
+
+<p>The following table provides the data type formatting functions that you can
+use in your Drill queries:</p>
+
+<table><thead>
+<tr>
+<th><strong>Function</strong></th>
+<th><strong>Return Type</strong></th>
+</tr>
+</thead><tbody>
+<tr>
+<td>to_char(timestamp, text)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>to_char(int, text)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>to_char(double precision, text)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>to_char(numeric, text)</td>
+<td>text</td>
+</tr>
+<tr>
+<td>to_date(text, text)</td>
+<td>date</td>
+</tr>
+<tr>
+<td>to_number(text, text)</td>
+<td>numeric</td>
+</tr>
+<tr>
+<td>to_timestamp(text, text)</td>
+<td>timestamp with time zone</td>
+</tr>
+<tr>
+<td>to_timestamp(double precision)</td>
+<td>timestamp with time zone</td>
+</tr>
+</tbody></table>
+
+<h2 id="aggregate-functions">Aggregate Functions</h2>
+
+<p>The following table provides the aggregate functions that you can use in your
+Drill queries:</p>
+
+<table><thead>
+<tr>
+<th><strong>Function</strong></th>
+<th><strong>Argument Type</strong></th>
+<th><strong>Return Type</strong></th>
+</tr>
+</thead><tbody>
+<tr>
+<td>avg(expression)</td>
+<td>smallint, int, bigint, real, double precision, numeric, or interval</td>
+<td>numeric for any integer-type argument, double precision for a floating-point argument, otherwise the same as the argument data type</td>
+</tr>
+<tr>
+<td>count(*)</td>
+<td><em>-</em></td>
+<td>bigint</td>
+</tr>
+<tr>
+<td>count([DISTINCT] expression)</td>
+<td>any</td>
+<td>bigint</td>
+</tr>
+<tr>
+<td>max(expression)</td>
+<td>any array, numeric, string, or date/time type</td>
+<td>same as argument type</td>
+</tr>
+<tr>
+<td>min(expression)</td>
+<td>any array, numeric, string, or date/time type</td>
+<td>same as argument type</td>
+</tr>
+<tr>
+<td>sum(expression)</td>
+<td>smallint, int, bigint, real, double precision, numeric, or interval</td>
+<td>bigint for smallint or int arguments, numeric for bigint arguments, double precision for floating-point arguments, otherwise the same as the argument data type</td>
+</tr>
+</tbody></table>
+
+<h2 id="aggregate-statistics-functions">Aggregate Statistics Functions</h2>
+
+<p>The following table provides the aggregate statistics functions that you can use in your Drill queries:</p>
+
+<table><thead>
+<tr>
+<th><strong>Function</strong></th>
+<th><strong>Argument Type</strong></th>
+<th><strong>Return Type</strong></th>
+</tr>
+</thead><tbody>
+<tr>
+<td>stddev(expression)</td>
+<td>smallint, int, bigint, real, double precision, or numeric</td>
+<td>double precision for floating-point arguments, otherwise numeric</td>
+</tr>
+<tr>
+<td>stddev_pop(expression)</td>
+<td>smallint, int, bigint, real, double precision, or numeric</td>
+<td>double precision for floating-point arguments, otherwise numeric</td>
+</tr>
+<tr>
+<td>stddev_samp(expression)</td>
+<td>smallint, int, bigint, real, double precision, or numeric</td>
+<td>double precision for floating-point arguments, otherwise numeric</td>
+</tr>
+<tr>
+<td>variance(expression)</td>
+<td>smallint, int, bigint, real, double precision, or numeric</td>
+<td>double precision for floating-point arguments, otherwise numeric</td>
+</tr>
+<tr>
+<td>var_pop(expression)</td>
+<td>smallint, int, bigint, real, double precision, or numeric</td>
+<td>double precision for floating-point arguments, otherwise numeric</td>
+</tr>
+<tr>
+<td>var_samp(expression)</td>
+<td>smallint, int, bigint, real, double precision, or numeric</td>
+<td>double precision for floating-point arguments, otherwise numeric</td>
+</tr>
+</tbody></table>
+
+<h2 id="convert-functions">Convert Functions</h2>
+
+<p>You can use the CONVERT_TO and CONVERT_FROM functions to encode and decode
+data when you query your data sources with Drill. For example, HBase stores
+data as encoded byte arrays (VARBINARY data). When you issue a query with the
+CONVERT_FROM function on HBase, Drill decodes the data and converts it to the
+specified data type. In instances where Drill sends data back to HBase during
+a query, you can use the CONVERT_TO function to change the data type to bytes.</p>
+
+<p>Although you can achieve the same results by using the CAST function for some
+data types (such as VARBINARY to VARCHAR conversions), in general it is more
+efficient to use CONVERT functions when your data sources return binary data.
+When your data sources return more conventional data types, you can use the
+CAST function.</p>
+
+<p>The following table provides the data types that you use with the CONVERT_TO
+and CONVERT_FROM functions:</p>
+
+<table><thead>
+<tr>
+<th><strong>Type</strong></th>
+<th><strong>Input Type</strong></th>
+<th><strong>Output Type</strong></th>
+</tr>
+</thead><tbody>
+<tr>
+<td>BOOLEAN_BYTE</td>
+<td>bytes(1)</td>
+<td>boolean</td>
+</tr>
+<tr>
+<td>TINYINT_BE</td>
+<td>bytes(1)</td>
+<td>tinyint</td>
+</tr>
+<tr>
+<td>TINYINT</td>
+<td>bytes(1)</td>
+<td>tinyint</td>
+</tr>
+<tr>
+<td>SMALLINT_BE</td>
+<td>bytes(2)</td>
+<td>smallint</td>
+</tr>
+<tr>
+<td>SMALLINT</td>
+<td>bytes(2)</td>
+<td>smallint</td>
+</tr>
+<tr>
+<td>INT_BE</td>
+<td>bytes(4)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>INT</td>
+<td>bytes(4)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>BIGINT_BE</td>
+<td>bytes(8)</td>
+<td>bigint</td>
+</tr>
+<tr>
+<td>BIGINT</td>
+<td>bytes(8)</td>
+<td>bigint</td>
+</tr>
+<tr>
+<td>FLOAT</td>
+<td>bytes(4)</td>
+<td>float (float4)</td>
+</tr>
+<tr>
+<td>DOUBLE</td>
+<td>bytes(8)</td>
+<td>double (float8)</td>
+</tr>
+<tr>
+<td>INT_HADOOPV</td>
+<td>bytes(1-9)</td>
+<td>int</td>
+</tr>
+<tr>
+<td>BIGINT_HADOOPV</td>
+<td>bytes(1-9)</td>
+<td>bigint</td>
+</tr>
+<tr>
+<td>DATE_EPOCH_BE</td>
+<td>bytes(8)</td>
+<td>date</td>
+</tr>
+<tr>
+<td>DATE_EPOCH</td>
+<td>bytes(8)</td>
+<td>date</td>
+</tr>
+<tr>
+<td>TIME_EPOCH_BE</td>
+<td>bytes(8)</td>
+<td>time</td>
+</tr>
+<tr>
+<td>TIME_EPOCH</td>
+<td>bytes(8)</td>
+<td>time</td>
+</tr>
+<tr>
+<td>UTF8</td>
+<td>bytes</td>
+<td>varchar</td>
+</tr>
+<tr>
+<td>UTF16</td>
+<td>bytes</td>
+<td>var16char</td>
+</tr>
+<tr>
+<td>UINT8</td>
+<td>bytes(8)</td>
+<td>uint8</td>
+</tr>
+</tbody></table>
+
+<p>A common use case for CONVERT_FROM is when a data source embeds complex data
+inside a column. For example, you may have an HBase or MapR-DB table with
+embedded JSON data:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">select CONVERT_FROM(col1, &#39;JSON&#39;) 
+FROM hbase.table1
+...
+</code></pre></div>
+<h2 id="nested-data-functions">Nested Data Functions</h2>
+
+<p>This section contains descriptions of SQL functions that you can use to
+analyze nested data:</p>
+
+<ul>
+<li><a href="/confluence/display/DRILL/FLATTEN+Function">FLATTEN Function</a></li>
+<li><a href="/confluence/display/DRILL/KVGEN+Function">KVGEN Function</a></li>
+<li><a href="/confluence/display/DRILL/REPEATED_COUNT+Function">REPEATED_COUNT Function</a></li>
+</ul>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/start-up-options/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/start-up-options/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/start-up-options/index.html (added)
+++ drill/site/trunk/content/drill/docs/start-up-options/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,134 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Start-Up Options - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Start-Up Options</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Drill’s start-up options reside in a HOCON configuration file format, which is
+a hybrid between a properties file and a JSON file. Drill start-up options
+consist of a group of files with a nested relationship. At the core of the
+file hierarchy is <code>drill-default.conf</code>. This file is overridden by one or more
+<code>drill-module.conf</code> files, which are overridden by the <code>drill-override.conf</code>
+file that you define.</p>
+
+<p>You can see the following group of files throughout the source repository in
+Drill:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">common/src/main/resources/drill-default.conf
+common/src/main/resources/drill-module.conf
+contrib/storage-hbase/src/main/resources/drill-module.conf
+contrib/storage-hive/core/src/main/resources/drill-module.conf
+contrib/storage-hive/hive-exec-shade/src/main/resources/drill-module.conf
+exec/java-exec/src/main/resources/drill-module.conf
+distribution/src/resources/drill-override.conf
+</code></pre></div>
+<p>These files are listed inside the associated JAR files in the Drill
+distribution tarball.</p>
+
+<p>Each Drill module has a set of options that Drill incorporates. Drill’s
+modular design enables you to create new storage plugins, set new operators,
+or create UDFs. You can also include additional configuration options that you
+can override as necessary.</p>
+
+<p>When you add a JAR file to Drill, you must include a <code>drill-module.conf</code> file
+in the root directory of the JAR file that you add. The <code>drill-module.conf</code>
+file tells Drill to scan that JAR file or associated object and include it.</p>
+
+<h4 id="viewing-startup-options">Viewing Startup Options</h4>
+
+<p>You can run the following query to see a list of Drill’s startup options:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT * FROM sys.options WHERE type=&#39;BOOT&#39;
+</code></pre></div>
+<h4 id="configuring-start-up-options">Configuring Start-Up Options</h4>
+
+<p>You can configure start-up options for each Drillbit in the <code>drill-
+override.conf</code> file located in Drill’s<code>/conf</code> directory.</p>
+
+<p>You may want to configure the following start-up options that control certain
+behaviors in Drill:</p>
+
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Option</th><th class="confluenceTh">Default Value</th><th class="confluenceTh">Description</th></tr><tr><td valign="top" class="confluenceTd"><p>drill.exec.sys.store.provider</p></td><td valign="top" class="confluenceTd"><p>ZooKeeper</p></td><td valign="top" class="confluenceTd"><p>Defines the persistent storage (PStore) provider. The PStore holds configuration and profile data. For more information about PStores, see <a href="https://cwiki.apache.org/confluence/display/DRILL/Persistent+Configuration+Storage" rel="nofollow">Persistent Configuration Storage</a>.</p></td></tr><tr><td valign="top" class="confluenceTd"><p>drill.exec.buffer.size</p></td><td valign="top" class="confluenceTd"><p> </p></td><td valign="top" class="confluenceTd"><p>Defines the amount of memory available, in terms of record batches, to hold data on the downstream side of an operation. Drill pushes data downstream as quic
 kly as possible to make data immediately available. This requires Drill to use memory to hold the data pending operations. When data on a downstream operation is required, that data is immediately available so Drill does not have to go over the network to process it. Providing more memory to this option increases the speed at which Drill completes a query.</p></td></tr><tr><td valign="top" class="confluenceTd"><p>drill.exec.sort.external.directories</p><p>drill.exec.sort.external.fs</p></td><td valign="top" class="confluenceTd"><p> </p></td><td valign="top" class="confluenceTd"><p>These options control spooling. The drill.exec.sort.external.directories option tells Drill which directory to use when spooling. The drill.exec.sort.external.fs option tells Drill which file system to use when spooling beyond memory files. <span style="line-height: 1.4285715;background-color: transparent;"> </span></p><p>Drill uses a spool and sort operation for beyond memory operations. The sorting opera
 tion is designed to spool to a Hadoop file system. The default Hadoop file system is a local file system in the /tmp directory. Spooling performance (both writing and reading back from it) is constrained by the file system. <span style="line-height: 1.4285715;background-color: transparent;"> </span></p><p>For MapR clusters, use MapReduce volumes or set up local volumes to use for spooling purposes. Volumes improve performance and stripe data across as many disks as possible.</p></td></tr><tr><td valign="top" colspan="1" class="confluenceTd"><p>drill.exec.debug.error_on_leak</p></td><td valign="top" colspan="1" class="confluenceTd"><p>True</p></td><td valign="top" colspan="1" class="confluenceTd"><p>Determines how Drill behaves when memory leaks occur during a query. By default, this option is enabled so that queries fail when memory leaks occur. If you disable the option, Drill issues a warning when a memory leak occurs and completes the query.</p></td></tr><tr><td valign="top" cols
 pan="1" class="confluenceTd"><p>drill.exec.zk.connect</p></td><td valign="top" colspan="1" class="confluenceTd"><p>localhost:2181</p></td><td valign="top" colspan="1" class="confluenceTd"><p>Provides Drill with the ZooKeeper quorum to use to connect to data sources. Change this setting to point to the ZooKeeper quorum that you want Drill to use. You must configure this option on each Drillbit node.</p></td></tr><tr><td valign="top" colspan="1" class="confluenceTd"><p>drill.exec.cluster-id</p></td><td valign="top" colspan="1" class="confluenceTd"><p>my_drillbit_cluster</p></td><td valign="top" colspan="1" class="confluenceTd"><p>Identifies the cluster that corresponds with the ZooKeeper quorum indicated. It also provides Drill with the name of the cluster used during UDP multicast. You must change the default cluster-id if there are multiple clusters on the same subnet. If you do not change the ID, the clusters will try to connect to each other to create one cluster.</p></td></tr></t
 body></table></div>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/starting-stopping-drill/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/starting-stopping-drill/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/starting-stopping-drill/index.html (added)
+++ drill/site/trunk/content/drill/docs/starting-stopping-drill/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,132 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Starting/Stopping Drill - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Starting/Stopping Drill</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>How you start Drill depends on the installation method you followed. If you
+installed Drill in embedded mode, invoking SQLLine automatically starts a
+Drillbit locally. If you installed Drill in distributed mode on one or
+multiple nodes in a cluster, you must start the Drillbit service and then
+invoke SQLLine. Once SQLLine starts, you can issue queries to Drill.</p>
+
+<h3 id="starting-a-drillbit">Starting a Drillbit</h3>
+
+<p>If you installed Drill in embedded mode, you do not need to start the
+Drillbit.</p>
+
+<p>To start a Drillbit, navigate to the Drill installation directory, and issue
+the following command:</p>
+
+<p><code>bin/drillbit.sh restart</code></p>
+
+<h3 id="invoking-sqlline/connecting-to-a-schema">Invoking SQLLine/Connecting to a Schema</h3>
+
+<p>SQLLine is used as the Drill shell. SQLLine connects to relational databases
+and executes SQL commands. You invoke SQLLine for Drill in embedded or
+distributed mode. If you want to connect directly to a particular schema, you
+can indicate the schema name when you invoke SQLLine.</p>
+
+<p>To start SQLLine, issue the appropriate command for your Drill installation
+type:</p>
+
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd"><p><strong>Drill Install Type</strong></p></td><td class="confluenceTd"><p><strong>Example</strong></p></td><td class="confluenceTd"><p><strong>Command</strong></p></td></tr><tr><td class="confluenceTd"><p>Embedded</p></td><td class="confluenceTd"><p>Drill installed locally (embedded mode);</p><p>Hive with embedded metastore</p></td><td class="confluenceTd"><p>To connect without specifying a schema, navigate to the Drill installation directory and issue the following command:</p><p><code>$ bin/sqlline -u jdbc:drill:zk=local -n admin -p admin </code><span> </span></p><p>Once you are in the prompt, you can issue<code> USE &lt;schema&gt; </code>or you can use absolute notation: <code>schema.table.column.</code></p><p>To connect to a schema directly, issue the command with the schema name:</p><p><code>$ bin/sqlline -u jdbc:drill:schema=&lt;database&gt;;zk=local -n admin -p admin</code></p></td></t
 r><tr><td class="confluenceTd"><p>Distributed</p></td><td class="confluenceTd"><p>Drill installed in distributed mode;</p><p>Hive with remote metastore;</p><p>HBase</p></td><td class="confluenceTd"><p>To connect without specifying a schema, navigate to the Drill installation directory and issue the following command:</p><p><code>$ bin/sqlline -u jdbc:drill:zk=&lt;zk1host&gt;:&lt;port&gt;,&lt;zk2host&gt;:&lt;port&gt;,&lt;zk3host&gt;:&lt;port&gt; -n admin -p admin</code></p><p>Once you are in the prompt, you can issue<code> USE &lt;schema&gt; </code>or you can use absolute notation: <code>schema.table.column.</code></p><p>To connect to a schema directly, issue the command with the schema name:</p><p><code>$ bin/sqlline -u jdbc:drill:schema=&lt;database&gt;;zk=&lt;zk1host&gt;:&lt;port&gt;,&lt;zk2host&gt;:&lt;port&gt;,&lt;zk3host&gt;:&lt;port&gt; -n admin -p admin</code></p></td></tr></tbody></table></div>
+  
+
+<p>When SQLLine starts, the system displays the following prompt:</p>
+
+<p><code>0: [jdbc:drill](http://jdbcdrill):schema=&lt;database&gt;;zk=&lt;zkhost&gt;:&lt;port&gt;&gt;</code></p>
+
+<p>At this point, you can use Drill to query your data source or you can discover
+metadata.</p>
+
+<h3 id="exiting-sqlline">Exiting SQLLine</h3>
+
+<p>To exit SQLLine, issue the following command:</p>
+
+<p><code>!quit</code>  </p>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/storage-plugin-registration/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/storage-plugin-registration/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/storage-plugin-registration/index.html (added)
+++ drill/site/trunk/content/drill/docs/storage-plugin-registration/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Storage Plugin Registration - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Storage Plugin Registration</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>You can connect Drill to a file system, Hive, or HBase data source. To connect
+Drill to a data source, you must register the data source as a storage plugin
+instance in the Drill Web UI. You register an instance of a data source as a
+<code>file</code>, <code>hive</code>, or <code>hbase</code> storage plugin type. You can register multiple
+storage plugin instances for each storage plugin type.</p>
+
+<p>Each node with a Drillbit installed has a running browser that provides access
+to the Drill Web UI at <code>http://localhost:8047/</code>. The Drill Web UI includes
+<code>cp</code>, <code>dfs</code>, <code>hive</code>, and <code>hbase</code> storage plugin instances by default, though
+the <code>hive</code> and <code>hbase</code> instances are disabled. You can update the <code>hive</code> and
+<code>hbase</code> instances with configuration details and then enable them.</p>
+
+<p>The <code>cp</code> instance points to a JAR file in Drill’s classpath that contains
+sample data that you can query. By default, the <code>dfs</code> instance points to the
+local file system on your machine, but you can configure this instance to
+point to any distributed file system, such as a Hadoop or S3 file system.</p>
+
+<p>When you add or update storage plugin instances on one Drill node in a Drill
+cluster, Drill broadcasts the information to all of the other Drill nodes so
+they all have identical storage plugin configurations. You do not need to
+restart any of the Drillbits when you add or update a storage plugin instance.</p>
+
+<p>Each storage plugin instance that you register with Drill must have a distinct
+name. For example, if you register two storage plugin instances for a Hadoop
+file system, you might name one storage plugin instance <code>hdfstest</code> and the
+other instance <code>hdfsproduction</code>.</p>
+
+<p>The following example shows an HDFS data source registered in the Drill Web UI
+as a storage plugin instance of plugin type &quot;<code>file&quot;</code>:</p>
+
+<p><img src="../../img/StoragePluginConfig.png" alt=""></p>
+
+<p>Click the following link to learn about workspaces:</p>
+
+<ul>
+<li><a href="/confluence/display/DRILL/Workspaces">Workspaces</a></li>
+</ul>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/summary/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/summary/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/summary/index.html (added)
+++ drill/site/trunk/content/drill/docs/summary/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Summary - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Summary</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>This tutorial introduced Apache Drill and its ability to run ANSI SQL queries
+against various data sources, including Hive tables, MapR-DB/HBase tables, and
+file system directories. The tutorial also showed how to work with and
+manipulate complex and multi-structured data commonly found in Hadoop/NoSQL
+systems.</p>
+
+<p>Now that you are familiar with different ways to access the sample data with
+Drill, you can try writing your own queries against your own data sources.
+Refer to the <a href="https://cwiki.apache.org/confluence/%0Adisplay/DRILL/Apache+Drill+Wiki">Apache Drill documentation</a> for more information.</p>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/supported-date-time-data-type-formats/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/supported-date-time-data-type-formats/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/supported-date-time-data-type-formats/index.html (added)
+++ drill/site/trunk/content/drill/docs/supported-date-time-data-type-formats/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,234 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Supported Date/Time Data Type Formats - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Supported Date/Time Data Type Formats</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>You must use supported <code>date</code> and <code>time</code> formats when you <code>SELECT</code> date and
+time literals or when you <code>CAST()</code> from <code>VARCHAR</code>to <code>date</code> and <code>time</code> data
+types. Apache Drill currently supports specific formats for the following
+<code>date</code> and <code>time</code> data types:</p>
+
+<ul>
+<li>Date</li>
+<li>Timestamp</li>
+<li>Time</li>
+<li>Interval
+
+<ul>
+<li>Interval Year</li>
+<li>Interval Day</li>
+</ul></li>
+<li>Literal</li>
+</ul>
+
+<p>The following query provides an example of how to <code>SELECT</code> a few of the
+supported date and time formats as literals:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">select date &#39;2008-2-23&#39;, timestamp &#39;2008-1-23 14:24:23&#39;, time &#39;10:20:30&#39; from dfs.`/tmp/input.json`;
+</code></pre></div>
+<p>The following query provides an example where <code>VARCHAR</code> data in a file is
+<code>CAST()</code> to supported <code>date</code>and <code>time</code> formats:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">select cast(col_A as date), cast(col_B as timestamp), cast(col_C as time) from dfs.`/tmp/dates.json`;
+</code></pre></div>
+<p><code>Date</code>, t<code>imestamp</code>, and<code>time</code> data types store values in <code>UTC</code>. Currently,
+Apache Drill does not support <code>timestamp</code> with time zone.</p>
+
+<h2 id="date">Date</h2>
+
+<p>Drill supports the <code>date</code> data type in the following format:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">YYYY-MM-DD (year-month-date)
+</code></pre></div>
+<p>The following table provides some examples for the <code>date</code> data type:</p>
+
+<p>| Use | Example |
+  | --- | ------- |
+  |Literal| <code>select date ‘2008-2-23’ from dfs.</code>/tmp/input.json<code>;</code>|
+  |<code>JSON</code> input | <code>{&quot;date_col&quot; : &quot;2008-2-23&quot;} 
+  |</code>CAST<code>from</code>VARCHAR<code>|</code><code>select CAST(date_col as date) as CAST_DATE from dfs.</code>/tmp/input.json<code>;</code>`|</p>
+
+<h2 id="timestamp">Timestamp</h2>
+
+<p>Drill supports the <code>timestamp</code> data type in the following format:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">yyyy-MM-dd HH:mm:ss.SSS (year-month-date hour:minute:sec.milliseconds)
+</code></pre></div>
+<p>The following table provides some examples for the <code>timestamp</code> data type:</p>
+
+<table>
+ <tbody>
+  <tr>
+   <th>Use</th>
+   <th>CAST Example</th>
+  </tr>
+  <tr>
+   <td valign="top">Literal</td>
+   <td valign="top"><code><span style="color: rgb(0,0,0);">select timestamp ‘2008-2-23 10:20:30.345’, timestamp ‘2008-2-23 10:20:30’ from dfs.`/tmp/input.json`;</span></code>
+   </td></tr>
+  <tr>
+   <td colspan="1" valign="top"><code>JSON</code> Input</td>
+   <td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">{“timestamp_col”: “2008-2-23 15:20:30.345”}<br /></span><span style="color: rgb(0,0,0);">{“timestamp_col”: “2008-2-23 10:20:30”}</span></code><span style="color: rgb(0,0,0);">The fractional millisecond component is optional.</span></td>
+   </tr>
+   <tr>
+    <td colspan="1" valign="top"><code>CAST</code> from <code>VARCHAR</code></td>
+    <td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select cast(timestamp_col as timestamp) from dfs.`/tmp/input.json`; </span></code></td>
+   </tr>
+  </tbody>
+ </table>
+  
+## Time
+
+Drill supports the `time` data type in the following format:
+
+    HH:mm:ss.SSS (hour:minute:sec.milliseconds)
+
+The following table provides some examples for the` time` data type:
+
+<table><tbody><tr>
+  <th>Use</th>
+  <th>Example</th>
+  </tr>
+  <tr>
+   <td valign="top">Literal</td>
+   <td valign="top"><code><span style="color: rgb(0,0,0);">select time ‘15:20:30’, time ‘10:20:30.123’ from dfs.`/tmp/input.json`;</span></code></td>
+  </tr>
+  <tr>
+  <td colspan="1" valign="top"><code>JSON</code> Input</td>
+  <td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">{“time_col” : “10:20:30.999”}<br /></span><span style="color: rgb(0,0,0);">{“time_col”: “10:20:30”}</span></code></td>
+ </tr>
+ <tr>
+  <td colspan="1" valign="top"><code>CAST</code> from <code>VARCHAR</code></td>
+  <td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select cast(time_col as time) from dfs.`/tmp/input.json`;</span></code></td>
+</tr></tbody>
+</table>
+  
+
+<h2 id="interval">Interval</h2>
+
+<p>Drill supports the <code>interval year</code> and <code>interval day</code> data types.</p>
+
+<h3 id="interval-year">Interval Year</h3>
+
+<p>The <code>interval year</code> data type stores time duration in years and months. Drill
+supports the <code>interval</code> data type in the following format:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">P [qty] Y [qty] M
+</code></pre></div>
+<p>The following table provides examples for <code>interval year</code>data type:</p>
+
+<table ><tbody><tr>
+<th>Use</th>
+<th>Example</th></tr>
+  <tr>
+    <td valign="top">Literals</td>
+    <td valign="top"><code><span style="color: rgb(0,0,0);">select interval ‘1-2’ year to month from dfs.`/tmp/input.json`;<br /></span><span style="color: rgb(0,0,0);">select interval ‘1’ year from dfs.`/tmp/input.json`;<br /></span><span style="color: rgb(0,0,0);">select interval '13’ month from dfs.`/tmp/input.json`;</span></code></td></tr><tr>
+    <td colspan="1" valign="top"><code>JSON</code> Input</td>
+    <td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">{“col” : “P1Y2M”}<br /></span><span style="color: rgb(0,0,0);">{“col” : “P-1Y2M”}<br /></span><span style="color: rgb(0,0,0);">{“col” : “P-1Y-2M”}<br /></span><span style="color: rgb(0,0,0);">{“col”: “P10M”}<br /></span><span style="color: rgb(0,0,0);">{“col”: “P5Y”}</span></code></td>
+  </tr>
+  <tr>
+    <td colspan="1" valign="top"><code>CAST</code> from <code>VARCHAR</code></td>
+    <td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select cast(col as interval year) from dfs.`/tmp/input.json`;</span></code></td>
+  </tr>
+  </tbody></table> 
+  
+
+<h3 id="interval-day">Interval Day</h3>
+
+<p>The <code>interval day</code> data type stores time duration in days, hours, minutes, and
+seconds. You do not need to specify all fields in a given interval. Drill
+supports the <code>interval day</code> data type in the following format:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">P [qty] D T [qty] H [qty] M [qty] S
+</code></pre></div>
+<p>The following table provides examples for <code>interval day</code> data type:</p>
+
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Use</th><th class="confluenceTh">Example</th></tr><tr><td valign="top">Literal</td><td valign="top"><code><span style="color: rgb(0,0,0);">select interval '1 10:20:30.123' day to second from dfs.`/tmp/input.json`;<br /></span><span style="color: rgb(0,0,0);">select interval '1 10' day to hour from dfs.`/tmp/input.json`;<br /></span><span style="color: rgb(0,0,0);">select interval '10' day  from dfs.`/tmp/input.json`;<br /></span><span style="color: rgb(0,0,0);">select interval '10' hour  from dfs.`/tmp/input.json`;</span></code><code><span style="color: rgb(0,0,0);">select interval '10.999' second  from dfs.`/tmp/input.json`;</span></code></td></tr><tr><td colspan="1" valign="top"><code>JSON</code> Input</td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;P1DT10H20M30S&quot;}<br /></span><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;P1DT
 10H20M30.123S&quot;}<br /></span><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;P1D&quot;}<br /></span><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;PT10H&quot;}<br /></span><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;PT10.10S&quot;}<br /></span><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;PT20S&quot;}<br /></span><span style="color: rgb(0,0,0);">{&quot;col&quot; : &quot;PT10H10S&quot;}</span></code></td></tr><tr><td colspan="1" valign="top"><code>CAST</code> from <code>VARCHAR</code></td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select cast(col as interval day) from dfs.`/tmp/input.json`;</span></code></td></tr></tbody></table></div> 
+  
+
+<h2 id="literal">Literal</h2>
+
+<p>The following table provides a list of<code>date/time</code> literals that Drill
+supports with examples of each:</p>
+
+<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Format</th><th colspan="1" class="confluenceTh">Interpretation</th><th class="confluenceTh">Example</th></tr><tr><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">interval '1 10:20:30.123' day to second</span></code></td><td colspan="1" valign="top"><code>1 day, 10 hours, 20 minutes, 30 seconds, and 123 thousandths of a second</code></td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select interval '1 10:20:30.123' day to second from dfs.`/tmp/input.json`;</span></code></td></tr><tr><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">interval '1 10' day to hour</span></code></td><td colspan="1" valign="top"><code>1 day 10 hours</code></td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select interval '1 10' day to hour from dfs.`/tmp/input.json`;</span></code></td></tr><tr><td colspan="1" valign="top"><code><span styl
 e="color: rgb(0,0,0);">interval '10' day</span></code></td><td colspan="1" valign="top"><code>10 days</code></td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select interval '10' day from dfs.`/tmp/input.json`;</span></code></td></tr><tr><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">interval '10' hour</span></code></td><td colspan="1" valign="top"><code>10 hours</code></td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select interval '10' hour from dfs.`/tmp/input.json`;</span></code></td></tr><tr><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">interval '10.999' second</span></code></td><td colspan="1" valign="top"><code>10.999 seconds</code></td><td colspan="1" valign="top"><code><span style="color: rgb(0,0,0);">select interval '10.999' second from dfs.`/tmp/input.json`; </span></code></td></tr></tbody></table></div>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/useful-research/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/useful-research/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/useful-research/index.html (added)
+++ drill/site/trunk/content/drill/docs/useful-research/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Useful Research - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Useful Research</h1>
+
+</div>
+
+<div class="int_text" align="left"><h2 id="drill-itself">Drill itself</h2>
+
+<ul>
+<li>Apache Proposal: <a href="http://wiki.apache.org/incubator/DrillProposal">http://wiki.apache.org/incubator/DrillProposal</a></li>
+<li>Mailing List Archive: <a href="http://mail-archives.apache.org/mod_mbox/incubator-drill-dev/">http://mail-archives.apache.org/mod_mbox/incubator-drill-dev/</a></li>
+<li>DrQL ANTLR grammar: <a href="https://gist.github.com/3483314">https://gist.github.com/3483314</a></li>
+<li>Apache Drill, Architecture outlines: <a href="http://www.slideshare.net/jasonfrantz/drill-architecture-20120913">http://www.slideshare.net/jasonfrantz/drill-architecture-20120913</a></li>
+</ul>
+
+<h2 id="background-info">Background info</h2>
+
+<ul>
+<li>Dremel Paper: <a href="http://research.google.com/pubs/pub36632.html">http://research.google.com/pubs/pub36632.html</a></li>
+<li>Dremel Presentation: <a href="http://www.slideshare.net/robertlz/dremel-interactive-analysis-of-webscale-datasets">http://www.slideshare.net/robertlz/dremel-interactive-analysis-of-webscale-datasets</a></li>
+<li>Query Language: <a href="http://developers.google.com/bigquery/docs/query-reference">http://developers.google.com/bigquery/docs/query-reference</a></li>
+<li>Protobuf: <a href="http://developers.google.com/protocol-buffers/docs/proto">http://developers.google.com/protocol-buffers/docs/proto</a></li>
+<li>Dryad: <a href="http://research.microsoft.com/en-us/projects/dryad/">http://research.microsoft.com/en-us/projects/dryad/</a></li>
+<li>SQLServer Query Plan: <a href="http://msdn.microsoft.com/en-us/library/ms191158.aspx">http://msdn.microsoft.com/en-us/library/ms191158.aspx</a></li>
+<li>CStore: <a href="http://db.csail.mit.edu/projects/cstore/">http://db.csail.mit.edu/projects/cstore/</a></li>
+<li>Vertica (commercial evolution of C-Store): <a href="http://vldb.org/pvldb/vol5/p1790_andrewlamb_vldb2012.pdf">http://vldb.org/pvldb/vol5/p1790_andrewlamb_vldb2012.pdf</a></li>
+<li><a href="http://pdf.aminer.org/000/094/728/database_cracking.pdf">http://pdf.aminer.org/000/094/728/database_cracking.pdf</a></li>
+<li><a href="http://homepages.cwi.nl/%7Eidreos/NoDBsigmod2012.pdf">http://homepages.cwi.nl/~idreos/NoDBsigmod2012.pdf</a></li>
+<li><a href="http://db.csail.mit.edu/projects/cstore/abadiicde2007.pdf">http://db.csail.mit.edu/projects/cstore/abadiicde2007.pdf</a></li>
+<li>Hive Architecture: <a href="https://cwiki.apache.org/confluence/display/Hive/Design#Design-HiveArchitecture">https://cwiki.apache.org/confluence/display/Hive/Design#Design-HiveArchitecture</a></li>
+<li>Fast Response in an unreliable world: <a href="http://research.google.com/people/jeff/latency.html">http://research.google.com/people/jeff/latency.html</a></li>
+<li>Column-Oriented Database Systems: <a href="http://www.vldb.org/pvldb/2/vldb09-tutorial6.pdf">http://www.vldb.org/pvldb/2/vldb09-tutorial6.pdf</a> (SLIDES: <a href="http://phdopen.mimuw.edu.pl/lato10/boncz_mimuw.pdf">http://phdopen.mimuw.edu.pl/lato10/boncz_mimuw.pdf</a>)</li>
+</ul>
+
+<h2 id="opendremel">OpenDremel</h2>
+
+<ul>
+<li>OpenDremel site: <a href="http://code.google.com/p/dremel/">http://code.google.com/p/dremel/</a></li>
+<li>Design Proposal for Drill: <a href="http://www.slideshare.net/CamuelGilyadov/apache-drill-14071739">http://www.slideshare.net/CamuelGilyadov/apache-drill-14071739</a></li>
+</ul>
+
+<h2 id="dazo-(second-generation-opendremel)">Dazo (second generation OpenDremel)</h2>
+
+<ul>
+<li>Dazo repos: <a href="https://github.com/Dazo-org">https://github.com/Dazo-org</a></li>
+<li>ZeroVM (multi-tenant executor): <a href="http://zerovm.org/">http://zerovm.org/</a></li>
+<li>ZeroVM elaboration: <a href="http://news.ycombinator.com/item?id=3746222">http://news.ycombinator.com/item?id=3746222</a></li>
+</ul>
+
+<h2 id="rob-grzywinski-dremel-adventures">Rob Grzywinski Dremel adventures</h2>
+
+<ul>
+<li><a href="https://github.com/rgrzywinski/field-stripe/">https://github.com/rgrzywinski/field-stripe/</a></li>
+</ul>
+
+<h2 id="code-generation-/-physical-plan-generation">Code generation / Physical plan generation</h2>
+
+<ul>
+<li><a href="http://www.vldb.org/pvldb/vol4/p539-neumann.pdf">http://www.vldb.org/pvldb/vol4/p539-neumann.pdf</a> (SLIDES: <a href="http://www.vldb.org/2011/files/slides/research9/rSession9-3.pdf">http://www.vldb.org/2011/files/slides/research9/rSession9-3.pdf</a>)</li>
+<li><a href="http://www.vldb.org/pvldb/2/vldb09-327.pdf">http://www.vldb.org/pvldb/2/vldb09-327.pdf</a> (SLIDES: <a href="http://www.slideserve.com/cher/simd-scan-ultra-fast-in-memory-table-scan-using-on-chip-vector-processing-units">http://www.slideserve.com/cher/simd-scan-ultra-fast-in-memory-table-scan-using-on-chip-vector-processing-units</a>)</li>
+</ul>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/using-custom-functions-in-queries/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/using-custom-functions-in-queries/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/using-custom-functions-in-queries/index.html (added)
+++ drill/site/trunk/content/drill/docs/using-custom-functions-in-queries/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Using Custom Functions in Queries - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Using Custom Functions in Queries</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>When you issue a query with a custom function to Drill, Drill searches the
+classpath for the function that matches the request in the query. Once Drill
+locates the function for the request, Drill processes the query and applies
+the function during processing.</p>
+
+<p>Your Drill installation includes sample files in the Drill classpath. One
+sample file, <code>employee.json</code>, contains some fictitious employee data that you
+can query with a custom function.</p>
+
+<h2 id="simple-function-example">Simple Function Example</h2>
+
+<p>This example uses the <code>myaddints</code> simple function in a query on the
+<code>employee.json</code> file.</p>
+
+<p>If you issue the following query to Drill, you can see all of the employee
+data within the <code>employee.json</code> file:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=local&gt; SELECT * FROM cp.`employee.json`;
+</code></pre></div>
+<p>The query returns the following results:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">| employee_id | full_name    | first_name | last_name  | position_id | position_title          |  store_id  | department_id | birth_da |
++-------------+------------+------------+------------+-------------+----------------+------------+---------------+----------+-----------
+| 1101        | Steve Eurich | Steve      | Eurich     | 16          | Store Temporary Checker | 12         | 16            |
+| 1102        | Mary Pierson | Mary       | Pierson    | 16          | Store Temporary Checker | 12         | 16            |
+| 1103        | Leo Jones    | Leo        | Jones      | 16          | Store Temporary Checker | 12         | 16            |
+…
+</code></pre></div>
+<p>Since the <code>postion_id</code> and <code>store_id</code> columns contain integers, you can issue
+a query with the <code>myaddints</code> custom function on these columns to add the
+integers in the columns.</p>
+
+<p>The following query tells Drill to apply the <code>myaddints</code> function to the
+<code>position_id</code> and <code>store_id</code> columns in the <code>employee.json</code> file:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=local&gt; SELECT myaddints(CAST(position_id AS int),CAST(store_id AS int)) FROM cp.`employee.json`;
+</code></pre></div>
+<p>Since JSON files do not store information about data types, you must apply the
+<code>CAST</code> function in the query to tell Drill that the columns contain integer
+values.</p>
+
+<p>The query returns the following results:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+------------+
+|   EXPR$0   |
++------------+
+| 28         |
+| 28         |
+| 36         |
++------------+
+…
+</code></pre></div></div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>