drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tshi...@apache.org
Subject [6/9] drill git commit: review changes
Date Tue, 19 May 2015 16:30:08 GMT
review changes


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

Branch: refs/heads/gh-pages
Commit: 2aba4890b3ba26a1b63db140e64eeb472269314c
Parents: fb1c6d4
Author: Kristine Hahn <khahn@maprtech.com>
Authored: Tue May 19 02:50:23 2015 -0700
Committer: Kristine Hahn <khahn@maprtech.com>
Committed: Tue May 19 02:50:23 2015 -0700

----------------------------------------------------------------------
 .../010-connect-a-data-source-introduction.md   | 17 +++---
 .../035-plugin-configuration-introduction.md    | 11 ++--
 .../060-hbase-storage-plugin.md                 |  4 --
 .../070-hive-storage-plugin.md                  |  6 +--
 .../080-drill-default-input-format.md           |  4 +-
 .../connect-a-data-source/100-mapr-db-format.md |  9 +---
 .../data-types/010-supported-data-types.md      | 11 ++++
 .../data-types/020-date-time-and-timestamp.md   |  5 +-
 .../030-handling-different-data-types.md        |  2 +-
 .../sql-functions/010-math-and-trig.md          | 54 ++++++++++----------
 .../sql-functions/020-data-type-conversion.md   | 37 ++++++--------
 .../030-date-time-functions-and-arithmetic.md   | 24 ++++-----
 .../020-getting-to-know-the-drill-sandbox.md    | 12 +----
 13 files changed, 91 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/connect-a-data-source/010-connect-a-data-source-introduction.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/010-connect-a-data-source-introduction.md b/_docs/connect-a-data-source/010-connect-a-data-source-introduction.md
index d4cf829..29133c0 100644
--- a/_docs/connect-a-data-source/010-connect-a-data-source-introduction.md
+++ b/_docs/connect-a-data-source/010-connect-a-data-source-introduction.md
@@ -2,7 +2,12 @@
 title: "Connect a Data Source Introduction"
 parent: "Connect a Data Source"
 ---
-A storage plugin is an interface for connecting to a data source to read and write data.
Apache Drill connects to a data source, such as a file on the file system or a Hive metastore,
through a storage plugin. When you execute a query, Drill gets the plugin name you provide
in FROM clause of your query or from the default you specify in the USE.<plugin name>
command that precedes the query.
+A storage plugin provides the following information to Drill:
+
+* Interfaces that Drill can use to read from and write to data sources.   
+* A set of storage plugin optimization rules that assist with efficient and faster execution
of Drill queries, such as pushdowns, statistics, and partition awareness.  
+
+Apache Drill connects to a data source, such as a file on the file system or a Hive metastore,
through a storage plugin. When you execute a query, Drill gets the plugin name you provide
in FROM clause of your query or from the default you specify in the USE.<plugin name>
command that precedes the query.
 . 
 
 In addition to the connection string, the storage plugin configures the workspace and file
formats for reading data, as described in subsequent sections. 
@@ -20,13 +25,5 @@ A storage plugin provides the following information to Drill:
   * Interfaces that Drill can use to read from and write to data sources
   * A set of storage plugin optimization rules that assist with efficient and faster execution
of Drill queries, such as pushdowns, statistics, and partition awareness
 
-A storage plugin performs scanner and writer functions, and informs the metadata repository
of any known metadata. The metadata repository is a database created to store metadata. The
metadata is information about the structures that contain the actual data, such as:
-
-  * Schema
-  * File size
-  * Data ordering
-  * Secondary indices
-  * Number of blocks
-
-A storage plugin informs the execution engine of any native capabilities, such
+A storage plugin performs scanner and writer functions and informs the execution engine of
any native capabilities, such
 as predicate pushdown, joins, and SQL.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/connect-a-data-source/035-plugin-configuration-introduction.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/035-plugin-configuration-introduction.md b/_docs/connect-a-data-source/035-plugin-configuration-introduction.md
index 44e2e11..bc4c7e6 100644
--- a/_docs/connect-a-data-source/035-plugin-configuration-introduction.md
+++ b/_docs/connect-a-data-source/035-plugin-configuration-introduction.md
@@ -56,7 +56,7 @@ The following table describes the attributes you configure for storage plugins
i
     <td>"workspaces"</td>
     <td>null<br>"logs"</td>
     <td>no</td>
