Author: bridgetb
Date: Thu Mar 26 22:07:50 2015
New Revision: 1669458

URL: http://svn.apache.org/r1669458
Log:
DRILL-2505: doc math/trig functions

Added:
    drill/site/trunk/content/drill/docs/math-and-trig/
    drill/site/trunk/content/drill/docs/math-and-trig/index.html
    drill/site/trunk/content/drill/docs/repeated-contains-function/
    drill/site/trunk/content/drill/docs/repeated-contains-function/index.html
Modified:
    drill/site/trunk/content/drill/docs/data-types/index.html
    drill/site/trunk/content/drill/docs/date-time-and-timestamp/index.html
    drill/site/trunk/content/drill/docs/flatten-function/index.html
    drill/site/trunk/content/drill/docs/getting-started-tutorial/index.html
    drill/site/trunk/content/drill/docs/index.html
    drill/site/trunk/content/drill/docs/json-data-model/index.html
    drill/site/trunk/content/drill/docs/kvgen-function/index.html
    
drill/site/trunk/content/drill/docs/lession-2-run-queries-with-ansi-sql/index.html
    drill/site/trunk/content/drill/docs/repeated-count-function/index.html
    drill/site/trunk/content/drill/docs/sample-data-donuts/index.html
    drill/site/trunk/content/drill/docs/sql-extensions/index.html
    drill/site/trunk/content/drill/docs/sql-functions/index.html
    drill/site/trunk/content/drill/feed.xml

Modified: drill/site/trunk/content/drill/docs/data-types/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/data-types/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/data-types/index.html (original)
+++ drill/site/trunk/content/drill/docs/data-types/index.html Thu Mar 26 
22:07:50 2015
@@ -189,7 +189,7 @@ Implicitly casts all textual data to VAR
 
 <ul>
 <li>CAST<br>
-Casts textual data from one data type to another.</li>
+Casts data from one data type to another.</li>
 <li>CONVERT_TO and CONVERT_FROM<br>
 Converts data, including binary data, from one data type to another.</li>
 <li>TO_CHAR
@@ -204,7 +204,7 @@ Converts a string to TIMESTAMP.</li>
 
 <p>The following tables show data types that Drill can cast to/from other data 
types. Not all types are available for explicit casting in the current 
release.</p>
 
-<h3 id="explicit-type-casting:-numeric-and-character-types">Explicit type 
Casting: Numeric and Character types</h3>
+<h3 id="explicit-type-casting:-numeric-and-character-types">Explicit Type 
Casting: Numeric and Character types</h3>
 
 <table>
   <tr>
@@ -530,7 +530,7 @@ c_row | c_int
 <p>If the SELECT statement includes a WHERE clause that compares a column of 
an unknown data type, cast both the value of the column and the comparison 
value in the WHERE clause. For example:</p>
 <div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT c_row, CAST(c_int AS DECIMAL(28,8)) FROM mydata WHERE 
CAST(c_int AS CECIMAL(28,8)) &gt; -3.0
 </code></pre></div>
-<p>Although you can use CAST to handle binary data, CONVERT_TO and 
CONVERT_FROM are recommended for these conversions.</p>
+<p>Do not use CAST to handle binary data conversions. Use CONVERT_TO and 
CONVERT_FROM for these conversions.</p>
 
 <h3 id="using-convert_to-and-convert_from">Using CONVERT_TO and 
CONVERT_FROM</h3>
 

Modified: drill/site/trunk/content/drill/docs/date-time-and-timestamp/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/date-time-and-timestamp/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/date-time-and-timestamp/index.html 
(original)
+++ drill/site/trunk/content/drill/docs/date-time-and-timestamp/index.html Thu 
Mar 26 22:07:50 2015
@@ -80,30 +80,30 @@
 <li><code>date</code></li>
 <li><code>time</code></li>
 <li><p><code>timestamp</code></p>
-
-<p>SELECT date &#39;2010-2-15&#39; FROM 
dfs.<code>/Users/drilluser/apache-drill-0.8.0/dummy.json</code>;
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT date &#39;2010-2-15&#39; FROM 
dfs.`/Users/drilluser/apache-drill-0.8.0/dummy.json`;
 +------------+
 |   EXPR$0   |
 +------------+
 | 2010-02-15 |
 +------------+
-1 row selected (0.083 seconds)</p>
+1 row selected (0.083 seconds)
 
-<p>SELECT time &#39;15:20:30&#39; from 
dfs.<code>/Users/drilluser/apache-drill-0.8.0/dummy.json</code>;
+SELECT time &#39;15:20:30&#39; from 
dfs.`/Users/drilluser/apache-drill-0.8.0/dummy.json`;
 +------------+
 |   EXPR$0   |
 +------------+
 | 15:20:30   |
 +------------+
-1 row selected (0.067 seconds)</p>
+1 row selected (0.067 seconds)
 
-<p>SELECT timestamp &#39;2015-03-11 6:50:08&#39; FROM 
dfs.<code>/Users/drilluser/apache-drill-0.8.0/dummy.json</code>;
+SELECT timestamp &#39;2015-03-11 6:50:08&#39; FROM 
dfs.`/Users/drilluser/apache-drill-0.8.0/dummy.json`;
 +------------+
 |   EXPR$0   |
 +------------+
 | 2015-03-11 06:50:08.0 |
 +------------+
-1 row selected (0.071 seconds)</p></li>
+1 row selected (0.071 seconds)
+</code></pre></div></li>
 </ul>
 
 <h2 id="interval">INTERVAL</h2>
@@ -183,9 +183,7 @@ CAST (column_name AS INTERVAL YEAR)
        cast( INTERVALDAY_col as interval day) INTERVALDAY_col 
 FROM `/user/root/intervals.json`);
 </code></pre></div>
-<p>Output is: </p>
-
-<p>TBD need to test in a future build.</p>
+<!-- Text and include output -->
 </div>
 
 

