This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/drill-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new c282141 Automatic Site Publish by Buildbot
c282141 is described below
commit c28214107f5e569e8d0dc8f23ea46e77d8190b7a
Author: buildbot <[email protected]>
AuthorDate: Thu Oct 21 09:55:18 2021 +0000
Automatic Site Publish by Buildbot
---
.../connect-a-data-source-introduction/index.html | 9 +++
.../date-time-functions-and-arithmetic/index.html | 93 ++++++++++++----------
output/docs/rdbms-storage-plugin/index.html | 8 +-
output/feed.xml | 4 +-
.../connect-a-data-source-introduction/index.html | 9 +++
.../date-time-functions-and-arithmetic/index.html | 93 ++++++++++++----------
output/zh/docs/rdbms-storage-plugin/index.html | 8 +-
output/zh/feed.xml | 4 +-
8 files changed, 130 insertions(+), 98 deletions(-)
diff --git a/output/docs/connect-a-data-source-introduction/index.html
b/output/docs/connect-a-data-source-introduction/index.html
index 231205d..f1e3904 100644
--- a/output/docs/connect-a-data-source-introduction/index.html
+++ b/output/docs/connect-a-data-source-introduction/index.html
@@ -1434,6 +1434,15 @@
<li>You can specify the storage plugin when starting Drill.</li>
</ul>
+<p>As a general principle, Drill aims to make storage plugins lazy about
connecting to external data sources. This means that you should normally be
able to add and enable a storage configuration based on some external data
source even if that data source is not available to accept queries at the time.
Another consequence of lazy connecting is that Drill restarts, which reload
all enabled storage plugins, will not kick a configuration into the disabled
state if the corresponding extern [...]
+
+<p>A related principle is that Drill storage plugins should aim, by default,
to be thrifty about how many connections they make and maintain for the
following reasons.</p>
+
+<ul>
+ <li>Each Drillbit participating in a query involving an external data source
must initiate its own outbound connection(s).</li>
+ <li>In the OLAP regime, the cost of bringing up a new connection is
typically negligible compared to the total cost of an analytical query.</li>
+</ul>
+
<div class="doc-nav">
diff --git a/output/docs/date-time-functions-and-arithmetic/index.html
b/output/docs/date-time-functions-and-arithmetic/index.html
index 80d97ce..ef28240 100644
--- a/output/docs/date-time-functions-and-arithmetic/index.html
+++ b/output/docs/date-time-functions-and-arithmetic/index.html
@@ -1506,10 +1506,6 @@
<td><a
href="/docs/date-time-functions-and-arithmetic/#timestampdiff">TIMESTAMPDIFF</a>*</td>
<td>Inferred based on unit of time</td>
</tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
</tbody>
</table>
@@ -1582,11 +1578,11 @@
<li><code class="language-plaintext highlighter-rouge">DATE_ADD(column,
interval expr)</code></li>
</ul>
-<p><em>keyword</em> is the word date, time, or timestamp.<br />
-<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.<br />
-<em>integer</em> is a number of days to add to the date/time.<br />
-<em>column</em> is date, time, or timestamp data in a data source column.<br />
-<em>interval</em> is the keyword interval.<br />
+<p><em>keyword</em> is the word date, time, or timestamp.
+<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.
+<em>integer</em> is a number of days to add to the date/time.
+<em>column</em> is date, time, or timestamp data in a data source column.
+<em>interval</em> is the keyword interval.
<em>expr</em> is an interval expression, such as the name of a data source
column containing interval data.</p>
<h3 id="date_add-examples">DATE_ADD Examples</h3>
@@ -1702,7 +1698,7 @@
|---------------|
| 01:26:40.100 |
|---------------|
-1 row selected (0.106 seconds)
+1 row selected (0.106 seconds)
</code></pre></div></div>
<h2 id="date_diff">DATE_DIFF</h2>
@@ -1715,7 +1711,7 @@
| EXPR$0 | EXPR$1 |
|---------|----------------------------------------------|
| -346 | 2019-01-15 14:54:21.455 America/Los_Angeles |
-|---------|----------------------------------------------|
+|---------|----------------------------------------------|
</code></pre></div></div>
<p>However, for date and timestamp values, use the <code
class="language-plaintext highlighter-rouge">DATE_DIFF</code> function and
convert the interval returned to a number, as shown:</p>
@@ -1736,11 +1732,11 @@
<li><code class="language-plaintext highlighter-rouge">DATE_DIFF(column,
interval expr)</code></li>
</ul>
-<p><em>keyword</em> is the word date, time, or timestamp.<br />
-<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.<br />
-<em>integer</em> is a number of days to subtract from the date/time.<br />
-<em>column</em> is date, time, or timestamp data in a data source column.<br />
-<em>interval</em> is the keyword interval.<br />
+<p><em>keyword</em> is the word date, time, or timestamp.
+<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.
+<em>integer</em> is a number of days to subtract from the date/time.
+<em>column</em> is date, time, or timestamp data in a data source column.
+<em>interval</em> is the keyword interval.
<em>expr</em> is an interval expression, such as the name of a data source
column containing interval data.</p>
<h3 id="date_diff-examples">DATE_DIFF Examples</h3>
@@ -1755,21 +1751,21 @@
| EXPR$0 |
|-------------|
| 2015-05-13 |
-|-------------|
+|-------------|
</code></pre></div></div>
<p><strong>DATE_DIFF(keyword literal, interval expr) Syntax
Example</strong></p>
<p>Using the example data from the <a
href="/docs/data-type-conversion/#casting-intervals">“Casting Intervals”</a>
section, subtract intervals from the <code class="language-plaintext
highlighter-rouge">intervals.json</code> file from a literal timestamp. Create
an interval expression that casts the INTERVALDAY_col column, which contains
P1D, P2D, and P3D, to a timestamp.</p>
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>SELECT DATE_DIFF(timestamp '2015-04-15 22:55:55',
CAST(INTERVALDAY_col as interval second)) FROM dfs.`/home/bee/intervals.json`;
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>SELECT DATE_DIFF(timestamp '2015-04-15 22:55:55',
CAST(INTERVALDAY_col as interval second)) FROM dfs.`/home/bee/intervals.json`;
|------------------------|
| EXPR$0 |
|------------------------|
| 2015-04-14 22:55:55.0 |
| 2015-04-13 22:55:55.0 |
| 2015-04-12 22:55:55.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p>The query output is the difference of the timestamp and 1, 2, and 3 days
corresponding to P1D, P2D, and P3D.</p>
@@ -1783,7 +1779,7 @@
| a |
|-------------|
| 1961-08-24 |
-|-------------|
+|-------------|
</code></pre></div></div>
<p><strong>DATE_DIFF(column, interval expr) Syntax Example</strong></p>
@@ -1798,7 +1794,7 @@
|------------------------|
| 1995-12-31 14:00:00.0 |
| 1997-12-31 14:00:00.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p><strong>DATE_DIFF(keyword literal, integer) Syntax Example</strong></p>
@@ -1810,7 +1806,7 @@
| EXPR$0 |
|------------------------|
| 2014-02-15 22:55:55.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p>Subtract 1 day 2 and 1/2 hours and 45.100 seconds from the time
22:55:55.</p>
@@ -1820,7 +1816,7 @@
| EXPR$0 |
|---------------|
| 20:25:09.900 |
-|---------------|
+|---------------|
</code></pre></div></div>
<h2 id="date_part">DATE_PART</h2>
@@ -1830,7 +1826,7 @@
<p><code class="language-plaintext highlighter-rouge">date_part(keyword,
expression)</code></p>
-<p><em>keyword</em> is year, month, day, hour, minute, or second enclosed in
single quotation marks.<br />
+<p><em>keyword</em> is year, month, day, hour, minute, or second enclosed in
single quotation marks.
<em>expression</em> is date, time, timestamp, or interval literal enclosed in
single quotation marks.</p>
<h3 id="date_part-usage-notes">DATE_PART Usage Notes</h3>
@@ -1871,16 +1867,16 @@ SELECT DATE_PART('hour', '23:14:30.076') FROM
(VALUES(1));
<h3 id="date_sub-syntax">DATE_SUB Syntax</h3>
-<p><code class="language-plaintext highlighter-rouge">DATE_SUB(keyword
literal, integer)</code><br />
-<code class="language-plaintext highlighter-rouge">DATE_SUB(keyword literal,
interval expr)</code><br />
-<code class="language-plaintext highlighter-rouge">DATE_SUB(column,
integer)</code><br />
+<p><code class="language-plaintext highlighter-rouge">DATE_SUB(keyword
literal, integer)</code>
+<code class="language-plaintext highlighter-rouge">DATE_SUB(keyword literal,
interval expr)</code>
+<code class="language-plaintext highlighter-rouge">DATE_SUB(column,
integer)</code>
<code class="language-plaintext highlighter-rouge">DATE_SUB(column, interval
expr)</code></p>
-<p><em>keyword</em> is the word date, time, or timestamp.<br />
-<em>literal</em> is a date, time, or timestamp literal. For example, a date in
yyyy-mm-dd format enclosed in single quotation marks. <br />
-<em>integer</em> is a number of days to subtract from the date, time, or
timestamp.<br />
-<em>column</em> is date, time, or timestamp data in the data source.<br />
-<em>interval</em> is the keyword interval.<br />
+<p><em>keyword</em> is the word date, time, or timestamp.
+<em>literal</em> is a date, time, or timestamp literal. For example, a date in
yyyy-mm-dd format enclosed in single quotation marks.
+<em>integer</em> is a number of days to subtract from the date, time, or
timestamp.
+<em>column</em> is date, time, or timestamp data in the data source.
+<em>interval</em> is the keyword interval.
<em>expr</em> is an interval expression, such as the name of a data source
column containing interval data.</p>
<h3 id="date_sub-examples">DATE_SUB Examples</h3>
@@ -2176,8 +2172,8 @@ SELECT DATE_PART('hour', '23:14:30.076') FROM (VALUES(1));
<h3 id="unix_timestamp-syntax">UNIX_TIMESTAMP Syntax</h3>
-<p><code class="language-plaintext
highlighter-rouge">UNIX_TIMESTAMP()</code><br />
-<code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP(string
date)</code><br />
+<p><code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP()</code>
+<code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP(string
date)</code>
<code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP(string date,
string pattern)</code></p>
<p>These functions perform the following operations, respectively:</p>
@@ -2218,7 +2214,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
|-------------|
| 1432912733 |
|-------------|
-1 row selected (0.171 seconds)
+1 row selected (0.171 seconds)
</code></pre></div></div>
<h2 id="nearestdate">NEARESTDATE</h2>
@@ -2267,13 +2263,28 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| 1995-01-01 00:00:00.0 | 12 |
| 1997-01-01 00:00:00.0 | 74 |
| 1993-01-01 00:00:00.0 | 4 |
-|-----------------------|-------|
+|-----------------------|-------|
</code></pre></div></div>
<p>The following example applies the NEARESTDATE function to a timestamp value
(2019-02-01 07:22:00) and returns the timestamp value for each time unit
indicated:</p>
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>SELECT nearestDate( TO_TIMESTAMP('2019-02-01 07:22:00',
'yyyy-MM-dd HH:mm:ss'), 'YEAR') AS nearest_year, nearestDate(
TO_TIMESTAMP('2019-02-01 07:22:00', 'yyyy-MM-dd HH:mm:ss'), 'QUARTER') AS
nearest_quarter, nearestDate( TO_TIMESTAMP('2019-02-15 07:22:00', 'yyyy-MM-dd
HH:mm:ss'), 'MONTH') AS nearest_month, nearestDate( TO_TIMESTAMP('2019-02-15
07:22:00', 'yyyy-MM-dd HH:mm:ss'), 'DAY') A [...]
-|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
+<div class="language-sql highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="k">SELECT</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-01 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'YEAR'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_year</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-01 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'QUARTER'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_quarter</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'MONTH'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_month</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'DAY'</span><span class="p">)</span> <span class="k">AS</span> <span
class="n">nearest_day</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'WEEK_SUNDAY'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_week_sunday</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'WEEK_MONDAY'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_week_monday</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'HOUR'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_hour</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:42:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'HALF_HOUR'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_half_hour</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:48:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'QUARTER_HOUR'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_quarter_hour</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'MINUTE'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_minute</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:22'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'HALF_MINUTE'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_30second</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:22'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'QUARTER_MINUTE'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_15second</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:31'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'SECOND'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_second</span><span class="p">;</span>
+</code></pre></div></div>
+
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
| nearest_year | nearest_quarter | nearest_month |
nearest_day | nearest_week_sunday | nearest_week_monday |
nearest_hour | nearest_half_hour | nearest_quarter_hour |
nearest_minute | nearest_30second | nearest_15second |
nearest_second |
|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
| 2019-01-01 00:00:00.0 | 2019-01-01 00:00:00.0 | 2019-02-01 00:00:00.0 |
2019-02-15 00:00:00.0 | 2019-02-10 00:00:00.0 | 2019-02-11 00:00:00.0 |
2019-02-15 07:00:00.0 | 2019-02-15 07:30:00.0 | 2019-02-15 07:45:00.0 |
2019-02-15 07:22:00.0 | 2019-02-15 07:22:00.0 | 2019-02-15 07:22:15.0 |
2019-02-15 07:22:31.0 |
@@ -2302,7 +2313,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| EXPR$0 |
|-----------|
| 05:10:05 |
- |-----------|
+ |-----------|
</code></pre></div> </div>
</li>
</ul>
@@ -2328,7 +2339,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| 2018-04-01 00:00:00.0 |
| 2017-05-02 00:00:00.0 |
| 2000-08-06 00:00:00.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p>Dates in column[0] before applying the TIMESTAMPADD function:</p>
@@ -2365,7 +2376,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| EXPR$0 |
|---------|
| 439 |
- |---------|
+ |---------|
</code></pre></div> </div>
</li>
</ul>
diff --git a/output/docs/rdbms-storage-plugin/index.html
b/output/docs/rdbms-storage-plugin/index.html
index c8360aa..111e18b 100644
--- a/output/docs/rdbms-storage-plugin/index.html
+++ b/output/docs/rdbms-storage-plugin/index.html
@@ -1442,13 +1442,9 @@
<h2
id="setting-data-source-parameters-in-the-storage-plugin-configuration">Setting
data source parameters in the storage plugin configuration</h2>
-<p>Starting from Drill 1.18.0, new JDBC storage plugin configuration property
<code class="language-plaintext highlighter-rouge">sourceParameters</code> was
introduced to allow
- setting data source parameters described in <a
href="https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby">HikariCP</a>.
- Parameters names with incorrect naming and parameter values which are of
incorrect data type or illegal will fail
- storage plugin to start up.</p>
+<p><strong>Introduced in release:</strong> 1.18</p>
-<p>See the <a
href="#example-of-postgres-configuration-with-sourceparameters-configuration-property">Example
of Postgres Configuration with <code class="language-plaintext
highlighter-rouge">sourceParameters</code> configuration property</a>
-section for the example of usage.</p>
+<p>A JDBC storage plugin configuration property <code
class="language-plaintext highlighter-rouge">sourceParameters</code> was
introduced to allow setting data source parameters described in <a
href="https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby">HikariCP</a>.
Parameters names with incorrect naming and parameter values which are of
incorrect data type or illegal will cause the storage plugin to fail to start.
See the <a href="#example-of-postgres-configuration-wi [...]
<h3 id="example-working-with-mysql">Example: Working with MySQL</h3>
diff --git a/output/feed.xml b/output/feed.xml
index 2caf3c3..4eff82b 100644
--- a/output/feed.xml
+++ b/output/feed.xml
@@ -6,8 +6,8 @@
</description>
<link>/</link>
<atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
- <pubDate>Sun, 17 Oct 2021 13:22:35 +0000</pubDate>
- <lastBuildDate>Sun, 17 Oct 2021 13:22:35 +0000</lastBuildDate>
+ <pubDate>Thu, 21 Oct 2021 09:52:31 +0000</pubDate>
+ <lastBuildDate>Thu, 21 Oct 2021 09:52:31 +0000</lastBuildDate>
<generator>Jekyll v3.9.1</generator>
<item>
diff --git a/output/zh/docs/connect-a-data-source-introduction/index.html
b/output/zh/docs/connect-a-data-source-introduction/index.html
index d95a38a..57e5065 100644
--- a/output/zh/docs/connect-a-data-source-introduction/index.html
+++ b/output/zh/docs/connect-a-data-source-introduction/index.html
@@ -1434,6 +1434,15 @@
<li>You can specify the storage plugin when starting Drill.</li>
</ul>
+<p>As a general principle, Drill aims to make storage plugins lazy about
connecting to external data sources. This means that you should normally be
able to add and enable a storage configuration based on some external data
source even if that data source is not available to accept queries at the time.
Another consequence of lazy connecting is that Drill restarts, which reload
all enabled storage plugins, will not kick a configuration into the disabled
state if the corresponding extern [...]
+
+<p>A related principle is that Drill storage plugins should aim, by default,
to be thrifty about how many connections they make and maintain for the
following reasons.</p>
+
+<ul>
+ <li>Each Drillbit participating in a query involving an external data source
must initiate its own outbound connection(s).</li>
+ <li>In the OLAP regime, the cost of bringing up a new connection is
typically negligible compared to the total cost of an analytical query.</li>
+</ul>
+
<div class="doc-nav">
diff --git a/output/zh/docs/date-time-functions-and-arithmetic/index.html
b/output/zh/docs/date-time-functions-and-arithmetic/index.html
index d472b73..3f89265 100644
--- a/output/zh/docs/date-time-functions-and-arithmetic/index.html
+++ b/output/zh/docs/date-time-functions-and-arithmetic/index.html
@@ -1506,10 +1506,6 @@
<td><a
href="/zh/docs/date-time-functions-and-arithmetic/#timestampdiff">TIMESTAMPDIFF</a>*</td>
<td>Inferred based on unit of time</td>
</tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
</tbody>
</table>
@@ -1582,11 +1578,11 @@
<li><code class="language-plaintext highlighter-rouge">DATE_ADD(column,
interval expr)</code></li>
</ul>
-<p><em>keyword</em> is the word date, time, or timestamp.<br />
-<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.<br />
-<em>integer</em> is a number of days to add to the date/time.<br />
-<em>column</em> is date, time, or timestamp data in a data source column.<br />
-<em>interval</em> is the keyword interval.<br />
+<p><em>keyword</em> is the word date, time, or timestamp.
+<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.
+<em>integer</em> is a number of days to add to the date/time.
+<em>column</em> is date, time, or timestamp data in a data source column.
+<em>interval</em> is the keyword interval.
<em>expr</em> is an interval expression, such as the name of a data source
column containing interval data.</p>
<h3 id="date_add-examples">DATE_ADD Examples</h3>
@@ -1702,7 +1698,7 @@
|---------------|
| 01:26:40.100 |
|---------------|
-1 row selected (0.106 seconds)
+1 row selected (0.106 seconds)
</code></pre></div></div>
<h2 id="date_diff">DATE_DIFF</h2>
@@ -1715,7 +1711,7 @@
| EXPR$0 | EXPR$1 |
|---------|----------------------------------------------|
| -346 | 2019-01-15 14:54:21.455 America/Los_Angeles |
-|---------|----------------------------------------------|
+|---------|----------------------------------------------|
</code></pre></div></div>
<p>However, for date and timestamp values, use the <code
class="language-plaintext highlighter-rouge">DATE_DIFF</code> function and
convert the interval returned to a number, as shown:</p>
@@ -1736,11 +1732,11 @@
<li><code class="language-plaintext highlighter-rouge">DATE_DIFF(column,
interval expr)</code></li>
</ul>
-<p><em>keyword</em> is the word date, time, or timestamp.<br />
-<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.<br />
-<em>integer</em> is a number of days to subtract from the date/time.<br />
-<em>column</em> is date, time, or timestamp data in a data source column.<br />
-<em>interval</em> is the keyword interval.<br />
+<p><em>keyword</em> is the word date, time, or timestamp.
+<em>literal</em> is a date, time, or timestamp literal. For example, a date
in yyyy-mm-dd format enclosed in single quotation marks.
+<em>integer</em> is a number of days to subtract from the date/time.
+<em>column</em> is date, time, or timestamp data in a data source column.
+<em>interval</em> is the keyword interval.
<em>expr</em> is an interval expression, such as the name of a data source
column containing interval data.</p>
<h3 id="date_diff-examples">DATE_DIFF Examples</h3>
@@ -1755,21 +1751,21 @@
| EXPR$0 |
|-------------|
| 2015-05-13 |
-|-------------|
+|-------------|
</code></pre></div></div>
<p><strong>DATE_DIFF(keyword literal, interval expr) Syntax
Example</strong></p>
<p>Using the example data from the <a
href="/zh/docs/data-type-conversion/#casting-intervals">“Casting Intervals”</a>
section, subtract intervals from the <code class="language-plaintext
highlighter-rouge">intervals.json</code> file from a literal timestamp. Create
an interval expression that casts the INTERVALDAY_col column, which contains
P1D, P2D, and P3D, to a timestamp.</p>
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>SELECT DATE_DIFF(timestamp '2015-04-15 22:55:55',
CAST(INTERVALDAY_col as interval second)) FROM dfs.`/home/bee/intervals.json`;
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>SELECT DATE_DIFF(timestamp '2015-04-15 22:55:55',
CAST(INTERVALDAY_col as interval second)) FROM dfs.`/home/bee/intervals.json`;
|------------------------|
| EXPR$0 |
|------------------------|
| 2015-04-14 22:55:55.0 |
| 2015-04-13 22:55:55.0 |
| 2015-04-12 22:55:55.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p>The query output is the difference of the timestamp and 1, 2, and 3 days
corresponding to P1D, P2D, and P3D.</p>
@@ -1783,7 +1779,7 @@
| a |
|-------------|
| 1961-08-24 |
-|-------------|
+|-------------|
</code></pre></div></div>
<p><strong>DATE_DIFF(column, interval expr) Syntax Example</strong></p>
@@ -1798,7 +1794,7 @@
|------------------------|
| 1995-12-31 14:00:00.0 |
| 1997-12-31 14:00:00.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p><strong>DATE_DIFF(keyword literal, integer) Syntax Example</strong></p>
@@ -1810,7 +1806,7 @@
| EXPR$0 |
|------------------------|
| 2014-02-15 22:55:55.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p>Subtract 1 day 2 and 1/2 hours and 45.100 seconds from the time
22:55:55.</p>
@@ -1820,7 +1816,7 @@
| EXPR$0 |
|---------------|
| 20:25:09.900 |
-|---------------|
+|---------------|
</code></pre></div></div>
<h2 id="date_part">DATE_PART</h2>
@@ -1830,7 +1826,7 @@
<p><code class="language-plaintext highlighter-rouge">date_part(keyword,
expression)</code></p>
-<p><em>keyword</em> is year, month, day, hour, minute, or second enclosed in
single quotation marks.<br />
+<p><em>keyword</em> is year, month, day, hour, minute, or second enclosed in
single quotation marks.
<em>expression</em> is date, time, timestamp, or interval literal enclosed in
single quotation marks.</p>
<h3 id="date_part-usage-notes">DATE_PART Usage Notes</h3>
@@ -1871,16 +1867,16 @@ SELECT DATE_PART('hour', '23:14:30.076') FROM
(VALUES(1));
<h3 id="date_sub-syntax">DATE_SUB Syntax</h3>
-<p><code class="language-plaintext highlighter-rouge">DATE_SUB(keyword
literal, integer)</code><br />
-<code class="language-plaintext highlighter-rouge">DATE_SUB(keyword literal,
interval expr)</code><br />
-<code class="language-plaintext highlighter-rouge">DATE_SUB(column,
integer)</code><br />
+<p><code class="language-plaintext highlighter-rouge">DATE_SUB(keyword
literal, integer)</code>
+<code class="language-plaintext highlighter-rouge">DATE_SUB(keyword literal,
interval expr)</code>
+<code class="language-plaintext highlighter-rouge">DATE_SUB(column,
integer)</code>
<code class="language-plaintext highlighter-rouge">DATE_SUB(column, interval
expr)</code></p>
-<p><em>keyword</em> is the word date, time, or timestamp.<br />
-<em>literal</em> is a date, time, or timestamp literal. For example, a date in
yyyy-mm-dd format enclosed in single quotation marks. <br />
-<em>integer</em> is a number of days to subtract from the date, time, or
timestamp.<br />
-<em>column</em> is date, time, or timestamp data in the data source.<br />
-<em>interval</em> is the keyword interval.<br />
+<p><em>keyword</em> is the word date, time, or timestamp.
+<em>literal</em> is a date, time, or timestamp literal. For example, a date in
yyyy-mm-dd format enclosed in single quotation marks.
+<em>integer</em> is a number of days to subtract from the date, time, or
timestamp.
+<em>column</em> is date, time, or timestamp data in the data source.
+<em>interval</em> is the keyword interval.
<em>expr</em> is an interval expression, such as the name of a data source
column containing interval data.</p>
<h3 id="date_sub-examples">DATE_SUB Examples</h3>
@@ -2176,8 +2172,8 @@ SELECT DATE_PART('hour', '23:14:30.076') FROM (VALUES(1));
<h3 id="unix_timestamp-syntax">UNIX_TIMESTAMP Syntax</h3>
-<p><code class="language-plaintext
highlighter-rouge">UNIX_TIMESTAMP()</code><br />
-<code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP(string
date)</code><br />
+<p><code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP()</code>
+<code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP(string
date)</code>
<code class="language-plaintext highlighter-rouge">UNIX_TIMESTAMP(string date,
string pattern)</code></p>
<p>These functions perform the following operations, respectively:</p>
@@ -2218,7 +2214,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
|-------------|
| 1432912733 |
|-------------|
-1 row selected (0.171 seconds)
+1 row selected (0.171 seconds)
</code></pre></div></div>
<h2 id="nearestdate">NEARESTDATE</h2>
@@ -2267,13 +2263,28 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| 1995-01-01 00:00:00.0 | 12 |
| 1997-01-01 00:00:00.0 | 74 |
| 1993-01-01 00:00:00.0 | 4 |
-|-----------------------|-------|
+|-----------------------|-------|
</code></pre></div></div>
<p>The following example applies the NEARESTDATE function to a timestamp value
(2019-02-01 07:22:00) and returns the timestamp value for each time unit
indicated:</p>
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>SELECT nearestDate( TO_TIMESTAMP('2019-02-01 07:22:00',
'yyyy-MM-dd HH:mm:ss'), 'YEAR') AS nearest_year, nearestDate(
TO_TIMESTAMP('2019-02-01 07:22:00', 'yyyy-MM-dd HH:mm:ss'), 'QUARTER') AS
nearest_quarter, nearestDate( TO_TIMESTAMP('2019-02-15 07:22:00', 'yyyy-MM-dd
HH:mm:ss'), 'MONTH') AS nearest_month, nearestDate( TO_TIMESTAMP('2019-02-15
07:22:00', 'yyyy-MM-dd HH:mm:ss'), 'DAY') A [...]
-|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
+<div class="language-sql highlighter-rouge"><div class="highlight"><pre
class="highlight"><code><span class="k">SELECT</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-01 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'YEAR'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_year</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-01 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'QUARTER'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_quarter</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'MONTH'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_month</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'DAY'</span><span class="p">)</span> <span class="k">AS</span> <span
class="n">nearest_day</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'WEEK_SUNDAY'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_week_sunday</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'WEEK_MONDAY'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_week_monday</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'HOUR'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_hour</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:42:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'HALF_HOUR'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_half_hour</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:48:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'QUARTER_HOUR'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_quarter_hour</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:00'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'MINUTE'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_minute</span><span class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:22'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'HALF_MINUTE'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_30second</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:22'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'QUARTER_MINUTE'</span><span class="p">)</span> <span
class="k">AS</span> <span class="n">nearest_15second</span><span
class="p">,</span>
+ <span class="n">NEARESTDATE</span><span class="p">(</span> <span
class="n">TO_TIMESTAMP</span><span class="p">(</span><span
class="s1">'2019-02-15 07:22:31'</span><span class="p">,</span> <span
class="s1">'yyyy-MM-dd HH:mm:ss'</span><span class="p">),</span> <span
class="s1">'SECOND'</span><span class="p">)</span> <span class="k">AS</span>
<span class="n">nearest_second</span><span class="p">;</span>
+</code></pre></div></div>
+
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre
class="highlight"><code>|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
| nearest_year | nearest_quarter | nearest_month |
nearest_day | nearest_week_sunday | nearest_week_monday |
nearest_hour | nearest_half_hour | nearest_quarter_hour |
nearest_minute | nearest_30second | nearest_15second |
nearest_second |
|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
| 2019-01-01 00:00:00.0 | 2019-01-01 00:00:00.0 | 2019-02-01 00:00:00.0 |
2019-02-15 00:00:00.0 | 2019-02-10 00:00:00.0 | 2019-02-11 00:00:00.0 |
2019-02-15 07:00:00.0 | 2019-02-15 07:30:00.0 | 2019-02-15 07:45:00.0 |
2019-02-15 07:22:00.0 | 2019-02-15 07:22:00.0 | 2019-02-15 07:22:15.0 |
2019-02-15 07:22:31.0 |
@@ -2302,7 +2313,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| EXPR$0 |
|-----------|
| 05:10:05 |
- |-----------|
+ |-----------|
</code></pre></div> </div>
</li>
</ul>
@@ -2328,7 +2339,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| 2018-04-01 00:00:00.0 |
| 2017-05-02 00:00:00.0 |
| 2000-08-06 00:00:00.0 |
-|------------------------|
+|------------------------|
</code></pre></div></div>
<p>Dates in column[0] before applying the TIMESTAMPADD function:</p>
@@ -2365,7 +2376,7 @@ SELECT UNIX_TIMESTAMP('2015-05-29 08:18:53.0',
'yyyy-MM-dd HH:mm:ss.SSS') FROM (
| EXPR$0 |
|---------|
| 439 |
- |---------|
+ |---------|
</code></pre></div> </div>
</li>
</ul>
diff --git a/output/zh/docs/rdbms-storage-plugin/index.html
b/output/zh/docs/rdbms-storage-plugin/index.html
index b75df81..7f48de2 100644
--- a/output/zh/docs/rdbms-storage-plugin/index.html
+++ b/output/zh/docs/rdbms-storage-plugin/index.html
@@ -1442,13 +1442,9 @@
<h2
id="setting-data-source-parameters-in-the-storage-plugin-configuration">Setting
data source parameters in the storage plugin configuration</h2>
-<p>Starting from Drill 1.18.0, new JDBC storage plugin configuration property
<code class="language-plaintext highlighter-rouge">sourceParameters</code> was
introduced to allow
- setting data source parameters described in <a
href="https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby">HikariCP</a>.
- Parameters names with incorrect naming and parameter values which are of
incorrect data type or illegal will fail
- storage plugin to start up.</p>
+<p><strong>Introduced in release:</strong> 1.18</p>
-<p>See the <a
href="#example-of-postgres-configuration-with-sourceparameters-configuration-property">Example
of Postgres Configuration with <code class="language-plaintext
highlighter-rouge">sourceParameters</code> configuration property</a>
-section for the example of usage.</p>
+<p>A JDBC storage plugin configuration property <code
class="language-plaintext highlighter-rouge">sourceParameters</code> was
introduced to allow setting data source parameters described in <a
href="https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby">HikariCP</a>.
Parameters names with incorrect naming and parameter values which are of
incorrect data type or illegal will cause the storage plugin to fail to start.
See the <a href="#example-of-postgres-configuration-wi [...]
<h3 id="example-working-with-mysql">Example: Working with MySQL</h3>
diff --git a/output/zh/feed.xml b/output/zh/feed.xml
index c3b9c3e..177acab 100644
--- a/output/zh/feed.xml
+++ b/output/zh/feed.xml
@@ -6,8 +6,8 @@
</description>
<link>/</link>
<atom:link href="/zh/feed.xml" rel="self" type="application/rss+xml"/>
- <pubDate>Sun, 17 Oct 2021 13:22:35 +0000</pubDate>
- <lastBuildDate>Sun, 17 Oct 2021 13:22:35 +0000</lastBuildDate>
+ <pubDate>Thu, 21 Oct 2021 09:52:31 +0000</pubDate>
+ <lastBuildDate>Thu, 21 Oct 2021 09:52:31 +0000</lastBuildDate>
<generator>Jekyll v3.9.1</generator>
<item>