-    <td>One or more unique workspace names, enclosed in double quotation marks. If
a workspace is defined more than once, the latest one overrides the previous ones. Not used
with local or distributed file systems.</td>
+    <td>One or more unique workspace names, enclosed in double quotation marks. If
a workspace is defined more than once, the latest one overrides the previous ones. Used with
local or distributed file systems.</td>
   </tr>
   <tr>
     <td>"workspaces". . . "location"</td>
@@ -86,7 +86,7 @@ The following table describes the attributes you configure for storage plugins
i
     <td>"formats" . . . "type"</td>
     <td>"text"<br>"parquet"<br>"json"<br>"maprdb" *</td>
     <td>yes</td>
-    <td>The type of the format specified. For example, you can define two formats,
csv and psv, as type "Text", but having different delimiters. Drill enables the maprdb plugin
if you define the maprdb type.</td>
+    <td>The type of the format specified. For example, you can define two formats,
csv and psv, as type "Text", but having different delimiters. </td>
   </tr>
   <tr>
     <td>formats . . . "extensions"</td>
@@ -106,8 +106,6 @@ The following table describes the attributes you configure for storage
plugins i
 
 The configuration of other attributes, such as `size.calculator.enabled` in the hbase plugin
and `configProps` in the hive plugin, are implementation-dependent and beyond the scope of
this document.
 
-Although Drill can work with different file types in the same directory, restricting a Drill
workspace to one file type prevents confusion.
-
 ## Case-sensitive Names
 As previously mentioned, workspace and storage plugin names are case-sensitive. For example,
the following query uses a storage plugin name `dfs` and a workspace name `clicks`. When you
refer to `dfs.clicks` in an SQL statement, use the defined case:
 
@@ -130,6 +128,11 @@ For example, this command creates a plugin named myplugin for reading
files of a
     curl -X POST -/json" -d '{"name":"myplugin", "config": {"type": "file", "enabled": false,
"connection": "file:///", "workspaces": { "root": { "location": "/", "writable": false, "defaultInputFormat":
null}}, "formats": null}}' http://localhost:8047/storage/myplugin.json
 
 ## Bootstrapping a Storage Plugin
+
+Bootstrapping a storage plugin works only when the first drillbit in the cluster first starts
up. After startup, you have to use the REST API or Drill Web UI. If you need to add a storage
plugin to Drill and do not want to use a web browser, you can create a [bootstrap-storage-plugins.json](https://github.com/apache/drill/blob/master/contrib/storage-hbase/src/main/resources/bootstrap-storage-plugins.json)
file and include it on the classpath when starting Drill. The storage plugin loads when Drill
starts up.
+
 If you need to add a storage plugin to Drill and do not want to use a web browser, you can
create a [bootstrap-storage-plugins.json](https://github.com/apache/drill/blob/master/contrib/storage-hbase/src/main/resources/bootstrap-storage-plugins.json)
file and include it on the classpath when starting Drill. The storage plugin loads when Drill
starts up.
 
+If you configure an HBase storage plugin using bootstrap-storage-plugins.json file and HBase
is not install, you might experience a delay when executing the queries. Configure the [HBase
client timeout](http://hbase.apache.org/book.html#config.files) and retry settings in the
config block of HBase plugin instance configuration.
+
 If you configure an HBase storage plugin using bootstrap-storage-plugins.json file and HBase
is not install, you might experience a delay when executing the queries. Configure the [HBase
client timeout](http://hbase.apache.org/book.html#config.files) and retry settings in the
config block of HBase plugin instance configuration.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/connect-a-data-source/060-hbase-storage-plugin.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/060-hbase-storage-plugin.md b/_docs/connect-a-data-source/060-hbase-storage-plugin.md
index 3677004..e6a1ef2 100644
--- a/_docs/connect-a-data-source/060-hbase-storage-plugin.md
+++ b/_docs/connect-a-data-source/060-hbase-storage-plugin.md
@@ -30,9 +30,5 @@ To register HBase with Drill, complete the following steps:
 
   4. Click **Enable**.
 
-The hbase.zookeeper.property.clientPort shown here and in the default hbase storage plugin
is 2181. In a MapR cluster, the port is 5181; however, in a MapR cluster, use the maprdb storage
plugin format instead of the hbase storage plugin. 
-
 After you configure a storage plugin instance for the HBase, you can
 issue Drill queries against it.
-
-In the Drill sandbox, use the `dfs` storage plugin and the [MapR-DB format]({{ site.baseurl
}}/docs/mapr-db-format/) to query HBase files because the sandbox does not include HBase services.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/connect-a-data-source/070-hive-storage-plugin.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/070-hive-storage-plugin.md b/_docs/connect-a-data-source/070-hive-storage-plugin.md
index 146dde8..f88b002 100644
--- a/_docs/connect-a-data-source/070-hive-storage-plugin.md
+++ b/_docs/connect-a-data-source/070-hive-storage-plugin.md
@@ -43,7 +43,7 @@ To register a remote Hive metastore with Drill, complete the following steps:
           }
         }       
   5. Click **Enable**.
-  6. Verify that `HADOOP_CLASSPATH` is set in `drill-env.sh`. If you need to set the classpath,
add the following line to `drill-env.sh`.
+
 
 Once you have configured a storage plugin instance for a Hive data source, you
 can [query Hive tables]({{ site.baseurl }}/docs/querying-hive/).
@@ -72,6 +72,4 @@ steps:
           }
         }
   4. Click **Enable**.