Modified: drill/site/trunk/content/drill/docs/flatten-function/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/flatten-function/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/flatten-function/index.html (original)
+++ drill/site/trunk/content/drill/docs/flatten-function/index.html Thu Mar 26 
22:07:50 2015
@@ -67,11 +67,21 @@
 
 </div>
 
-<div class="int_text" align="left"><p>The FLATTEN function is useful for 
flexible exploration of repeated data.
-FLATTEN separates the elements in a repeated field into individual records. To
-maintain the association between each flattened value and the other fields in
-the record, all of the other columns are copied into each new record. A very
-simple example would turn this data (one record):</p>
+<div class="int_text" align="left"><p>FLATTEN separates the elements in a 
repeated field into individual records.</p>
+
+<h2 id="syntax">Syntax</h2>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">FLATTEN(z)
+</code></pre></div>
+<p><em>z</em> is a JSON array.</p>
+
+<h2 id="usage-notes">Usage Notes</h2>
+
+<p>The FLATTEN function is useful for flexible exploration of repeated 
data.</p>
+
+<p>To maintain the association between each flattened value and the other 
fields in
+the record, the FLATTEN function copies all of the other columns into each new 
record. </p>
+
+<p>A very simple example would turn this data (one record):</p>
 <div class="highlight"><pre><code class="language-text" data-lang="text">{
   &quot;x&quot; : 5,
   &quot;y&quot; : &quot;a string&quot;,
@@ -79,7 +89,7 @@ simple example would turn this data (one
 }
 </code></pre></div>
 <p>into three distinct records:</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">select flatten(z) from table;
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT FLATTEN(z) FROM table;
 | x           | y              | z         |
 +-------------+----------------+-----------+
 | 5           | &quot;a string&quot;     | 1         |
@@ -89,6 +99,10 @@ simple example would turn this data (one
 <p>The function takes a single argument, which must be an array (the 
<code>z</code> column
 in this example).</p>
 
+<p>Using the all (*) wildcard as the argument to flatten is not supported and 
returns an error.</p>
+
+<h2 id="examples">Examples</h2>
+
 <p>For a more interesting example, consider the JSON data in the publicly
 available <a href="https://www.yelp.com/dataset_challenge/dataset";>Yelp</a> 
data set. The
 first query below returns three columns from the
@@ -143,7 +157,7 @@ order by count(celltbl.catl) desc limit
 +---------------|------------+
 </code></pre></div>
 <p>A common use case for FLATTEN is its use in conjunction with the
-<a href="/docs/flatten-function">KVGEN</a> function.</p>
+<a href="/docs/flatten-function">KVGEN</a> function as shown in the section, 
<a href="/docs/json-data-model/">&quot;JSON Data Model&quot;</a>.</p>
 </div>
 
 

Modified: 
drill/site/trunk/content/drill/docs/getting-started-tutorial/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/getting-started-tutorial/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/getting-started-tutorial/index.html 
(original)
+++ drill/site/trunk/content/drill/docs/getting-started-tutorial/index.html Thu 
Mar 26 22:07:50 2015
@@ -138,10 +138,10 @@ these steps:</p>
 
 <ol>
 <li>Issue a CTRL Z to stop the query, then start Drill again. If the startup 
message indicates success, skip the rest of the steps. If not, proceed to step 
2.</li>
-<li><p>Search for the Drill process ID.</p>
+<li><p>Search for the Drill process IDs.</p>
 <div class="highlight"><pre><code class="language-text" data-lang="text">$ ps 
auwx | grep drill
 </code></pre></div></li>
-<li><p>Kill the process using the process number in the grep output. For 
example:</p>
+<li><p>Kill each process using the process numbers in the grep output. For 
example:</p>
 <div class="highlight"><pre><code class="language-text" data-lang="text">$ 
sudo kill -9 2674
 </code></pre></div></li>
 </ol>

Modified: drill/site/trunk/content/drill/docs/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/index.html (original)
+++ drill/site/trunk/content/drill/docs/index.html Thu Mar 26 22:07:50 2015
@@ -421,6 +421,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -671,6 +675,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -955,6 +963,10 @@
         
       
         
+      
+        
+      
+        
           <li><a href="/docs/installing-the-apache-drill-sandbox/">Installing 
the Apache Drill Sandbox</a></li>
           
           
@@ -1246,6 +1258,10 @@
               
             
               
+            
+              
+            
+              
                 <li><a 
href="/docs/installing-the-mapr-sandbox-with-apache-drill-on-vmware-player-vmware-fusion/">Installing
 the MapR Sandbox with Apache Drill on VMware Player/VMware Fusion</a></li>
               
             
@@ -1741,6 +1757,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -1920,6 +1940,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -2293,6 +2317,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -2541,6 +2569,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -2994,6 +3026,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -3303,6 +3339,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -3463,6 +3503,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -3951,6 +3995,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -4258,6 +4306,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -4574,6 +4626,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -4697,6 +4753,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -5231,6 +5291,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -5254,6 +5318,304 @@
           
           
           
+            <ul>
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+                <li><a href="/docs/math-and-trig/">Math and Trig</a></li>
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+              
+            
+            </ul>
+          
         
       
         
@@ -5530,6 +5892,8 @@
               
             
               
+            
+              
                 <li><a href="/docs/flatten-function/">FLATTEN Function</a></li>
               
             
@@ -5542,6 +5906,10 @@
               
             
               
+                <li><a 
href="/docs/repeated-contains-function/">REPEATED_CONTAINS Function</a></li>
+              
+            
+              
             
               
             
@@ -5878,6 +6246,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -5944,6 +6316,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -6263,6 +6639,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -6587,6 +6967,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -7057,6 +7441,10 @@
             
               
             
+              
+            
+              
+            
             </ul>
           
         
@@ -7211,6 +7599,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -7525,6 +7917,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -7849,6 +8245,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -8158,6 +8558,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -8472,6 +8876,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -8796,6 +9204,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -9105,6 +9517,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -9409,6 +9825,10 @@
       
         
       
+        
+      
+        
+      
       </ul>
     
   
@@ -9421,6 +9841,10 @@
   
 
   
+
+  
+
+  
 
   
 

Modified: drill/site/trunk/content/drill/docs/json-data-model/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/json-data-model/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/json-data-model/index.html (original)
+++ drill/site/trunk/content/drill/docs/json-data-model/index.html Thu Mar 26 
22:07:50 2015
@@ -164,14 +164,14 @@
 <li><p>In the storage plugin definition, include a writable (mutable) 
workspace. For example:</p>
 
 <p>{
-. . .
-  &quot;workspaces&quot;: {
-. . .
-    &quot;myjsonstore&quot;: {
-      &quot;location&quot;: &quot;/tmp&quot;,
-      &quot;writable&quot;: true,
-    }
-. . .</p></li>
+  . . .
+    &quot;workspaces&quot;: {
+  . . .
+      &quot;myjsonstore&quot;: {
+        &quot;location&quot;: &quot;/tmp&quot;,
+        &quot;writable&quot;: true,
+      }
+  . . .</p></li>
 <li><p>Set the output format to JSON. For example:</p>
 <div class="highlight"><pre><code class="language-text" data-lang="text">ALTER 
SESSION SET `store.format`=&#39;json&#39;;
 </code></pre></div></li>

Modified: drill/site/trunk/content/drill/docs/kvgen-function/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/kvgen-function/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/kvgen-function/index.html (original)
+++ drill/site/trunk/content/drill/docs/kvgen-function/index.html Thu Mar 26 
22:07:50 2015
@@ -67,7 +67,16 @@
 
 </div>
 
-<div class="int_text" align="left"><p>KVGEN stands for <em>key-value 
generation</em>. This function is useful when complex
+<div class="int_text" align="left"><p>Return a list of the keys that exist in 
the map.</p>
+
+<h2 id="syntax">Syntax</h2>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">KVGEN(column)
+</code></pre></div>
+<p><em>column</em> is the name of a column.</p>
+
+<h2 id="usage-notes">Usage Notes</h2>
+
+<p>KVGEN stands for <em>key-value generation</em>. This function is useful 
when complex
 data files contain arbitrary maps that consist of relatively 
&quot;unknown&quot; column
 names. Instead of having to specify columns in the map to access the data, you
 can use KVGEN to return a list of the keys that exist in the map. KVGEN turns
@@ -200,8 +209,7 @@ distinct rows:</p>
 +------------+
 9 rows selected (0.151 seconds)
 </code></pre></div>
-<p>See the description of <a href="/docs/flatten-function">FLATTEN</a>
-for an example of a query against the flattened data.</p>
+<p>For more examples of KVGEN and FLATTEN, see the examples in the section, <a 
href="/docs/json-data-model">&quot;JSON Data Model&quot;</a>.</p>
 </div>
 
 

Modified: 
drill/site/trunk/content/drill/docs/lession-2-run-queries-with-ansi-sql/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/lession-2-run-queries-with-ansi-sql/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- 
drill/site/trunk/content/drill/docs/lession-2-run-queries-with-ansi-sql/index.html
 (original)
+++ 
drill/site/trunk/content/drill/docs/lession-2-run-queries-with-ansi-sql/index.html
 Thu Mar 26 22:07:50 2015
@@ -294,7 +294,7 @@ from customers t limit 5;
 <p>Note the following features of this query:</p>
 
 <ul>
-<li>The CAST function is required for every column in the table. This function 
returns the MapR-DB/HBase binary data as readable integers and strings. 
Alternatively, you can use CONVERT_TO/CONVERT_FROM functions to decode the 
columns. CONVERT_TO and CONVERT_FROM are more efficient than CAST in most 
cases.</li>
+<li>The CAST function is required for every column in the table. This function 
returns the MapR-DB/HBase binary data as readable integers and strings. 
Alternatively, you can use CONVERT_TO/CONVERT_FROM functions to decode the 
string columns. CONVERT_TO/CONVERT_FROM are more efficient than CAST in most 
cases. Use only CONVERT_TO to convert binary types to any type other than 
VARCHAR.</li>
 <li>The row_key column functions as the primary key of the table (a customer 
ID in this case).</li>
 <li>The table alias t is required; otherwise the column family names would be 
parsed as table names and the query would return an error.</li>
 </ul>

Added: drill/site/trunk/content/drill/docs/math-and-trig/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/math-and-trig/index.html?rev=1669458&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/math-and-trig/index.html (added)
+++ drill/site/trunk/content/drill/docs/math-and-trig/index.html Thu Mar 26 
22:07:50 2015
@@ -0,0 +1,416 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Math and Trig - 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>Math and Trig</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Drill supports the math functions shown 
in the following table plus trig functions listed at the end of this section. 
Most math functions and all trig functions take these input types:</p>
+
+<ul>
+<li>INT</li>
+<li>BIGINT</li>
+<li>FLOAT4</li>
+<li>FLOAT8</li>
+<li>SMALLINT</li>
+<li>UINT1</li>
+<li>UINT2</li>
+<li>UINT4</li>
+<li>UINT8</li>
+</ul>
+
+<p>Exceptions are the LSHIFT and RSHIFT functions, which take all types except 
the float types. DEGREES, EXP, RADIANS, and the multiple LOG functions take the 
input types in this list plus the following additional types:</p>
+
+<ul>
+<li>DECIMAL9</li>
+<li>DECIMAL18</li>
+</ul>
+
+<p><strong>Math Functions</strong></p>
+
+<table>
+  <tr>
+    <th>Function</th>
+    <th>Return Type</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>ABS(x)</td>
+    <td>Same as input</td>
+    <td>Returns the absolute value of the input argument x.</td>
+  </tr>
+  <tr>
+    <td>CBRT(x)</td>
+    <td>FLOAT8</td>
+    <td>Returns the cubic root of x.</td>
+  </tr>
+  <tr>
+    <td>CEIL(x)</td>
+    <td>Same as input</td>
+    <td>Returns the smallest integer not less than x.</td>
+  </tr>
+  <tr>
+    <td>CEILING(x)</td>
+    <td>Same as input</td>
+    <td>Same as CEIL.</td>
+  </tr>
+  <tr>
+    <td>DEGREES(x)</td>
+    <td>FLOAT8</td>
+    <td>Converts x radians to degrees.</td>
+  </tr>
+  <tr>
+    <td>EXP(x)</td>
+    <td>FLOAT8</td>
+    <td>Returns e (Euler's number) to the power of x.</td>
+  </tr>
+  <tr>
+    <td>FLOOR(x)</td>
+    <td>Same as input</td>
+    <td>Returns the largest integer not greater than x.</td>
+  </tr>
+  <tr>
+    <td>LOG(x)</td>
+    <td>FLOAT8</td>
+    <td>Returns the log value of x.</td>
+  </tr>
+  <tr>
+    <td>LSHIFT(x, y)</td>
+    <td>Same as input</td>
+    <td>Shifts the binary x by y times to the left.</td>
+  </tr>
+  <tr>
+    <td>RADIANS</td>
+    <td>FLOAT8</td>
+    <td>Converts x degress to radians.</td>
+  </tr>
+  <tr>
+    <td>ROUND(x)</td>
+    <td>Same as input</td>
+    <td>Rounds to the nearest integer.</td>
+  </tr>
+  <tr>
+    <td>ROUND(x, y)</td>
+    <td>DECIMAL</td>
+    <td>Rounds x to s decimal places.</td>
+  </tr>
+  <tr>
+    <td>RSHIFT(x, y)</td>
+    <td>Same as input</td>
+    <td>Shifts the binary x by y times to the right.</td>
+  </tr>
+  <tr>
+    <td>SIGN(x)</td>
+    <td>INT</td>
+    <td>Returns the sign of x.</td>
+  </tr>
+  <tr>
+    <td>SQRT(x)</td>
+    <td>Same as input</td>
+    <td>Returns the square root of x.</td>
+  </tr>
+  <tr>
+    <td>TRUNC(x)</td>
+    <td>Same as input</td>
+    <td>Truncates x toward zero.</td>
+  </tr>
+  <tr>
+    <td>TRUNC(x, y)</td>
+    <td>DECIMAL</td>
+    <td>Truncates x to y decimal places.</td>
+  </tr>
+</table>
+
+<h2 id="math-function-examples">Math Function Examples</h2>
+
+<p>Examples in this section use the following files:</p>
+
+<ul>
+<li>The <code>input2.json</code> file</li>
+<li>A dummy JSON file</li>
+</ul>
+
+<p>Download the <code>input2.json</code> file from the <a 
href="https://github.com/apache/drill/tree/master/exec/java-exec/src/test/resources/jsoninput";>Drill
 source code</a> page. On the Mac, for example, right-click input2.json and 
choose Save Link As, and then click Save.</p>
+
+<p>Create the a dummy JSON file having the following contents:</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">{&quot;dummy&quot; : &quot;data&quot;}
+</code></pre></div>
+<h4 id="abs-example">ABS Example</h4>
+
+<p>Get the absolute value of the integer key in <code>input2.json</code>. The 
following snippet of input2.json shows the relevant integer content:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">{ 
&quot;integer&quot; : 2010,
+  &quot;float&quot;   : 17.4,
+  &quot;x&quot;: {
+    &quot;y&quot;: &quot;kevin&quot;,
+    &quot;z&quot;: &quot;paul&quot;
+. . .
+}
+{ &quot;integer&quot; : -2002,
+  &quot;float&quot;   : -1.2
+}
+. . .
+
+SELECT `integer` FROM dfs.`/Users/drill/input2.json`;
+
++------------+
+|  integer   |
++------------+
+| 2010       |
+| -2002      |
+| 2001       |
+| 6005       |
++------------+
+4 rows selected (0.113 seconds)
+
+SELECT ABS(`integer`) FROM dfs.`/Users/drill/input2.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 2010       |
+| 2002       |
+| 2001       |
+| 6005       |
++------------+
+4 rows selected (0.357 seconds)
+</code></pre></div>
+<h2 id="ceil-example">CEIL Example</h2>
+
+<p>Get the ceiling of float key values in input2.json. The input2.json file 
contains these float key values:</p>
+
+<ul>
+<li>17.4</li>
+<li>-1.2</li>
+<li>1.2</li>
+<li><p>1.2</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT CEIL(`float`) FROM dfs.`/Users/drill/input2.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 18.0       |
+| -1.0       |
+| 2.0        |
+| 2.0        |
++------------+
+4 rows selected (0.647 seconds)
+</code></pre></div></li>
+</ul>
+
+<h3 id="floor-example">FLOOR Example</h3>
+
+<p>Get the floor of float key values in input2.json.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT FLOOR(`float`) FROM dfs.`/Users/drill/input2.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 17.0       |
+| -2.0       |
+| 1.0        |
+| 1.0        |
++------------+
+4 rows selected (0.11 seconds)
+</code></pre></div>
+<h3 id="round-examples">ROUND Examples</h3>
+
+<p>Open input2.json and change the first float value from 17.4 to 3.14159. Get 
values of the float columns in input2.json rounded as follows:</p>
+
+<ul>
+<li>Rounded to the nearest integer.</li>
+<li><p>Rounded to the fourth decimal place.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT ROUND(`float`) FROM 
dfs.`/Users/khahn/Documents/test_files_source/input2.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 3.0        |
+| -1.0       |
+| 1.0        |
+| 1.0        |
++------------+
+4 rows selected (0.061 seconds)
+
+SELECT ROUND(`float`, 4) FROM 
dfs.`/Users/khahn/Documents/test_files_source/input2.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 3.1416     |
+| -1.2       |
+| 1.2        |
+| 1.2        |
++------------+
+4 rows selected (0.059 seconds)
+</code></pre></div></li>
+</ul>
+
+<h2 id="log-examples">Log Examples</h2>
+
+<p>Get the base 2 log of 64.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT log(2, 64) FROM dfs.`/Users/drill/dummy.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 6.0        |
++------------+
+1 row selected (0.069 seconds)
+</code></pre></div>
+<p>Get the common log of 100.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT log10(100) FROM dfs.`/Users/drill/dummy.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 2.0        |
++------------+
+1 row selected (0.203 seconds)
+</code></pre></div>
+<p>Get the natural log of 7.5.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT log(7.5) FROM dfs.`/Users/drill/sample-data/dummy.json`;
+
++------------+
+|   EXPR$0   |
++------------+
+| 2.0149030205422647 |
++------------+
+1 row selected (0.063 seconds)
+</code></pre></div>
+<p><strong>Trig Functions</strong></p>
+
+<p>Drill supports the following trig functions, which return a FLOAT8 
result.</p>
+
+<ul>
+<li><p>SIN(x)<br>
+Sine of angle x in radians</p></li>
+<li><p>COS(x)<br>
+Cosine of angle x in radians</p></li>
+<li><p>TAN(x)<br>
+Tangent of angle x in radians</p></li>
+<li><p>ASIN(x)<br>
+Inverse sine of angle x in radians</p></li>
+<li><p>ACOS(x)<br>
+Inverse cosine of angle x in radians</p></li>
+<li><p>ATAN(x)<br>
+Inverse tangent of angle x in radians</p></li>
+<li><p>SINH()<br>
+Hyperbolic sine of hyperbolic angle x in radians</p></li>
+<li><p>COSH()<br>
+Hyperbolic cosine of hyperbolic angle x in radians</p></li>
+<li><p>TANH()<br>
+Hyperbolic tangent of hyperbolic angle x in radians</p></li>
+</ul>
+
+<p><strong>Examples</strong></p>
+
+<p>Find the sine and tangent of a 45 degree angle. First convert degrees to 
radians for use in the SIN() function.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT RADIANS(30) AS Degrees FROM 
dfs.`/Users/drill/dummy.json`;
+
++------------+
+|  Degrees   |
++------------+
+| 0.7853981633974483 |
++------------+
+1 row selected (0.045 seconds)
+
+SELECT SIN(0.7853981633974483) AS `Sine of 30 degrees` FROM 
dfs.`/Users/drill/dummy.json`;
+
++-----------------------+
+|  Sine of 45 degrees   |
++-----------------------+
+|  0.7071067811865475   |
++-----------------------+
+1 row selected (0.059 seconds)
+
+SELECT TAN(0.7853981633974483) AS `Tangent of 30 degrees` from 
dfs.`/Users/drill/dummy.json`;
+
++-----------------------+
+| Tangent of 45 degrees |
++-----------------------+
+| 0.9999999999999999    |
++-----------------------+
+</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>

Added: drill/site/trunk/content/drill/docs/repeated-contains-function/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/repeated-contains-function/index.html?rev=1669458&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/repeated-contains-function/index.html 
(added)
+++ drill/site/trunk/content/drill/docs/repeated-contains-function/index.html 
Thu Mar 26 22:07:50 2015
@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>REPEATED_CONTAINS Function - 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>REPEATED_CONTAINS Function</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>REPEATED CONTAINS searches for a keyword 
in an array. </p>
+
+<h2 id="syntax">Syntax</h2>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">REPEATED_CONTAINS(array_name, keyword)
+</code></pre></div>
+<ul>
+<li><p>array_name is a simple array, such as topping:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">{
+. . .
+    &quot;topping&quot;:
+        [
+            &quot;None&quot;,
+            &quot;Glazed&quot;,
+            &quot;Sugar&quot;,
+            &quot;Powdered Sugar&quot;,
+            &quot;Chocolate with Sprinkles&quot;,
+            &quot;Chocolate&quot;,
+            &quot;Maple&quot;
+        ]
+}
+</code></pre></div></li>
+<li><p>keyword is a value in the array, such as &#39;Glazed&#39;.</p></li>
+</ul>
+
+<h2 id="usage-notes">Usage Notes</h2>
+
+<p>REPEATED_CONTAINS returns true if Drill finds a match; otherwise, the 
function returns false. The function supports regular expression wildcards, 
such as *, ., and ?, but not at the beginning of the keyword. Enclose keyword 
string values in single quotation marks. Do not enclose numerical keyword 
values in single quotation marks.</p>
+
+<h2 id="examples">Examples</h2>
+
+<p>The examples in this section <code>testRepeatedWrite.json</code>. To 
download this file, go to <a 
href="https://github.com/apache/drill/tree/master/exec/java-exec/src/test/resources";>Drill
 test resources</a> page, locate testRepeatedWrite.json.json in the list of 
files, and download it. For example, on the Mac right-click the five, select 
Save Link As, and then click Save.</p>
+
+<p>Which donuts having glazed or glaze toppings?</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">    
SELECT name, REPEATED_CONTAINS(topping, &#39;Glaze?&#39;) AS `Glazed?` FROM  
dfs.`/Users/drill/testRepeatedWrite.json` WHERE type=&#39;donut&#39;;
+
+    +------------+------------+
+    |    name    |  Glazed?   |
+    +------------+------------+
+    | Cake       | true       |
+    | Raised     | true       |
+    | Old Fashioned | true       |
+    | Filled     | true       |
+    | Apple Fritter | true       |
+    +------------+------------+
+    5 rows selected (0.072 seconds)
+</code></pre></div>
+<p>Which objects have powered sugar toppings? Use the asterisk wildcard 
instead of typing the entire keyword pair.</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT name, REPEATED_CONTAINS(topping, &#39;P*r&#39;) AS 
`Powdered Sugar?` FROM  
dfs.`/Users/khahn/Documents/test_files_source/testRepeatedWrite.json` WHERE 
type=&#39;donut&#39;;
+
++------------+-----------------+
+|    name    | Powdered Sugar? |
++------------+-----------------+
+| Cake       | true            |
+| Raised     | true            |
+| Old Fashioned | false           |
+| Filled     | true            |
+| Apple Fritter | false           |
++------------+-----------------+
+5 rows selected (0.089 seconds)
+</code></pre></div>
+<p>Which donuts have toppings beginning with the letters &quot;Map&quot; and 
ending in any two letters?</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT name, REPEATED_CONTAINS(topping, &#39;Map..&#39;) AS 
`Maple?` FROM  dfs.`/Users/drill/testRepeatedWrite.json` WHERE 
type=&#39;donut&#39;;
+
++------------+------------+
+|    name    |   Maple?   |
++------------+------------+
+| Cake       | true       |
+| Raised     | true       |
+| Old Fashioned | true       |
+| Filled     | true       |
+| Apple Fritter | false      |
++------------+------------+
+5 rows selected (0.085 seconds)
+</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>

Modified: drill/site/trunk/content/drill/docs/repeated-count-function/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/repeated-count-function/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/repeated-count-function/index.html 
(original)
+++ drill/site/trunk/content/drill/docs/repeated-count-function/index.html Thu 
Mar 26 22:07:50 2015
@@ -67,7 +67,23 @@
 
 </div>
 
-<div class="int_text" align="left"><p>This function counts the values in an 
array. The following example returns the
+<div class="int_text" align="left"><p>This function counts the values in an 
array. </p>
+
+<h2 id="syntax">Syntax</h2>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">REPEATED_COUNT (array)
+</code></pre></div>
+<p><em>array</em> is the name of an array.</p>
+
+<h2 id="usage-notes">Usage Notes</h2>
+
+<p>The COUNT function requires a single argument, which must be an array. Note 
that
+this function is not a standard SQL aggregate function and does not require
+the count to be grouped by other columns in the select list (such as 
<code>name</code> in
+this example). </p>
+
+<h2 id="example">Example</h2>
+
+<p>The following example returns the
 counts for the <code>categories</code> array in the 
<code>yelp_academic_dataset_business.json</code>
 file. The counts are restricted to rows that contain the string 
<code>pizza</code>.</p>
 <div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT name, REPEATED_COUNT(categories) 
@@ -88,11 +104,6 @@ WHERE  name LIKE &#39;%pizza%&#39;;
 
 7 rows selected (2.03 seconds)
 </code></pre></div>
-<p>The function requires a single argument, which must be an array. Note that
-this function is not a standard SQL aggregate function and does not require
-the count to be grouped by other columns in the select list (such as 
<code>name</code> in
-this example).</p>
-
 <p>For another example of this function, see the following lesson in the Apache
 Drill Tutorial for Hadoop: <a 
href="/docs/lession-3-run-queries-on-complex-data-types/">Lesson 3: Run Queries 
on Complex Data Types</a>.</p>
 </div>

Modified: drill/site/trunk/content/drill/docs/sample-data-donuts/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/sample-data-donuts/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/sample-data-donuts/index.html (original)
+++ drill/site/trunk/content/drill/docs/sample-data-donuts/index.html Thu Mar 
26 22:07:50 2015
@@ -67,8 +67,9 @@
 
 </div>
 
-<div class="int_text" align="left"><p>The complex data queries use sample 
<code>donuts.json</code> and <code>moredonuts.json</code> files.
-Here is the single complete &quot;record&quot; (<code>0001</code>) from the 
<code>donuts.json</code>file. In
+<div class="int_text" align="left"><p>The complex data queries use the sample 
<code>donuts.json</code> file. To download this file, go to <a 
href="https://github.com/apache/drill/tree/master/exec/java-exec/src/test/resources";>Drill
 test resources</a> page, locate donuts.json in the list of files, and download 
it. For example, on the Mac right-click the five, select Save Link As, and then 
click Save.</p>
+
+<p>Here is the single complete &quot;record&quot; (<code>0001</code>) from the 
<code>donuts.json</code>file. In
 terms of Drill query processing, this record is equivalent to a single record
 in a table.</p>
 <div class="highlight"><pre><code class="language-text" data-lang="text">{

Modified: drill/site/trunk/content/drill/docs/sql-extensions/index.html
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/sql-extensions/index.html?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/sql-extensions/index.html (original)
+++ drill/site/trunk/content/drill/docs/sql-extensions/index.html Thu Mar 26 
22:07:50 2015
@@ -69,82 +69,29 @@
 
 <div class="int_text" align="left"><p>Drill extends SQL to work with 
Hadoop-scale data and to explore smaller-scale data in ways not possible with 
SQL. Using intuitive SQL extensions you work with self-describing data and 
complex data types. Extensions to SQL include capabilities for exploring 
self-describing data, such as files and HBase, directly in the native 
format.</p>
 
-<p>Drill provides language support for pointing to <a href="">storage 
plugin</a> interfaces that Drill uses to interact with data sources. Use the 
name of a storage plugin to specify a file system <em>database</em> as a prefix 
in queries when you refer to objects across databases. Query files, including 
compressed .gz files and directories like an SQL table using a single query. 
</p>
+<p>Drill provides language support for pointing to <a href="">storage 
plugin</a> interfaces that Drill uses to interact with data sources. Use the 
name of a storage plugin to specify a file system <em>database</em> as a prefix 
in queries when you refer to objects across databases. Query files, including 
compressed .gz files, and <a href="/docs/querying-directories">directories</a>, 
as you would query an SQL table. You can query <a 
href="/docs/lesson-3-create-a-storage-plugin/query-multiple-files-in-a-directory">multiple
 files in a directory</a>.</p>
 
-<p>Drill extends the SELECT statement for reading complex, multi-structured 
data. The extended CREATE TABLE AS SELECT, provides the capability to write 
data of complex/multi-structured data types. Drill extends the <a 
href="http://drill.apache.org/docs/lexical-structure";>lexical rules</a> for 
working with files and directories, such as using back ticks for including file 
names, directory names, and reserved words in queries. Drill syntax supports 
using the file system as a persistent store for query profiles and diagnostic 
information.</p>
+<p>Drill extends the SELECT statement for reading complex, multi-structured 
data. The extended CREATE TABLE AS SELECT provides the capability to write data 
of complex/multi-structured data types. Drill extends the <a 
href="http://drill.apache.org/docs/lexical-structure";>lexical rules</a> for 
working with files and directories, such as using back ticks for including file 
names, directory names, and reserved words in queries. Drill syntax supports 
using the file system as a persistent store for query profiles and diagnostic 
information.</p>
 
 <h2 id="extensions-for-hive--and-hbase-related-data-sources">Extensions for 
Hive- and HBase-related Data Sources</h2>
 
-<p>Drill supports Hive and HBase as a plug-and-play data source. You can query 
Hive tables with no modifications and creating model in the Hive metastore. 
Primitives, such as JOIN, support columnar operation.</p>
+<p>Drill supports Hive and HBase as a plug-and-play data source. Drill can 
read tables created in Hive that use <a 
href="/docs/hive-to-drill-data-type-mapping">data types compatible</a> with 
Drill.  You can query Hive tables without modifications. You can query 
self-describing data without requiring metadata definitions in the Hive 
metastore. Primitives, such as JOIN, support columnar operation. </p>
 
 <h2 id="extensions-for-json-related-data-sources">Extensions for JSON-related 
Data Sources</h2>
 
-<p>For reading all JSON data as text, use the all text mode extension. Drill 
extends SQL to provide access to repeating values in arrays and arrays within 
arrays (array indexes). You can use these extensions to reach into deeply 
nested data. Drill extensions use standard JavaScript notation for referencing 
data elements in a hierarchy.</p>
+<p>For reading all JSON data as text, use the <a 
href="http://drill.apache.org/docs/handling-different-data-types/#all-text-mode-option";>all
 text mode</a> extension. Drill extends SQL to provide access to repeating 
values in arrays and arrays within arrays (array indexes). You can use these 
extensions to reach into deeply nested data. Drill extensions use standard 
JavaScript notation for referencing data elements in a hierarchy, as shown in 
<a href="/docs/json-data-model#analyzing-json">&quot;Analyzing 
JSON.&quot;</a></p>
 
-<h2 id="extensions-for-text-data-sources">Extensions for Text Data Sources</h2>
+<h2 id="extensions-for-parquet-data-sources">Extensions for Parquet Data 
Sources</h2>
 
-<p>Drill handles plain text files and directories like standard SQL tables and 
can infer knowledge about the schema of the data. You can query compressed .gz 
files.</p>
+<p>SQL does not support all Parquet data types, so Drill infers data types in 
many instances. Users <a href="/docs/sql-functions">cast</a> data types to 
ensure getting a particular data type. Drill offers more liberal casting 
capabilities than SQL for Parquet conversions if the Parquet data is of a 
logical type. You can use the default dfs storage plugin installed with Drill 
for reading and writing Parquet files as shown in the section, <a 
href="/docs/parquet-format">“Parquet Format.”</a></p>
 
-<h2 id="sql-commands-extensions">SQL Commands Extensions</h2>
+<h2 id="extensions-for-text-data-sources">Extensions for Text Data Sources</h2>
 
-<p>The following table describes key Drill extensions to SQL commands.</p>
-
-<table>
-  <tr>
-    <th>Command</th>
-    <th>SQL</th>
-    <th>Drill</th>
-  </tr>
-  <tr>
-    <td>ALTER (SESSION | SYSTEM)</td>
-    <td>None</td>
-    <td>Changes a system or session option.</td>
-  </tr>
-  <tr>
-    <td>CREATE TABLE AS SELECT</td>
-    <td>Creates a table from selected data in an existing database table.</td>
-    <td>Stores selected data from one or more data sources on the file 
system.</td>
-  </tr>
-  <tr>
-    <td>CREATE VIEW</td>
-    <td>Creates a virtual table. The fields in a view are fields from one or 
more real tables in the database.</td>
-    <td>Creates a virtual structure for and stores the result set. The fields 
in a view are fields from files in a file system, Hive, Hbase, MapR-DB 
tables</td>
-  </tr>
-  <tr>
-    <td>DESCRIBE</td>
-    <td>Obtains information about the &lt;select list&gt; columns</td>
-    <td>Obtains information about views created in a workspace and tables 
created in Hive, HBase, and MapR-DB.</td>
-  </tr>
-  <tr>
-    <td>EXPLAIN</td>
-    <td>None</td>
-    <td>Obtains a query execution plan.</td>
-  </tr>
-  <tr>
-    <td>INSERT</td>
-    <td>Loads data into the database for querying.</td>
-    <td>No INSERT function. Performs schema-on-read querying and execution; no 
need to load data into Drill for querying.</td>
-  </tr>
-  <tr>
-    <td>SELECT</td>
-    <td>Retrieves rows from a database table or view.</td>
-    <td>Retrieves data from Hbase, Hive, MapR-DB, file system or other storage 
plugin data source.</td>
-  </tr>
-  <tr>
-    <td>SHOW (DATABASES | SCHEMAS | FILES | TABLES)</td>
-    <td>None</td>
-    <td>Lists the storage plugin data sources available for querying or the 
Hive, Hbase, MapR-DB tables, or views for the data source in use. Supports a 
FROM clause for listing file data sources in directories.</td>
-  </tr>
-  <tr>
-    <td>USE</td>
-    <td>Targets a database in SQL schema for querying.</td>
-    <td>Targets Hbase, Hive, MapR-DB, file system or other storage plugin data 
source, which can be schema-less for querying.</td>
-  </tr>
-</table>
+<p>Drill handles plain text files and directories like standard SQL tables and 
can infer knowledge about the schema of the data. Drill extends SQL to handle 
structured file types, such as comma separated values (CSV) files. An extension 
of the SELECT statement provides COLUMNS[n] syntax for accessing CSV rows in a 
readable format, as shown in <a 
href="/docs/querying-plain-text-files">&quot;COLUMNS[n] Syntax.&quot;</a></p>
 
 <h2 id="sql-function-extensions">SQL Function Extensions</h2>
 
-<p>The following table describes key Drill functions for analyzing nested 
data.</p>
+<p>Drill provides the following functions for analyzing nested data.</p>
 
 <table>
   <tr>
@@ -153,54 +100,43 @@
     <th>Drill</th>
   </tr>
   <tr>
-    <td>CAST</td>
-    <td>Casts database data from one type to another.</td>
-    <td>Casts database data from one type to another and also casts data 
having no metadata into a readable type. Allows liberal casting of schema-less 
data.</td>
-  </tr>
-  <tr>
-    <td>CONVERT_TO</td>
-    <td>Converts an expression from one type to another using the CONVERT 
command.</td>
-    <td>Converts an SQL data type to complex types, including Hbase byte 
arrays, JSON and Parquet arrays and maps.</td>
-  </tr>
-  <tr>
-    <td>CONVERT_FROM</td>
-    <td>Same as above</td>
-    <td>Converts from complex types, including Hbase byte arrays, JSON and 
Parquet arrays and maps to an SQL data type.</td>
-  </tr>
-  <tr>
-    <td>FLATTEN</td>
+    <td><a href='http://drill.apache.org/docs/flatten-function'>FLATTEN</a> 
</td>
     <td>None</td>
     <td>Separates the elements in nested data from a repeated field into 
individual records.</td>
   </tr>
   <tr>
-    <td>KVGEN</td>
+    <td><a href='http://drill.apache.org/docs/kvgen-function'>KVGEN</a></td>
     <td>None</td>
     <td>Returns a repeated map, generating key-value pairs to simplify 
querying of complex data having unknown column names. You can then aggregate or 
filter on the key or value.</td>
   </tr>
   <tr>
-    <td>REPEATED_COUNT</td>
+    <td><a 
href='http://drill.apache.org/docs/repeated-count-function'>REPEATED_COUNT</a></td>
     <td>None</td>
-    <td>Counts the values in a JSON array.</td>
+    <td>Counts the values in an array.</td>
+  </tr>
+  <tr>
+    <td><a 
href='http://drill.apache.org/docs/repeated-contains'>REPEATED_CONTAINS</a></td>
+    <td>None</td>
+    <td>Searches for a keyword in an array.</td>
   </tr>
 </table>
 
 <h2 id="other-extensions">Other Extensions</h2>
 
-<p><a href=""><code>sys</code> database system tables</a> provide port, 
version, and option information. Drill Connects to a random node, know where 
you’re connected:</p>
-
-<p>select host from sys.drillbits where <code>current</code> = true;
+<p>The <a href=""><code>sys</code> database system tables</a> provide port, 
version, and option information.  For example, Drill connects to a random node. 
You query the sys table to know where you are connected:</p>
+<div class="highlight"><pre><code class="language-text" 
data-lang="text">SELECT host FROM sys.drillbits WHERE `current` = true;
 +------------+
 |    host    |
 +------------+
 | 10.1.1.109 |
-+------------+</p>
++------------+
 
-<p>select commit_id from sys.version;
+SELECT commit_id FROM sys.version;
 +------------+
 | commit_id  |
 +------------+
-| e3ab2c1760ad34bda80141e2c3108f7eda7c9104 |</p>
-</div>
+| e3ab2c1760ad34bda80141e2c3108f7eda7c9104 |
+</code></pre></div></div>
 
 
 <div id="footer" class="mw">

Modified: 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=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/docs/sql-functions/index.html (original)
+++ drill/site/trunk/content/drill/docs/sql-functions/index.html Thu Mar 26 
22:07:50 2015
@@ -71,6 +71,7 @@
 
 <ul>
 <li>Math Functions</li>
+<li>Trig Functions</li>
 <li>String Functions</li>
 <li>Date/Time Functions</li>
 <li>Data Type Formatting Functions</li>
@@ -80,25 +81,6 @@
 <li>Nested Data Functions</li>
 </ul>
 
-<h2 id="math">Math</h2>
-
-<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>
-
 <h2 id="string-functions">String Functions</h2>
 
 <p>The following table provides the string functions that you can use in your
@@ -406,11 +388,7 @@ CONVERT_FROM function on HBase, Drill de
 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>Do not use the CAST function for converting binary data types to other 
types. Although CAST works for converting VARBINARY to VARCHAR, CAST does not 
work in other cases. CONVERT functions not only work regardless of the types 
you are converting but are also more efficient to use than CAST when your data 
sources return binary data.</p>
 
 <p>The following table provides the data types that you use with the CONVERT_TO
 and CONVERT_FROM functions:</p>

Modified: drill/site/trunk/content/drill/feed.xml
URL: 
http://svn.apache.org/viewvc/drill/site/trunk/content/drill/feed.xml?rev=1669458&r1=1669457&r2=1669458&view=diff
==============================================================================
--- drill/site/trunk/content/drill/feed.xml (original)
+++ drill/site/trunk/content/drill/feed.xml Thu Mar 26 22:07:50 2015
@@ -6,9 +6,9 @@
 </description>
     <link>/</link>
     <atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
-    <pubDate>Mon, 23 Mar 2015 10:41:51 -0700</pubDate>
-    <lastBuildDate>Mon, 23 Mar 2015 10:41:51 -0700</lastBuildDate>
-    <generator>Jekyll v2.5.1</generator>
+    <pubDate>Thu, 26 Mar 2015 14:07:24 -0700</pubDate>
+    <lastBuildDate>Thu, 26 Mar 2015 14:07:24 -0700</lastBuildDate>
+    <generator>Jekyll v2.5.2</generator>
     
       <item>
         <title>MicroStrategy Announces Drill Support</title>


Reply via email to