You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2018/05/09 21:10:40 UTC

[31/51] [partial] impala git commit: [DOCS] Impala doc site update for 3.0

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_float.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_float.html b/docs/build3x/html/topics/impala_float.html
new file mode 100644
index 0000000..53661d0
--- /dev/null
+++ b/docs/build3x/html/topics/impala_float.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_datatypes.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="float"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>FLOAT Data Type</title></head><body id="float"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">FLOAT Data Type</h1>
+
+
+
+  <div class="body conbody">
+
+    <p class="p">
+      A single precision floating-point data type used in <code class="ph codeph">CREATE TABLE</code> and <code class="ph codeph">ALTER
+      TABLE</code> statements.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Syntax:</strong>
+      </p>
+
+    <p class="p">
+      In the column definition of a <code class="ph codeph">CREATE TABLE</code> statement:
+    </p>
+
+<pre class="pre codeblock"><code><var class="keyword varname">column_name</var> FLOAT</code></pre>
+
+    <p class="p">
+      <strong class="ph b">Range:</strong> 1.40129846432481707e-45 .. 3.40282346638528860e+38, positive or negative
+    </p>
+
+    <p class="p">
+      <strong class="ph b">Precision:</strong> 6 to 9 significant digits, depending on usage. The number of significant digits does
+      not depend on the position of the decimal point.
+    </p>
+
+    <p class="p">
+      <strong class="ph b">Representation:</strong> The values are stored in 4 bytes, using
+      <a class="xref" href="https://en.wikipedia.org/wiki/Single-precision_floating-point_format" target="_blank">IEEE 754 Single Precision Binary Floating Point</a> format.
+    </p>
+
+    <p class="p">
+      <strong class="ph b">Conversions:</strong> Impala automatically converts <code class="ph codeph">FLOAT</code> to more precise
+      <code class="ph codeph">DOUBLE</code> values, but not the other way around. You can use <code class="ph codeph">CAST()</code> to convert
+      <code class="ph codeph">FLOAT</code> values to <code class="ph codeph">TINYINT</code>, <code class="ph codeph">SMALLINT</code>, <code class="ph codeph">INT</code>,
+      <code class="ph codeph">BIGINT</code>, <code class="ph codeph">STRING</code>, <code class="ph codeph">TIMESTAMP</code>, or <code class="ph codeph">BOOLEAN</code>.
+      You can use exponential notation in <code class="ph codeph">FLOAT</code> literals or when casting from
+      <code class="ph codeph">STRING</code>, for example <code class="ph codeph">1.0e6</code> to represent one million.
+      <span class="ph">
+          Casting an integer or floating-point value <code class="ph codeph">N</code> to
+        <code class="ph codeph">TIMESTAMP</code> produces a value that is <code class="ph codeph">N</code> seconds past the start of the epoch
+        date (January 1, 1970). By default, the result value represents a date and time in the UTC time zone.
+        If the setting <code class="ph codeph">--use_local_tz_for_unix_timestamp_conversions=true</code> is in effect,
+        the resulting <code class="ph codeph">TIMESTAMP</code> represents a date and time in the local time zone.
+        </span>
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Usage notes:</strong>
+      </p>
+
+
+    <p class="p">
+        Impala does not evaluate NaN (not a number) as equal to any other numeric values,
+        including other NaN values. For example, the following statement, which evaluates equality
+        between two NaN values, returns <code class="ph codeph">false</code>:
+      </p>
+
+<pre class="pre codeblock"><code>
+SELECT CAST('nan' AS FLOAT)=CAST('nan' AS FLOAT);
+</code></pre>
+
+    <p class="p">
+        <strong class="ph b">Examples:</strong>
+      </p>
+
+<pre class="pre codeblock"><code>CREATE TABLE t1 (x FLOAT);
+SELECT CAST(1000.5 AS FLOAT);
+</code></pre>
+
+    <p class="p">
+        <strong class="ph b">Partitioning:</strong> Because fractional values of this type are not always represented precisely, when this
+        type is used for a partition key column, the underlying HDFS directories might not be named exactly as you
+        expect. Prefer to partition on a <code class="ph codeph">DECIMAL</code> column instead.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">HBase considerations:</strong> This data type is fully compatible with HBase tables.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Parquet considerations:</strong> This type is fully compatible with Parquet tables.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Text table considerations:</strong> Values of this type are potentially larger in text tables than in tables
+        using Parquet or other binary formats.
+      </p>
+
+
+
+    <p class="p">
+        <strong class="ph b">Internal details:</strong> Represented in memory as a 4-byte value.
+      </p>
+
+
+
+    <p class="p">
+        <strong class="ph b">Column statistics considerations:</strong> Because this type has a fixed size, the maximum and average size
+        fields are always filled in for column statistics, even before you run the <code class="ph codeph">COMPUTE STATS</code>
+        statement.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Restrictions:</strong>
+      </p>
+
+
+
+    <p class="p">
+        Due to the way arithmetic on <code class="ph codeph">FLOAT</code> and <code class="ph codeph">DOUBLE</code> columns uses
+        high-performance hardware instructions, and distributed queries can perform these operations in different
+        order for each query, results can vary slightly for aggregate function calls such as <code class="ph codeph">SUM()</code>
+        and <code class="ph codeph">AVG()</code> for <code class="ph codeph">FLOAT</code> and <code class="ph codeph">DOUBLE</code> columns, particularly on
+        large data sets where millions or billions of values are summed or averaged. For perfect consistency and
+        repeatability, use the <code class="ph codeph">DECIMAL</code> data type for such operations instead of
+        <code class="ph codeph">FLOAT</code> or <code class="ph codeph">DOUBLE</code>.
+      </p>
+
+    <p class="p">
+        The inability to exactly represent certain floating-point values means that
+        <code class="ph codeph">DECIMAL</code> is sometimes a better choice than <code class="ph codeph">DOUBLE</code>
+        or <code class="ph codeph">FLOAT</code> when precision is critical, particularly when
+        transferring data from other database systems that use different representations
+        or file formats.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Kudu considerations:</strong>
+      </p>
+    <p class="p">
+        Currently, the data types <code class="ph codeph">BOOLEAN</code>, <code class="ph codeph">FLOAT</code>,
+        and <code class="ph codeph">DOUBLE</code> cannot be used for primary key columns in Kudu tables.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Related information:</strong>
+      </p>
+
+    <p class="p">
+      <a class="xref" href="impala_literals.html#numeric_literals">Numeric Literals</a>, <a class="xref" href="impala_math_functions.html#math_functions">Impala Mathematical Functions</a>,
+      <a class="xref" href="impala_double.html#double">DOUBLE Data Type</a>
+    </p>
+  </div>
+<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_datatypes.html">Data Types</a></div></div></nav></article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_functions.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_functions.html b/docs/build3x/html/topics/impala_functions.html
new file mode 100644
index 0000000..44fa0c2
--- /dev/null
+++ b/docs/build3x/html/topics/impala_functions.html
@@ -0,0 +1,162 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_langref.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_math_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_bit_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_conversion_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_datetime_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_conditional_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_string_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_misc_functions.html"><meta name="DC.Relation" scheme="URI" content=
 "../topics/impala_aggregate_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_analytic_functions.html"><meta name="DC.Relation" scheme="URI" content="../topics/impala_udf.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="builtins"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>Impala Built-In Functions</title></head><body id="builtins"><main role="main"><article role="article" aria-labelledby="builtins__title_functions">