-  5. Verify that `HADOOP_CLASSPATH` is set in `drill-env.sh`. If you need to set the classpath,
add the following line to `drill-env.sh`.
-  
-        export HADOOP_CLASSPATH=/<directory path>/hadoop/hadoop-<version-number>
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/connect-a-data-source/080-drill-default-input-format.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/080-drill-default-input-format.md b/_docs/connect-a-data-source/080-drill-default-input-format.md
index 7c41e91..e2922ab 100644
--- a/_docs/connect-a-data-source/080-drill-default-input-format.md
+++ b/_docs/connect-a-data-source/080-drill-default-input-format.md
@@ -12,9 +12,7 @@ numbers, the query fails. Defining a default input format can prevent queries
 from failing in situations where Drill cannot determine the file type.
 
 If you incorrectly define the file type in a workspace and Drill cannot
-determine the file type, the query fails. For example, if the directory for
-which you have defined a workspace contains JSON files and you defined the
-default input format as CSV, the query fails against the workspace.
+determine the file type, the query fails. For example, if JSON files do not have a `.json`
extension, the query fails.
 
 You can define one default input format per workspace. If you do not define a
 default input format, and Drill cannot detect the file format, the query

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/connect-a-data-source/100-mapr-db-format.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/100-mapr-db-format.md b/_docs/connect-a-data-source/100-mapr-db-format.md
index 269b783..443ef6a 100644
--- a/_docs/connect-a-data-source/100-mapr-db-format.md
+++ b/_docs/connect-a-data-source/100-mapr-db-format.md
@@ -2,8 +2,8 @@
 title: "MapR-DB Format"
 parent: "Connect a Data Source"
 ---
-Drill includes a `maprdb` format plugin for MapR-DB that is defined within the
-default `dfs` storage plugin instance when you install Drill from the `mapr-drill` package
on a MapR node. The `maprdb` format plugin improves the
+Drill includes a `maprdb` format for MapR-DB that is defined within the
+default `dfs` storage plugin instance when you install Drill from the `mapr-drill` package
on a MapR node. The `maprdb` format improves the
 estimated number of rows that Drill uses to plan a query. It also enables you
 to query tables like you would query files in a file system because MapR-DB
 and MapR-FS share the same namespace.
@@ -20,11 +20,6 @@ query.
 
     SELECT * FROM mfs.`/users/max/mytable`;
 