+
+  <h1 class="title topictitle1" id="builtins__title_functions">Impala Built-In Functions</h1>
+
+
+
+  <div class="body conbody">
+
+
+
+    <p class="p">
+      Impala supports several categories of built-in functions. These functions let you perform mathematical
+      calculations, string manipulation, date calculations, and other kinds of data transformations directly in
+      <code class="ph codeph">SELECT</code> statements. The built-in functions let a SQL query return results with all
+      formatting, calculating, and type conversions applied, rather than performing time-consuming postprocessing
+      in another application. By applying function calls where practical, you can make a SQL query that is as
+      convenient as an expression in a procedural programming language or a formula in a spreadsheet.
+    </p>
+
+    <p class="p">
+      The categories of functions supported by Impala are:
+    </p>
+
+    <ul class="ul">
+      <li class="li">
+        <a class="xref" href="impala_math_functions.html#math_functions">Impala Mathematical Functions</a>
+      </li>
+
+      <li class="li">
+        <a class="xref" href="impala_conversion_functions.html#conversion_functions">Impala Type Conversion Functions</a>
+      </li>
+
+      <li class="li">
+        <a class="xref" href="impala_datetime_functions.html#datetime_functions">Impala Date and Time Functions</a>
+      </li>
+
+      <li class="li">
+        <a class="xref" href="impala_conditional_functions.html#conditional_functions">Impala Conditional Functions</a>
+      </li>
+
+      <li class="li">
+        <a class="xref" href="impala_string_functions.html#string_functions">Impala String Functions</a>
+      </li>
+
+      <li class="li">
+        Aggregation functions, explained in <a class="xref" href="impala_aggregate_functions.html#aggregate_functions">Impala Aggregate Functions</a>.
+      </li>
+    </ul>
+
+    <p class="p">
+      You call any of these functions through the <code class="ph codeph">SELECT</code> statement. For most functions, you can
+      omit the <code class="ph codeph">FROM</code> clause and supply literal values for any required arguments:
+    </p>
+
+<pre class="pre codeblock"><code>select abs(-1);
++---------+
+| abs(-1) |
++---------+
+| 1       |
++---------+
+
+select concat('The rain ', 'in Spain');
++---------------------------------+
+| concat('the rain ', 'in spain') |
++---------------------------------+
+| The rain in Spain               |
++---------------------------------+
+
+select power(2,5);
++-------------+
+| power(2, 5) |
++-------------+
+| 32          |
++-------------+
+</code></pre>
+
+    <p class="p">
+      When you use a <code class="ph codeph">FROM</code> clause and specify a column name as a function argument, the function is
+      applied for each item in the result set:
+    </p>
+
+
+
+<pre class="pre codeblock"><code>select concat('Country = ',country_code) from all_countries where population &gt; 100000000;
+select round(price) as dollar_value from product_catalog where price between 0.0 and 100.0;
+</code></pre>
+
+    <p class="p">
+      Typically, if any argument to a built-in function is <code class="ph codeph">NULL</code>, the result value is also
+      <code class="ph codeph">NULL</code>:
+    </p>
+
+<pre class="pre codeblock"><code>select cos(null);
++-----------+
+| cos(null) |
++-----------+
+| NULL      |
++-----------+
+
+select power(2,null);
++----------------+
+| power(2, null) |
++----------------+
+| NULL           |
++----------------+
+
+select concat('a',null,'b');
++------------------------+
+| concat('a', null, 'b') |
++------------------------+
+| NULL                   |
++------------------------+
+</code></pre>
+
+    <p class="p">
+        Aggregate functions are a special category with different rules. These functions calculate a return value
+        across all the items in a result set, so they require a <code class="ph codeph">FROM</code> clause in the query:
+      </p>
+
+<pre class="pre codeblock"><code>select count(product_id) from product_catalog;
+select max(height), avg(height) from census_data where age &gt; 20;
+</code></pre>
+
+    <p class="p">
+        Aggregate functions also ignore <code class="ph codeph">NULL</code> values rather than returning a <code class="ph codeph">NULL</code>
+        result. For example, if some rows have <code class="ph codeph">NULL</code> for a particular column, those rows are
+        ignored when computing the <code class="ph codeph">AVG()</code> for that column. Likewise, specifying
+        <code class="ph codeph">COUNT(<var class="keyword varname">col_name</var>)</code> in a query counts only those rows where
+        <var class="keyword varname">col_name</var> contains a non-<code class="ph codeph">NULL</code> value.
+      </p>
+
+    <p class="p">
+      Aggregate functions are a special category with different rules. These functions calculate a return value
+      across all the items in a result set, so they do require a <code class="ph codeph">FROM</code> clause in the query:
+    </p>
+
+
+
+<pre class="pre codeblock"><code>select count(product_id) from product_catalog;
+select max(height), avg(height) from census_data where age &gt; 20;
+</code></pre>
+
+    <p class="p">
+      Aggregate functions also ignore <code class="ph codeph">NULL</code> values rather than returning a <code class="ph codeph">NULL</code>
+      result. For example, if some rows have <code class="ph codeph">NULL</code> for a particular column, those rows are ignored
+      when computing the AVG() for that column. Likewise, specifying <code class="ph codeph">COUNT(col_name)</code> in a query
+      counts only those rows where <code class="ph codeph">col_name</code> contains a non-<code class="ph codeph">NULL</code> value.
+    </p>
+
+    <p class="p">
+      Analytic functions are a variation on aggregate functions. Instead of returning a single value, or an
+      identical value for each group of rows, they can compute values that vary based on a <span class="q">"window"</span> consisting
+      of other rows around them in the result set.
+    </p>
+
+    <p class="p toc"></p>
+
+  </div>
+
+<nav role="navigation" class="related-links"><ul class="ullinks"><li class="link ulchildlink"><strong><a href="../topics/impala_math_functions.html">Impala Mathematical Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_bit_functions.html">Impala Bit Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_conversion_functions.html">Impala Type Conversion Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_datetime_functions.html">Impala Date and Time Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_conditional_functions.html">Impala Conditional Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_string_functions.html">Impala String Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_misc_functions.html">Impala Miscellaneous Functions</
 a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_aggregate_functions.html">Impala Aggregate Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_analytic_functions.html">Impala Analytic Functions</a></strong><br></li><li class="link ulchildlink"><strong><a href="../topics/impala_udf.html">Impala User-Defined Functions (UDFs)</a></strong><br></li></ul><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_langref.html">Impala SQL Language Reference</a></div></div></nav></article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_functions_overview.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_functions_overview.html b/docs/build3x/html/topics/impala_functions_overview.html
new file mode 100644
index 0000000..fef454e
--- /dev/null
+++ b/docs/build3x/html/topics/impala_functions_overview.html
@@ -0,0 +1,109 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_schema_objects.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="functions"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>Overview of Impala Functions</title></head><body id="functions"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">Overview of Impala Functions</h1>
+
+
+
+  <div class="body conbody">
+
+    <p class="p">
+      Functions let you apply arithmetic, string, or other computations and transformations to Impala data. You
+      typically use them in <code class="ph codeph">SELECT</code> lists and <code class="ph codeph">WHERE</code> clauses to filter and format
+      query results so that the result set is exactly what you want, with no further processing needed on the
+      application side.
+    </p>
+
+    <p class="p">
+      Scalar functions return a single result for each input row. See <a class="xref" href="impala_functions.html#builtins">Impala Built-In Functions</a>.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; select name, population from country where continent = 'North America' order by population desc limit 4;
+[localhost:21000] &gt; select upper(name), population from country where continent = 'North America' order by population desc limit 4;
++-------------+------------+
+| upper(name) | population |
++-------------+------------+
+| USA         | 320000000  |
+| MEXICO      | 122000000  |
+| CANADA      | 25000000   |
+| GUATEMALA   | 16000000   |
++-------------+------------+
+</code></pre>
+    <p class="p">
+      Aggregate functions combine the results from multiple rows:
+      either a single result for the entire table, or a separate result for each group of rows.
+      Aggregate functions are frequently used in combination with <code class="ph codeph">GROUP BY</code>
+      and <code class="ph codeph">HAVING</code> clauses in the <code class="ph codeph">SELECT</code> statement.
+      See <a class="xref" href="impala_aggregate_functions.html#aggregate_functions">Impala Aggregate Functions</a>.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; select continent, <strong class="ph b">sum(population)</strong> as howmany from country <strong class="ph b">group by continent</strong> order by howmany desc;
++---------------+------------+
+| continent     | howmany    |
++---------------+------------+
+| Asia          | 4298723000 |
+| Africa        | 1110635000 |
+| Europe        | 742452000  |
+| North America | 565265000  |
+| South America | 406740000  |
+| Oceania       | 38304000   |
++---------------+------------+
+</code></pre>
+
+    <p class="p">
+      User-defined functions (UDFs) let you code your own logic.  They can be either scalar or aggregate functions.
+      UDFs let you implement important business or scientific logic using high-performance code for Impala to automatically parallelize.
+      You can also use UDFs to implement convenience functions to simplify reporting or porting SQL from other database systems.
+      See <a class="xref" href="impala_udf.html#udfs">Impala User-Defined Functions (UDFs)</a>.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; select <strong class="ph b">rot13('Hello world!')</strong> as 'Weak obfuscation';
++------------------+
+| weak obfuscation |
++------------------+
+| Uryyb jbeyq!     |
++------------------+
+[localhost:21000] &gt; select <strong class="ph b">likelihood_of_new_subatomic_particle(sensor1, sensor2, sensor3)</strong> as probability
+                  &gt; from experimental_results group by experiment;
+</code></pre>
+
+    <p class="p">
+      Each function is associated with a specific database. For example, if you issue a <code class="ph codeph">USE somedb</code>
+      statement followed by <code class="ph codeph">CREATE FUNCTION somefunc</code>, the new function is created in the
+      <code class="ph codeph">somedb</code> database, and you could refer to it through the fully qualified name
+      <code class="ph codeph">somedb.somefunc</code>. You could then issue another <code class="ph codeph">USE</code> statement
+      and create a function with the same name in a different database.
+    </p>
+
+    <p class="p">
+      Impala built-in functions are associated with a special database named <code class="ph codeph">_impala_builtins</code>,
+      which lets you refer to them from any database without qualifying the name.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; show databases;
++-------------------------+
+| name                    |
++-------------------------+
+| <strong class="ph b">_impala_builtins</strong>        |
+| analytic_functions      |
+| avro_testing            |
+| data_file_size          |
+...
+[localhost:21000] &gt; show functions in _impala_builtins like '*subs*';
++-------------+-----------------------------------+
+| return type | signature                         |
++-------------+-----------------------------------+
+| STRING      | substr(STRING, BIGINT)            |
+| STRING      | substr(STRING, BIGINT, BIGINT)    |
+| STRING      | substring(STRING, BIGINT)         |
+| STRING      | substring(STRING, BIGINT, BIGINT) |
++-------------+-----------------------------------+
+</code></pre>
+
+    <p class="p">
+      <strong class="ph b">Related statements:</strong> <a class="xref" href="impala_create_function.html#create_function">CREATE FUNCTION Statement</a>,
+      <a class="xref" href="impala_drop_function.html#drop_function">DROP FUNCTION Statement</a>
+    </p>
+  </div>
+<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_schema_objects.html">Impala Schema Objects and Object Names</a></div></div></nav></article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_grant.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_grant.html b/docs/build3x/html/topics/impala_grant.html
new file mode 100644
index 0000000..33b0a45
--- /dev/null
+++ b/docs/build3x/html/topics/impala_grant.html
@@ -0,0 +1,256 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_langref_sql.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="grant"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>GRANT Statement (Impala 2.0 or higher only)</title></head><body id="grant"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">GRANT Statement (<span class="keyword">Impala 2.0</span> or higher only)</h1>
+
+
+
+  <div class="body conbody">
+
+    <p class="p">
+       The
+        <code class="ph codeph">GRANT</code> statement grants a privilege on a specified object
+      to a role or grants a role to a group.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Syntax:</strong>
+      </p>
+
+<pre class="pre codeblock"><code>GRANT ROLE <var class="keyword varname">role_name</var> TO GROUP <var class="keyword varname">group_name</var>
+
+GRANT <var class="keyword varname">privilege</var> ON <var class="keyword varname">object_type</var> <var class="keyword varname">object_name</var>
+   TO [ROLE] <var class="keyword varname">roleName</var>
+   [WITH GRANT OPTION]
+
+<span class="ph" id="grant__privileges">privilege ::= ALL | ALTER | CREATE | DROP | INSERT | REFRESH | SELECT | SELECT(<var class="keyword varname">column_name</var>)</span>
+<span class="ph" id="grant__priv_objs">object_type ::= TABLE | DATABASE | SERVER | URI</span>
+</code></pre>
+
+    <p class="p">
+      Typically, the object name is an identifier. For URIs, it is a string literal.
+    </p>
+
+
+
+    <p class="p">
+        <strong class="ph b">Required privileges:</strong>
+      </p>
+
+    <p class="p">
+      Only administrative users (initially, a predefined set of users
+      specified in the Sentry service configuration file) can use this
+      statement.
+    </p>
+    <p class="p">Only Sentry administrative users can grant roles to a group. </p>
+
+    <p class="p"> The <code class="ph codeph">WITH GRANT OPTION</code> clause allows members of the
+      specified role to issue <code class="ph codeph">GRANT</code> and <code class="ph codeph">REVOKE</code>
+      statements for those same privileges Hence, if a role has the
+        <code class="ph codeph">ALL</code> privilege on a database and the <code class="ph codeph">WITH GRANT
+        OPTION</code> set, users granted that role can execute
+        <code class="ph codeph">GRANT</code>/<code class="ph codeph">REVOKE</code> statements only for that
+      database or child tables of the database. This means a user could revoke
+      the privileges of the user that provided them the <code class="ph codeph">GRANT
+        OPTION</code>. </p>
+
+    <p class="p"> Impala does not currently support revoking only the <code class="ph codeph">WITH GRANT
+        OPTION</code> from a privilege previously granted to a role. To remove
+      the <code class="ph codeph">WITH GRANT OPTION</code>, revoke the privilege and grant it
+      again without the <code class="ph codeph">WITH GRANT OPTION</code> flag. </p>
+
+    <p class="p">
+      The ability to grant or revoke <code class="ph codeph">SELECT</code> privilege on specific columns is available
+      in <span class="keyword">Impala 2.3</span> and higher. See <span class="xref">the documentation for Apache Sentry</span> for details.
+    </p>
+    <p class="p">
+      <strong class="ph b">Usage notes:</strong>
+    </p>
+
+    <p class="p">
+      You can only grant the <code class="ph codeph">ALL</code> privilege to the
+        <code class="ph codeph">URI</code> object. Finer-grained privileges mentioned below on
+      a <code class="ph codeph">URI</code> are not supported.
+    </p>
+
+    <div class="p">
+      Starting in <span class="keyword">Impala 3.0</span>, finer grained privileges
+      are enforced as below.<table class="simpletable frame-all" id="grant__simpletable_kmb_ppn_ndb"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><thead><tr class="sthead">
+          <th class="stentry" id="grant__simpletable_kmb_ppn_ndb__stentry__1">Privilege</th>
+          <th class="stentry" id="grant__simpletable_kmb_ppn_ndb__stentry__2">Scope</th>
+          <th class="stentry" id="grant__simpletable_kmb_ppn_ndb__stentry__3">SQL Allowed to Execute</th>
+        </tr></thead><tbody><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">REFRESH</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">SERVER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">INVALIDATE METADATA</code> on all tables in all
+                databases<p class="p"><code class="ph codeph">REFRESH</code> on all tables and functions
+              in all databases</p></td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">REFRESH</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">DATABASE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">INVALIDATE METADATA</code> on all tables in the
+            named database<p class="p"><code class="ph codeph">REFRESH</code> on all tables and
+              functions in the named database</p></td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">REFRESH</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">TABLE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">INVALIDATE METADATA</code> on the named
+                table<p class="p"><code class="ph codeph">REFRESH</code> on the named
+            table</p></td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">CREATE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">SERVER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">CREATE DATABASE</code> on all
+                databases<p class="p"><code class="ph codeph">CREATE TABLE</code> on all
+            tables</p></td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">CREATE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">DATABASE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">CREATE TABLE</code> on all tables in the named
+            database</td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">DROP</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">SERVER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">DROP DATBASE</code> on all databases<p class="p"><code class="ph codeph">DROP
+                TABLE</code> on all tables</p></td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">DROP</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">DATABASE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">DROP DATABASE</code> on the named
+                database<p class="p"><code class="ph codeph">DROP TABLE</code> on all tables in the
+              named database</p></td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">DROP</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">TABLE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">DROP TABLE</code> on the named table</td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">ALTER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">SERVER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">ALTER TABLE</code> on all tables</td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">ALTER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">DATABASE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">ALTER TABLE</code> on the tables in the named
+            database</td>
+        </tr><tr class="strow">
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__1"><code class="ph codeph">ALTER</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__2"><code class="ph codeph">TABLE</code></td>
+          <td class="stentry" headers="grant__simpletable_kmb_ppn_ndb__stentry__3"><code class="ph codeph">ALTER TABLE</code> on the named table</td>
+        </tr></tbody></table>
+    </div>
+
+    <div class="p">
+      <div class="note note note_note"><span class="note__title notetitle">Note:</span>
+        <div class="p">
+          <ul class="ul">
+            <li class="li">
+              <code class="ph codeph">ALTER TABLE RENAME</code> requires the
+                <code class="ph codeph">ALTER</code> privilege at the <code class="ph codeph">TABLE</code>
+              level and the <code class="ph codeph">CREATE</code> privilege at the
+                <code class="ph codeph">DATABASE</code> level.
+            </li>
+
+            <li class="li">
+              <code class="ph codeph">CREATE TABLE AS SELECT</code> requires the
+                <code class="ph codeph">CREATE</code> privilege on the database that should
+              contain the new table and the <code class="ph codeph">SELECT</code> privilege on
+              the tables referenced in the query portion of the statement.
+            </li>
+
+            <li class="li">
+              <code class="ph codeph">COMPUTE STATS</code> requires  the
+                <code class="ph codeph">ALTER</code> and <code class="ph codeph">SELECT</code> privileges on
+              the target table.
+            </li>
+          </ul>
+        </div>
+      </div>
+    </div>
+
+    <p class="p">
+        <strong class="ph b">Compatibility:</strong>
+      </p>
+
+    <div class="p">
+      <ul class="ul">
+        <li class="li">
+          The Impala <code class="ph codeph">GRANT</code> and <code class="ph codeph">REVOKE</code> statements are available in
+          <span class="keyword">Impala 2.0</span> and later.
+        </li>
+
+        <li class="li">
+          In <span class="keyword">Impala 1.4</span> and later, Impala can make use of any roles and privileges specified by the
+          <code class="ph codeph">GRANT</code> and <code class="ph codeph">REVOKE</code> statements in Hive, when your system is configured to
+          use the Sentry service instead of the file-based policy mechanism.
+        </li>
+
+        <li class="li">
+          The Impala <code class="ph codeph">GRANT</code> and <code class="ph codeph">REVOKE</code> statements for privileges do not require
+          the <code class="ph codeph">ROLE</code> keyword to be repeated before each role name, unlike the equivalent Hive
+          statements.
+        </li>
+
+        <li class="li">
+          Currently, each Impala <code class="ph codeph">GRANT</code> or <code class="ph codeph">REVOKE</code> statement can only grant or
+          revoke a single privilege to or from a single role.
+        </li>
+      </ul>
+    </div>
+
+    <p class="p">
+        <strong class="ph b">Cancellation:</strong> Cannot be cancelled.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">HDFS permissions:</strong> This statement does not touch any HDFS files or directories,
+        therefore no HDFS permissions are required.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Kudu considerations:</strong>
+      </p>
+    <div class="p">
+        Access to Kudu tables must be granted to and revoked from roles with the
+        following considerations:
+        <ul class="ul">
+          <li class="li">
+            Only users with the <code class="ph codeph">ALL</code> privilege on
+              <code class="ph codeph">SERVER</code> can create external Kudu tables.
+          </li>
+          <li class="li">
+            The <code class="ph codeph">ALL</code> privileges on <code class="ph codeph">SERVER</code> is
+            required to specify the <code class="ph codeph">kudu.master_addresses</code>
+            property in the <code class="ph codeph">CREATE TABLE</code> statements for managed
+            tables as well as external tables.
+          </li>
+          <li class="li">
+            Access to Kudu tables is enforced at the table level and at the
+            column level.
+          </li>
+          <li class="li">
+            The <code class="ph codeph">SELECT</code>- and <code class="ph codeph">INSERT</code>-specific
+            permissions are supported.
+          </li>
+          <li class="li">
+            The <code class="ph codeph">DELETE</code>, <code class="ph codeph">UPDATE</code>, and
+            <code class="ph codeph">UPSERT</code> operations require the <code class="ph codeph">ALL</code>
+            privilege.
+          </li>
+        </ul>
+        Because non-SQL APIs can access Kudu data without going through Sentry
+        authorization, currently the Sentry support is considered preliminary
+        and subject to change.
+      </div>
+
+    <p class="p">
+        <strong class="ph b">Related information:</strong>
+      </p>
+
+    <p class="p">
+      <a class="xref" href="impala_authorization.html#authorization">Enabling Sentry Authorization for Impala</a>, <a class="xref" href="impala_revoke.html#revoke">REVOKE Statement (Impala 2.0 or higher only)</a>,
+      <a class="xref" href="impala_create_role.html#create_role">CREATE ROLE Statement (Impala 2.0 or higher only)</a>, <a class="xref" href="impala_drop_role.html#drop_role">DROP ROLE Statement (Impala 2.0 or higher only)</a>,
+      <a class="xref" href="impala_show.html#show">SHOW Statement</a>
+    </p>
+  </div>
+<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_langref_sql.html">Impala SQL Statements</a></div></div></nav></article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_group_by.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_group_by.html b/docs/build3x/html/topics/impala_group_by.html
new file mode 100644
index 0000000..bcc6c1d
--- /dev/null
+++ b/docs/build3x/html/topics/impala_group_by.html
@@ -0,0 +1,140 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_select.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="group_by"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>GROUP BY Clause</title></head><body id="group_by"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">GROUP BY Clause</h1>
+
+
+  <div class="body conbody">
+
+    <p class="p">
+      Specify the <code class="ph codeph">GROUP BY</code> clause in queries that use aggregation functions, such as
+      <code class="ph codeph"><a class="xref" href="impala_count.html#count">COUNT()</a></code>,
+      <code class="ph codeph"><a class="xref" href="impala_sum.html#sum">SUM()</a></code>,
+      <code class="ph codeph"><a class="xref" href="impala_avg.html#avg">AVG()</a></code>,
+      <code class="ph codeph"><a class="xref" href="impala_min.html#min">MIN()</a></code>, and
+      <code class="ph codeph"><a class="xref" href="impala_max.html#max">MAX()</a></code>. Specify in the
+      <code class="ph codeph"><a class="xref" href="impala_group_by.html#group_by">GROUP BY</a></code> clause the names of all the
+      columns that do not participate in the aggregation operation.
+    </p>
+
+
+    <p class="p">
+        <strong class="ph b">Complex type considerations:</strong>
+      </p>
+
+    <p class="p">
+      In <span class="keyword">Impala 2.3</span> and higher, the complex data types <code class="ph codeph">STRUCT</code>,
+      <code class="ph codeph">ARRAY</code>, and <code class="ph codeph">MAP</code> are available. These columns cannot
+      be referenced directly in the <code class="ph codeph">ORDER BY</code> clause.
+      When you query a complex type column, you use join notation to <span class="q">"unpack"</span> the elements
+      of the complex type, and within the join query you can include an <code class="ph codeph">ORDER BY</code>
+      clause to control the order in the result set of the scalar elements from the complex type.
+      See <a class="xref" href="impala_complex_types.html#complex_types">Complex Types (Impala 2.3 or higher only)</a> for details about Impala support for complex types.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Zero-length strings:</strong> For purposes of clauses such as <code class="ph codeph">DISTINCT</code> and <code class="ph codeph">GROUP
+        BY</code>, Impala considers zero-length strings (<code class="ph codeph">""</code>), <code class="ph codeph">NULL</code>, and space
+        to all be different values.
+      </p>
+
+    <p class="p">
+        <strong class="ph b">Examples:</strong>
+      </p>
+
+    <p class="p">
+      For example, the following query finds the 5 items that sold the highest total quantity (using the
+      <code class="ph codeph">SUM()</code> function, and also counts the number of sales transactions for those items (using the
+      <code class="ph codeph">COUNT()</code> function). Because the column representing the item IDs is not used in any
+      aggregation functions, we specify that column in the <code class="ph codeph">GROUP BY</code> clause.
+    </p>
+
+<pre class="pre codeblock"><code>select
+  <strong class="ph b">ss_item_sk</strong> as Item,
+  <strong class="ph b">count</strong>(ss_item_sk) as Times_Purchased,
+  <strong class="ph b">sum</strong>(ss_quantity) as Total_Quantity_Purchased
+from store_sales
+  <strong class="ph b">group by ss_item_sk</strong>
+  order by sum(ss_quantity) desc
+  limit 5;
++-------+-----------------+--------------------------+
+| item  | times_purchased | total_quantity_purchased |
++-------+-----------------+--------------------------+
+| 9325  | 372             | 19072                    |
+| 4279  | 357             | 18501                    |
+| 7507  | 371             | 18475                    |
+| 5953  | 369             | 18451                    |
+| 16753 | 375             | 18446                    |
++-------+-----------------+--------------------------+</code></pre>
+
+    <p class="p">
+      The <code class="ph codeph">HAVING</code> clause lets you filter the results of aggregate functions, because you cannot
+      refer to those expressions in the <code class="ph codeph">WHERE</code> clause. For example, to find the 5 lowest-selling
+      items that were included in at least 100 sales transactions, we could use this query:
+    </p>
+
+<pre class="pre codeblock"><code>select
+  <strong class="ph b">ss_item_sk</strong> as Item,
+  <strong class="ph b">count</strong>(ss_item_sk) as Times_Purchased,
+  <strong class="ph b">sum</strong>(ss_quantity) as Total_Quantity_Purchased
+from store_sales
+  <strong class="ph b">group by ss_item_sk</strong>
+  <strong class="ph b">having times_purchased &gt;= 100</strong>
+  order by sum(ss_quantity)
+  limit 5;
++-------+-----------------+--------------------------+
+| item  | times_purchased | total_quantity_purchased |
++-------+-----------------+--------------------------+
+| 13943 | 105             | 4087                     |
+| 2992  | 101             | 4176                     |
+| 4773  | 107             | 4204                     |
+| 14350 | 103             | 4260                     |
+| 11956 | 102             | 4275                     |
++-------+-----------------+--------------------------+</code></pre>
+
+    <p class="p">
+      When performing calculations involving scientific or financial data, remember that columns with type
+      <code class="ph codeph">FLOAT</code> or <code class="ph codeph">DOUBLE</code> are stored as true floating-point numbers, which cannot
+      precisely represent every possible fractional value. Thus, if you include a <code class="ph codeph">FLOAT</code> or
+      <code class="ph codeph">DOUBLE</code> column in a <code class="ph codeph">GROUP BY</code> clause, the results might not precisely match
+      literal values in your query or from an original Text data file. Use rounding operations, the
+      <code class="ph codeph">BETWEEN</code> operator, or another arithmetic technique to match floating-point values that are
+      <span class="q">"near"</span> literal values you expect. For example, this query on the <code class="ph codeph">ss_wholesale_cost</code>
+      column returns cost values that are close but not identical to the original figures that were entered as
+      decimal fractions.
+    </p>
+
+<pre class="pre codeblock"><code>select ss_wholesale_cost, avg(ss_quantity * ss_sales_price) as avg_revenue_per_sale
+  from sales
+  group by ss_wholesale_cost
+  order by avg_revenue_per_sale desc
+  limit 5;
++-------------------+----------------------+
+| ss_wholesale_cost | avg_revenue_per_sale |
++-------------------+----------------------+
+| 96.94000244140625 | 4454.351539300434    |
+| 95.93000030517578 | 4423.119941283189    |
+| 98.37999725341797 | 4332.516490316291    |
+| 97.97000122070312 | 4330.480601655014    |
+| 98.52999877929688 | 4291.316953108634    |
++-------------------+----------------------+</code></pre>
+
+    <p class="p">
+      Notice how wholesale cost values originally entered as decimal fractions such as <code class="ph codeph">96.94</code> and
+      <code class="ph codeph">98.38</code> are slightly larger or smaller in the result set, due to precision limitations in the
+      hardware floating-point types. The imprecise representation of <code class="ph codeph">FLOAT</code> and
+      <code class="ph codeph">DOUBLE</code> values is why financial data processing systems often store currency using data types
+      that are less space-efficient but avoid these types of rounding errors.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Related information:</strong>
+      </p>
+    <p class="p">
+      <a class="xref" href="impala_select.html#select">SELECT Statement</a>,
+      <a class="xref" href="impala_aggregate_functions.html#aggregate_functions">Impala Aggregate Functions</a>
+    </p>
+
+  </div>
+<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_select.html">SELECT Statement</a></div></div></nav></article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_group_concat.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_group_concat.html b/docs/build3x/html/topics/impala_group_concat.html
new file mode 100644
index 0000000..3a390c0
--- /dev/null
+++ b/docs/build3x/html/topics/impala_group_concat.html
@@ -0,0 +1,141 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_aggregate_functions.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="group_concat"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>GROUP_CONCAT Function</title></head><body id="group_concat"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">GROUP_CONCAT Function</h1>
+
+
+
+  <div class="body conbody">
+
+    <p class="p">
+
+      An aggregate function that returns a single string representing the argument value concatenated together for
+      each row of the result set. If the optional separator string is specified, the separator is added between
+      each pair of concatenated values. The default separator is a comma followed by a space.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Syntax:</strong>
+      </p>
+
+<pre class="pre codeblock"><code>GROUP_CONCAT([ALL<span class="ph"> | DISTINCT</span>] <var class="keyword varname">expression</var> [, <var class="keyword varname">separator</var>])</code></pre>
+
+    <p class="p">
+        <strong class="ph b">Usage notes:</strong> <code class="ph codeph">concat()</code> and <code class="ph codeph">concat_ws()</code> are appropriate for
+        concatenating the values of multiple columns within the same row, while <code class="ph codeph">group_concat()</code>
+        joins together values from different rows.
+      </p>
+
+    <p class="p">
+      By default, returns a single string covering the whole result set. To include other columns or values in the
+      result set, or to produce multiple concatenated strings for subsets of rows, include a <code class="ph codeph">GROUP
+      BY</code> clause in the query.
+    </p>
+
+    <p class="p">
+      <strong class="ph b">Return type:</strong> <code class="ph codeph">STRING</code>
+    </p>
+
+    <p class="p">
+        This function cannot be used in an analytic context. That is, the <code class="ph codeph">OVER()</code> clause is not allowed at all with this function.
+      </p>
+
+    <p class="p">
+      Currently, Impala returns an error if the result value grows larger than 1 GiB.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Examples:</strong>
+      </p>
+
+    <p class="p">
+      The following examples illustrate various aspects of the <code class="ph codeph">GROUP_CONCAT()</code> function.
+    </p>
+
+    <p class="p">
+      You can call the function directly on a <code class="ph codeph">STRING</code> column. To use it with a numeric column, cast
+      the value to <code class="ph codeph">STRING</code>.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; create table t1 (x int, s string);
+[localhost:21000] &gt; insert into t1 values (1, "one"), (3, "three"), (2, "two"), (1, "one");
+[localhost:21000] &gt; select group_concat(s) from t1;
++----------------------+
+| group_concat(s)      |
++----------------------+
+| one, three, two, one |
++----------------------+
+[localhost:21000] &gt; select group_concat(cast(x as string)) from t1;
++---------------------------------+
+| group_concat(cast(x as string)) |
++---------------------------------+
+| 1, 3, 2, 1                      |
++---------------------------------+
+</code></pre>
+
+    <p class="p">
+      Specify the <code class="ph codeph">DISTINCT</code> keyword to eliminate duplicate values from
+      the concatenated result:
+    </p>
+
+<pre class="pre codeblock"><code>
+[localhost:21000] &gt; select group_concat(distinct s) from t1;
++--------------------------+
+| group_concat(distinct s) |
++--------------------------+
+| three, two, one          |
++--------------------------+
+</code></pre>
+
+    <p class="p">
+      The optional separator lets you format the result in flexible ways. The separator can be an arbitrary string
+      expression, not just a single character.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; select group_concat(s,"|") from t1;
++----------------------+
+| group_concat(s, '|') |
++----------------------+
+| one|three|two|one    |
++----------------------+
+[localhost:21000] &gt; select group_concat(s,'---') from t1;
++-------------------------+
+| group_concat(s, '---')  |
++-------------------------+
+| one---three---two---one |
++-------------------------+
+</code></pre>
+
+    <p class="p">
+      The default separator is a comma followed by a space. To get a comma-delimited result without extra spaces,
+      specify a delimiter character that is only a comma.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; select group_concat(s,',') from t1;
++----------------------+
+| group_concat(s, ',') |
++----------------------+
+| one,three,two,one    |
++----------------------+
+</code></pre>
+
+    <p class="p">
+      Including a <code class="ph codeph">GROUP BY</code> clause lets you produce a different concatenated result for each group
+      in the result set. In this example, the only <code class="ph codeph">X</code> value that occurs more than once is
+      <code class="ph codeph">1</code>, so that is the only row in the result set where <code class="ph codeph">GROUP_CONCAT()</code> returns a
+      delimited value. For groups containing a single value, <code class="ph codeph">GROUP_CONCAT()</code> returns the original
+      value of its <code class="ph codeph">STRING</code> argument.
+    </p>
+
+<pre class="pre codeblock"><code>[localhost:21000] &gt; select x, group_concat(s) from t1 group by x;
++---+-----------------+
+| x | group_concat(s) |
++---+-----------------+
+| 2 | two             |
+| 3 | three           |
+| 1 | one, one        |
++---+-----------------+
+</code></pre>
+  </div>
+<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_aggregate_functions.html">Impala Aggregate Functions</a></div></div></nav></article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_hadoop.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_hadoop.html b/docs/build3x/html/topics/impala_hadoop.html
new file mode 100644
index 0000000..30c0a97
--- /dev/null
+++ b/docs/build3x/html/topics/impala_hadoop.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_concepts.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="intro_hadoop"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>How Impala Fits Into the Hadoop Ecosystem</title></head><body id="intro_hadoop"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">How Impala Fits Into the Hadoop Ecosystem</h1>
+
+
+
+  <div class="body conbody">
+
+    <p class="p">
+      Impala makes use of many familiar components within the Hadoop ecosystem. Impala can interchange data with
+      other Hadoop components, as both a consumer and a producer, so it can fit in flexible ways into your ETL and
+      ELT pipelines.
+    </p>
+
+    <p class="p toc inpage"></p>
+  </div>
+
+  <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_concepts.html">Impala Concepts and Architecture</a></div></div></nav><article class="topic concept nested1" aria-labelledby="ariaid-title2" id="intro_hadoop__intro_hive">
+
+    <h2 class="title topictitle2" id="ariaid-title2">How Impala Works with Hive</h2>
+
+    <div class="body conbody">
+
+      <p class="p">
+        A major Impala goal is to make SQL-on-Hadoop operations fast and efficient enough to appeal to new
+        categories of users and open up Hadoop to new types of use cases. Where practical, it makes use of existing
+        Apache Hive infrastructure that many Hadoop users already have in place to perform long-running,
+        batch-oriented SQL queries.
+      </p>
+
+      <p class="p">
+        In particular, Impala keeps its table definitions in a traditional MySQL or PostgreSQL database known as
+        the <strong class="ph b">metastore</strong>, the same database where Hive keeps this type of data. Thus, Impala can access tables
+        defined or loaded by Hive, as long as all columns use Impala-supported data types, file formats, and
+        compression codecs.
+      </p>
+
+      <p class="p">
+        The initial focus on query features and performance means that Impala can read more types of data with the
+        <code class="ph codeph">SELECT</code> statement than it can write with the <code class="ph codeph">INSERT</code> statement. To query
+        data using the Avro, RCFile, or SequenceFile <a class="xref" href="impala_file_formats.html#file_formats">file
+        formats</a>, you load the data using Hive.
+      </p>
+
+      <p class="p">
+        The Impala query optimizer can also make use of <a class="xref" href="impala_perf_stats.html#perf_table_stats">table
+        statistics</a> and <a class="xref" href="impala_perf_stats.html#perf_column_stats">column statistics</a>.
+        Originally, you gathered this information with the <code class="ph codeph">ANALYZE TABLE</code> statement in Hive; in
+        Impala 1.2.2 and higher, use the Impala <code class="ph codeph"><a class="xref" href="impala_compute_stats.html#compute_stats">COMPUTE
+        STATS</a></code> statement instead. <code class="ph codeph">COMPUTE STATS</code> requires less setup, is more
+        reliable, and does not require switching back and forth between <span class="keyword cmdname">impala-shell</span>
+        and the Hive shell.
+      </p>
+    </div>
+  </article>
+
+  <article class="topic concept nested1" aria-labelledby="ariaid-title3" id="intro_hadoop__intro_metastore">
+
+    <h2 class="title topictitle2" id="ariaid-title3">Overview of Impala Metadata and the Metastore</h2>
+
+
+    <div class="body conbody">
+
+      <p class="p">
+        As discussed in <a class="xref" href="impala_hadoop.html#intro_hive">How Impala Works with Hive</a>, Impala maintains information about table
+        definitions in a central database known as the <strong class="ph b">metastore</strong>. Impala also tracks other metadata for the
+        low-level characteristics of data files:
+      </p>
+
+      <ul class="ul">
+        <li class="li">
+          The physical locations of blocks within HDFS.
+        </li>
+      </ul>
+
+      <p class="p">
+        For tables with a large volume of data and/or many partitions, retrieving all the metadata for a table can
+        be time-consuming, taking minutes in some cases. Thus, each Impala node caches all of this metadata to
+        reuse for future queries against the same table.
+      </p>
+
+      <p class="p">
+        If the table definition or the data in the table is updated, all other Impala daemons in the cluster must
+        receive the latest metadata, replacing the obsolete cached metadata, before issuing a query against that
+        table. In Impala 1.2 and higher, the metadata update is automatic, coordinated through the
+        <span class="keyword cmdname">catalogd</span> daemon, for all DDL and DML statements issued through Impala. See
+        <a class="xref" href="impala_components.html#intro_catalogd">The Impala Catalog Service</a> for details.
+      </p>
+
+      <p class="p">
+        For DDL and DML issued through Hive, or changes made manually to files in HDFS, you still use the
+        <code class="ph codeph">REFRESH</code> statement (when new data files are added to existing tables) or the
+        <code class="ph codeph">INVALIDATE METADATA</code> statement (for entirely new tables, or after dropping a table,
+        performing an HDFS rebalance operation, or deleting data files). Issuing <code class="ph codeph">INVALIDATE
+        METADATA</code> by itself retrieves metadata for all the tables tracked by the metastore. If you know
+        that only specific tables have been changed outside of Impala, you can issue <code class="ph codeph">REFRESH
+        <var class="keyword varname">table_name</var></code> for each affected table to only retrieve the latest metadata for
+        those tables.
+      </p>
+    </div>
+  </article>
+
+  <article class="topic concept nested1" aria-labelledby="ariaid-title4" id="intro_hadoop__intro_hdfs">
+
+    <h2 class="title topictitle2" id="ariaid-title4">How Impala Uses HDFS</h2>
+
+
+    <div class="body conbody">
+
+      <p class="p">
+        Impala uses the distributed filesystem HDFS as its primary data storage medium. Impala relies on the
+        redundancy provided by HDFS to guard against hardware or network outages on individual nodes. Impala table
+        data is physically represented as data files in HDFS, using familiar HDFS file formats and compression
+        codecs. When data files are present in the directory for a new table, Impala reads them all, regardless of
+        file name. New data is added in files with names controlled by Impala.
+      </p>
+    </div>
+  </article>
+
+  <article class="topic concept nested1" aria-labelledby="ariaid-title5" id="intro_hadoop__intro_hbase">
+
+    <h2 class="title topictitle2" id="ariaid-title5">How Impala Uses HBase</h2>
+
+
+    <div class="body conbody">
+
+      <p class="p">
+        HBase is an alternative to HDFS as a storage medium for Impala data. It is a database storage system built
+        on top of HDFS, without built-in SQL support. Many Hadoop users already have it configured and store large
+        (often sparse) data sets in it. By defining tables in Impala and mapping them to equivalent tables in
+        HBase, you can query the contents of the HBase tables through Impala, and even perform join queries
+        including both Impala and HBase tables. See <a class="xref" href="impala_hbase.html#impala_hbase">Using Impala to Query HBase Tables</a> for details.
+      </p>
+    </div>
+  </article>
+</article></main></body></html>

http://git-wip-us.apache.org/repos/asf/impala/blob/fae51ec2/docs/build3x/html/topics/impala_having.html
----------------------------------------------------------------------
diff --git a/docs/build3x/html/topics/impala_having.html b/docs/build3x/html/topics/impala_having.html
new file mode 100644
index 0000000..dd255ab
--- /dev/null
+++ b/docs/build3x/html/topics/impala_having.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html
+  SYSTEM "about:legacy-compat">
+<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="DC.Relation" scheme="URI" content="../topics/impala_select.html"><meta name="prodname" content="Impala"><meta name="prodname" content="Impala"><meta name="version" content="Impala 3.0.x"><meta name="version" content="Impala 3.0.x"><meta name="DC.Format" content="XHTML"><meta name="DC.Identifier" content="having"><link rel="stylesheet" type="text/css" href="../commonltr.css"><title>HAVING Clause</title></head><body id="having"><main role="main"><article role="article" aria-labelledby="ariaid-title1">
+
+  <h1 class="title topictitle1" id="ariaid-title1">HAVING Clause</h1>
+
+
+  <div class="body conbody">
+
+    <p class="p">
+      Performs a filter operation on a <code class="ph codeph">SELECT</code> query, by examining the results of aggregation
+      functions rather than testing each individual table row. Therefore, it is always used in conjunction with a
+      function such as <code class="ph codeph"><a class="xref" href="impala_count.html#count">COUNT()</a></code>,
+      <code class="ph codeph"><a class="xref" href="impala_sum.html#sum">SUM()</a></code>,
+      <code class="ph codeph"><a class="xref" href="impala_avg.html#avg">AVG()</a></code>,
+      <code class="ph codeph"><a class="xref" href="impala_min.html#min">MIN()</a></code>, or
+      <code class="ph codeph"><a class="xref" href="impala_max.html#max">MAX()</a></code>, and typically with the
+      <code class="ph codeph"><a class="xref" href="impala_group_by.html#group_by">GROUP BY</a></code> clause also.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Restrictions:</strong>
+      </p>
+
+    <p class="p">
+      The filter expression in the <code class="ph codeph">HAVING</code> clause cannot include a scalar subquery.
+    </p>
+
+    <p class="p">
+        <strong class="ph b">Related information:</strong>
+      </p>
+    <p class="p">
+      <a class="xref" href="impala_select.html#select">SELECT Statement</a>,
+      <a class="xref" href="impala_group_by.html#group_by">GROUP BY Clause</a>,
+      <a class="xref" href="impala_aggregate_functions.html#aggregate_functions">Impala Aggregate Functions</a>
+    </p>
+
+  </div>
+<nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_select.html">SELECT Statement</a></div></div></nav></article></main></body></html>