-Drill stores the `maprdb` format plugin in the `dfs` storage plugin instance,
-which you can view in the Drill Web UI. You can access the Web UI at
-[http://localhost:8047/storage](http://localhost:8047/storage). Click **Update** next to
the `dfs` instance
-in the Web UI to view the configuration for the `dfs` instance.
-
 The following image shows a portion of the configuration with the `maprdb`
 format plugin for the `dfs` instance:
 

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/sql-reference/data-types/010-supported-data-types.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/data-types/010-supported-data-types.md b/_docs/sql-reference/data-types/010-supported-data-types.md
index e170f59..c3f7ff8 100644
--- a/_docs/sql-reference/data-types/010-supported-data-types.md
+++ b/_docs/sql-reference/data-types/010-supported-data-types.md
@@ -39,6 +39,17 @@ To enable the DECIMAL type, set the `planner.enable_decimal_data_type`
option to
     +-------+--------------------------------------------+
     1 row selected (0.08 seconds)
 
+## Composite Types
+
+Drill supports the following composite types:
+
+* Array
+  Array element references, for example `a[1]` is the primary type-specific operation.
+* Map
+  Drill supports constructs in the form `m['k']`
+
+For more information about array and map types, see the section, ["Handling Different Data
Types"]({{site.baseurl}}/docs/handling-different-data-types/#handling-json-and-parquet-data),
[KVGEN]({{site.baseurl}}/docs/kvgen/), and [FLATTEN]({{site.baseurl}}/docs/flatten/).
+
 ## Casting and Converting Data Types
 
 In Drill, you cast or convert data to the required type for moving data from one data source
to another or to make the data readable.

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/sql-reference/data-types/020-date-time-and-timestamp.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/data-types/020-date-time-and-timestamp.md b/_docs/sql-reference/data-types/020-date-time-and-timestamp.md
index 33f3cf8..428ec28 100644
--- a/_docs/sql-reference/data-types/020-date-time-and-timestamp.md
+++ b/_docs/sql-reference/data-types/020-date-time-and-timestamp.md
@@ -8,7 +8,7 @@ Using familiar date and time formats, listed in the [SQL data types table]({{
si
 
 The INTERVALYEAR AND INTERVALDAY types represent a period of time. The INTERVALYEAR type
specifies values from a year to a month. The INTERVALDAY type specifies values from a day
to seconds.
 
-Use ISO 8601 syntax to format an interval:
+If your interval data is in the data source, for example a JSON file, cast the JSON VARCHAR
types to intervalyear and intervalday using the folliwng ISO 8601 syntax:
 
     P [qty] Y [qty] M [qty] D T [qty] H [qty] M [qty] S
 
@@ -26,7 +26,8 @@ where:
 * M follows a number of minutes.
 * S follows a number of seconds and optional milliseconds to the right of a decimal point
 
-You can restrict the set of stored interval fields by using one of these phrases in the query:
+
+If your input is interval data, use the following SQL literals to restrict the set of stored
interval fields:
 
 * YEAR
 * MONTH

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/sql-reference/data-types/030-handling-different-data-types.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/data-types/030-handling-different-data-types.md b/_docs/sql-reference/data-types/030-handling-different-data-types.md
index 110d32d..ca72082 100644
--- a/_docs/sql-reference/data-types/030-handling-different-data-types.md
+++ b/_docs/sql-reference/data-types/030-handling-different-data-types.md
@@ -65,7 +65,7 @@ To prevent Drill from attempting to read such data, set `store.json.read_numbers
 
 FLOAT and DOUBLE yield approximate results. These are variable-precision numeric types. Drill
does not cast/convert all values precisely to the internal format, but instead stores approximations.
Slight differences can occur in the value stored and retrieved. The following guidelines are
recommended:
 
-* For conversions involving monetary calculations, for example, that require precise results
use the DECIMAL type instead of FLOAT or DOUBLE. In this release, Drill disables the DECIMAL
data type, including casting to DECIMAL and reading DECIMAL types from Parquet and Hive. [Enable
the DECIMAL data type]({{site.baseurl}}/docs/supported-data-types#enabling-the-decimal-type))
if performance is not an issue.
+* For conversions involving monetary calculations, for example, that require precise results
use the DECIMAL type instead of FLOAT or DOUBLE. In this release, Drill disables the DECIMAL
data type, including casting to DECIMAL and reading DECIMAL types from Parquet and Hive. 
 * For complex calculations or mission-critical applications, especially those involving infinity
and underflow situations, carefully consider the limitations of type casting that involves
FLOAT or DOUBLE.
 * Equality comparisons between floating-point values can produce unexpected results.
 

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/sql-reference/sql-functions/010-math-and-trig.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/sql-functions/010-math-and-trig.md b/_docs/sql-reference/sql-functions/010-math-and-trig.md
index fc06932..aa26d66 100644
--- a/_docs/sql-reference/sql-functions/010-math-and-trig.md
+++ b/_docs/sql-reference/sql-functions/010-math-and-trig.md
@@ -16,33 +16,33 @@ Exceptions are the LSHIFT and RSHIFT functions, which take all types except
FLOA
 
 ## Table of Math Functions
 
-| Function     | Return Type   | Description                                            
                                                                     |
-|--------------|---------------|------------------------------------------------------------------------------------------------------------------------------|
-| ABS(x)       | Same as input | Returns the absolute value of the input argument x.    
                                                                     |
-| CBRT(x)      | FLOAT8        | Returns the cubic root of x.                           
                                                                     |
-| CEIL(x)      | Same as input | Returns the smallest integer not less than x.          
                                                                     |
-| CEILING(x)   | Same as input | Same as CEIL.                                          
                                                                     |
-| DEGREES(x)   | FLOAT8        | Converts x radians to degrees.                         
                                                                     |
-| E()          | FLOAT8        | Returns 2.718281828459045.                             
                                                                     |
-| EXP(x)       | FLOAT8        | Returns e (Euler's number) to the power of x.          
                                                                     |
-| FLOOR(x)     | Same as input | Returns the largest integer not greater than x.        
                                                                     |
-| LOG(x)       | FLOAT8        | Returns the natural log (base e) of x.                 
                                                                     |
-| LOG(x, y)    | FLOAT8        | Returns log base x to the y power.                     
                                                                     |
-| LOG10(x)     | FLOAT8        | Returns the common log of x.                           
                                                                     |
-| LSHIFT(x, y) | Same as input | Shifts the binary x by y times to the left.            
                                                                     |
-| MOD(x, y)    | FLOAT8        | Returns the remainder of x divided by y. Requires a cast
to DECIMAL for consistent results when x and y are FLOAT or DOUBLE. |
-| NEGATIVE(x)  | Same as input | Returns x as a negative number.                        
                                                                     |
-| PI           | FLOAT8        | Returns pi.                                            
                                                                     |
-| POW(x, y)    | FLOAT8        | Returns the value of x to the y power.                 
                                                                     |
-| RADIANS      | FLOAT8        | Converts x degress to radians.                         
                                                                     |
-| RAND         | FLOAT8        | Returns a random number from 0-1.                      
                                                                     |
-| ROUND(x)     | Same as input | Rounds to the nearest integer.                         
                                                                     |
-| ROUND(x, y)  | DECIMAL       | Rounds x to s decimal places.                          
                                                                     |
-| RSHIFT(x, y) | Same as input | Shifts the binary x by y times to the right.           
                                                                     |
-| SIGN(x)      | INT           | Returns the sign of x.                                 
                                                                     |
-| SQRT(x)      | Same as input | Returns the square root of x.                          
                                                                     |
-| TRUNC(x, y)  | Same as input | Truncates x to y decimal places. Specifying y is optional.
Default is 1.                                                     |
-| TRUNC(x, y)  | DECIMAL       | Truncates x to y decimal places.                       
                                                                     |
+| Function     | Return Type   | Description                                            
                  |
+|--------------|---------------|---------------------------------------------------------------------------|
+| ABS(x)       | Same as input | Returns the absolute value of the input argument x.    
                  |
+| CBRT(x)      | FLOAT8        | Returns the cubic root of x.                           
                  |
+| CEIL(x)      | Same as input | Returns the smallest integer not less than x.          
                  |
+| CEILING(x)   | Same as input | Same as CEIL.                                          
                  |
+| DEGREES(x)   | FLOAT8        | Converts x radians to degrees.                         
                  |
+| E()          | FLOAT8        | Returns 2.718281828459045.                             
                  |
+| EXP(x)       | FLOAT8        | Returns e (Euler's number) to the power of x.          
                  |
+| FLOOR(x)     | Same as input | Returns the largest integer not greater than x.        
                  |
+| LOG(x)       | FLOAT8        | Returns the natural log (base e) of x.                 
                  |
+| LOG(x, y)    | FLOAT8        | Returns log base x to the y power.                     
                  |
+| LOG10(x)     | FLOAT8        | Returns the common log of x.                           
                  |
+| LSHIFT(x, y) | Same as input | Shifts the binary x by y times to the left.            
                  |
+| MOD(x, y)    | FLOAT8        | Returns the remainder of x divided by y.               
                  |
+| NEGATIVE(x)  | Same as input | Returns x as a negative number.                        
                  |
+| PI           | FLOAT8        | Returns pi.                                            
                  |
+| POW(x, y)    | FLOAT8        | Returns the value of x to the y power.                 
                  |
+| RADIANS      | FLOAT8        | Converts x degress to radians.                         
                  |
+| RAND         | FLOAT8        | Returns a random number from 0-1.                      
                  |
+| ROUND(x)     | Same as input | Rounds to the nearest integer.                         
                  |
+| ROUND(x, y)  | DECIMAL       | Rounds x to s decimal places.                          
                  |
+| RSHIFT(x, y) | Same as input | Shifts the binary x by y times to the right.           
                  |
+| SIGN(x)      | INT           | Returns the sign of x.                                 
                  |
+| SQRT(x)      | Same as input | Returns the square root of x.                          
                  |
+| TRUNC(x, y)  | Same as input | Truncates x to y decimal places. Specifying y is optional.
Default is 1.  |
+| TRUNC(x, y)  | DECIMAL       | Truncates x to y decimal places.                       
                  |
 
 ## Math Function Examples
 

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/sql-reference/sql-functions/020-data-type-conversion.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/sql-functions/020-data-type-conversion.md b/_docs/sql-reference/sql-functions/020-data-type-conversion.md
index 55bd4fb..fe478e1 100644
--- a/_docs/sql-reference/sql-functions/020-data-type-conversion.md
+++ b/_docs/sql-reference/sql-functions/020-data-type-conversion.md
@@ -26,12 +26,6 @@ The target data type, such as INTEGER or DATE, to which to cast the expression
 
 ### CAST Usage Notes
 
-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:
-
-    SELECT c_row, CAST(c_int AS DECIMAL(28,8)) FROM mydata WHERE CAST(c_int AS DECIMAL(28,8))
> -3.0;
-
-{% include startnote.html %}In this release, Drill disables the DECIMAL data type. To enable,
set the planner.enable_decimal_data_type option to true.{% include endnote.html %}
-
 Use CONVERT_TO and CONVERT_FROM instead of the CAST function for converting binary data types
with one exception: When converting an INT or BIGINT number, having a byte count in the destination/source
that does not match the byte count of the number in the VARBINARY source/destination, use
CAST.  
 
 Refer to the following tables for information about the data types to use for casting:
@@ -45,7 +39,7 @@ Refer to the following tables for information about the data types to use
for ca
 The following examples show how to cast a string to a number, a number to a string, and one
type of number to another.
 
 ### Casting a Character String to a Number
-You cannot cast a character string that includes a decimal point to an INT or BIGINT. For
example, if you have "1200.50" in a JSON file, attempting to select and cast the string to
an INT fails. As a workaround, cast to a FLOAT or DECIMAL type, and then to an INT. 
+You cannot cast a character string that includes a decimal point to an INT or BIGINT. For
example, if you have "1200.50" in a JSON file, attempting to select and cast the string to
an INT fails. As a workaround, cast to a FLOAT or DOUBLE type, and then cast to an INT, assuming
you want to lose digits to the right of the decimal point. 
 
 {% include startnote.html %}In this release, Drill disables the DECIMAL data type. To enable,
set the planner.enable_decimal_data_type option to true.{% include endnote.html %}
 
@@ -210,7 +204,7 @@ This example uses a map as input to return a repeated list vector (JSON).
     +--------------------+
     1 row selected (0.141 seconds)
 
-### Set Up a Storage Plugin for Working with HBase Files
+### Set Up a Storage Plugin for Working with HBase
 
 This example assumes you are working in the Drill Sandbox. The `maprdb` storage plugin definition
is limited, so you modify the `dfs` storage plugin slightly and use that plugin for this example.
 
@@ -435,6 +429,8 @@ Use the following Joda format specifiers for date/time conversions:
 | Z      | time zone offset/id                              | zone         | -0800; -08:00;
America/Los_Angeles |
 | '      | single quotation mark, escape for text delimiter | literal      |            
                       |  
 
+{% include startnote.html %}The Joda format specifiers are case-sensitive.{% include endnote.html
%}
+
 For more information about specifying a format, refer to one of the following format specifier
documents:
 
 * [Java DecimalFormat class](http://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html)
format specifiers 
@@ -458,23 +454,24 @@ You can use the ā€˜zā€™ option to identify the time zone in TO_TIMESTAMP
to make
 
 ### TO_CHAR Examples
 
-Convert a FLOAT to a character string.
+Convert a FLOAT to a character string. The format specifications use a comma to separate
thousands and round-off to three decimal places.
 
-    SELECT TO_CHAR(125.789383, '#,###.###') FROM sys.version;
+    SELECT TO_CHAR(1256.789383, '#,###.###') FROM sys.version;
     +------------+
     |   EXPR$0   |
     +------------+
-    | 125.789    |
+    | 1,256.789  |
     +------------+
+    1 row selected (1.767 seconds)
 
 Convert an integer to a character string.
 
-    SELECT TO_CHAR(125, '#,###.###') FROM sys.version;
-    +------------+
-    |   EXPR$0   |
-    +------------+
-    | 125        |
-    +------------+
+    SELECT TO_CHAR(125677.4567, '#,###.###') FROM sys.version;
+    +--------------+
+    |    EXPR$0    |
+    +--------------+
+    | 125,677.457  |
+    +--------------+
     1 row selected (0.083 seconds)
 
 Convert a date to a character string.
@@ -520,7 +517,7 @@ Converts a character string or a UNIX epoch timestamp to a date.
 *'format'* is a format specifier enclosed in single quotation marks that sets a pattern for
the output formatting. Use this option only when the expression is a character string, not
a UNIX epoch timestamp. 
 
 ### TO_DATE Usage Notes
-Specify a format using patterns defined in [Java DateTimeFormat class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function takes a UNIX
epoch timestamp in milliseconds.
+Specify a format using patterns defined in [Joda DateTimeFormat class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function takes a UNIX
epoch timestamp in milliseconds.
 
 To compare dates in the WHERE clause, use TO_DATE on the value in the date column and in
the comparison value. For example:
 
@@ -650,7 +647,7 @@ Converts a character string to a time.
 *'format'* is a format specifier enclosed in single quotation marks that sets a pattern for
the output formatting. Use this option only when the expression is a character string, not
milliseconds. 
 
 ## TO_TIME Usage Notes
-Specify a format using patterns defined in [Java DateTimeFormat class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
+Specify a format using patterns defined in [Joda DateTimeFormat class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
 
 ### TO_TIME Examples
 
@@ -683,7 +680,7 @@ Convert 828550000 milliseconds (23 hours 55 seconds) to the time.
 *'format'* is a format specifier enclosed in single quotation marks that sets a pattern for
the output formatting. Use this option only when the expression is a character string, not
a UNIX epoch timestamp. 
 
 ### TO_TIMESTAMP Usage Notes
-Specify a format using patterns defined in [Java DateTimeFormat class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function takes a UNIX
epoch timestamp in milliseconds.
+Specify a format using patterns defined in [Joda DateTimeFormat class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function takes a UNIX
epoch timestamp in milliseconds.
 
 ### TO_TIMESTAMP Examples
 

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
----------------------------------------------------------------------
diff --git a/_docs/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md b/_docs/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
index 66df6ff..a7956d8 100644
--- a/_docs/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
+++ b/_docs/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
@@ -16,7 +16,7 @@ This section covers the Drill [time zone limitation]({{site.baseurl}}/docs/data-
 [CURRENT_TIMESTAMP]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions)|
TIMESTAMP 
 [DATE_ADD]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic#date_add)| DATE, TIMESTAMP
 
 [DATE_PART]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic#date_part)| DOUBLE
 
-[DATE_SUB]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic#date_sub)| DATE, TIMESTAMOP
    
+[DATE_SUB]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic#date_sub)| DATE, TIMESTAMP
    
 [LOCALTIME]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions)|
TIME  
 [LOCALTIMESTAMP]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions)|
TIMESTAMP  
 [NOW]({{ site.baseurl }}/docs/date-time-functions-and-arithmetic/#other-date-and-time-functions)|
TIMESTAMP  
@@ -67,9 +67,12 @@ Returns the sum of a date/time and a number of days/hours, or of a date/time
and
 
     DATE_ADD(keyword literal, interval expr)
 
+    DATE_ADD(column <date type>)
+
 *date* is the keyword date.  
 *literal_date* is a date in yyyy-mm-dd format enclosed in single quotation marks.  
 *integer* is a number of days to add to the date/time.  
+*column* is a date data in a data source.
 
 
 *keyword* is the word date, time, or timestamp.  
@@ -79,6 +82,10 @@ Returns the sum of a date/time and a number of days/hours, or of a date/time
and
 
 ### DATE_ADD Examples
 
+Add two days to the birthday column in the genealogy database.
+
+    SELECT DATE_ADD (CAST (birthdays AS date), 2) from genealogy.json;
+
 Add two days to today's date May 15, 2015.
 
     SELECT DATE_ADD(date '2015-05-15', 2) FROM sys.version;
@@ -170,16 +177,6 @@ Use Unix Epoch timestamp in milliseconds as the expression to get the
field of a
     +------------+
     1 row selected (0.088 seconds)
 
-Find the hour part of the timestamp for April 2, 2015 23:25:43. Use Unix Epoch timestamp
in milliseconds, which is 1428017143000 in UTC.
-
-    SELECT DATE_PART('hour', 1428017143000) FROM sys.version;
-    +------------+
-    |   EXPR$0   |
-    +------------+
-    | 23         |
-    +------------+
-    1 row selected (0.07 seconds)
-
 Return the day part of the one year, 2 months, 10 days interval.
 
     SELECT DATE_PART('day', '1:2:10') FROM sys.version;
@@ -199,9 +196,12 @@ Returns the difference between a date/time and a number of days/hours,
or betwee
 
     DATE_SUB(keyword literal, interval expr)  
 
+    DATE_ADD(column <date type>)  
+
 *date* is the keyword date.  
 *literal_date* is a date in yyyy-mm-dd format enclosed in single quotation marks.  
 *integer* is a number of days to subtract from the date/time.  
+*column* is date data in a data source.
 
 
 *keyword* is the word date, time, or timestamp.  
@@ -365,7 +365,7 @@ Returns a component of a timestamp, time, date, or interval.
 
     component FROM (timestamp | time | date | interval)
 
-*component* is supported time unit.
+*component* is one of the following time units: year, month, day, hour, minute, second.
 
 ### EXTRACT Usage Notes
 

http://git-wip-us.apache.org/repos/asf/drill/blob/2aba4890/_docs/tutorials/learn-drill-with-the-mapr-sandbox/020-getting-to-know-the-drill-sandbox.md
----------------------------------------------------------------------
diff --git a/_docs/tutorials/learn-drill-with-the-mapr-sandbox/020-getting-to-know-the-drill-sandbox.md
b/_docs/tutorials/learn-drill-with-the-mapr-sandbox/020-getting-to-know-the-drill-sandbox.md
index 7959d81..4ff5bb2 100644
--- a/_docs/tutorials/learn-drill-with-the-mapr-sandbox/020-getting-to-know-the-drill-sandbox.md
+++ b/_docs/tutorials/learn-drill-with-the-mapr-sandbox/020-getting-to-know-the-drill-sandbox.md
@@ -91,17 +91,7 @@ The `dfs` definition includes format definitions.
 
 ### maprdb
 
-The maprdb storage plugin is a configuration for MapR-DB in the sandbox. You use this plugin
in the sandbox to query HBase as well as MapR-DB data because the sandbox does not include
HBase services. In addition to the following brief example, see the [Registering HBase]({{
site.baseurl }}/docs/hbase-storage-plugin) for more
-information on how to configure Drill to query HBase.
-
-    {
-      "type": "hbase",
-      "config": {
-        "hbase.table.namespace.mappings": "*:/tables"
-      },
-      "size.calculator.enabled": false,
-      "enabled": true
-    }
+The maprdb format is a configuration for MapR-DB in the sandbox. You use this format in the
sandbox to query MapR-DB/HBase tables. 
 
 ### hive
 


Mime
View raw message