You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2016/06/13 07:54:01 UTC
[1/3] calcite git commit: [CALCITE-1229] Restore API and Test API
links to site
Repository: calcite
Updated Branches:
refs/heads/master aecd54576 -> 660d083fe
[CALCITE-1229] Restore API and Test API links to site
Do not generate spurious spaces when a news item is added.
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/0c582435
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/0c582435
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/0c582435
Branch: refs/heads/master
Commit: 0c58243542677072a7b77555363c6204441c571a
Parents: aecd545
Author: Julian Hyde <jh...@apache.org>
Authored: Fri Jun 10 18:11:02 2016 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Jun 13 00:28:28 2016 -0700
----------------------------------------------------------------------
avatica/site/_includes/docs_ul.html | 3 ++-
site/_docs/api.md | 2 +-
site/_includes/docs_ul.html | 29 +++++++++++++++++------------
site/_includes/news_contents.html | 8 ++++----
4 files changed, 24 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/avatica/site/_includes/docs_ul.html
----------------------------------------------------------------------
diff --git a/avatica/site/_includes/docs_ul.html b/avatica/site/_includes/docs_ul.html
index 768259c..8181e74 100644
--- a/avatica/site/_includes/docs_ul.html
+++ b/avatica/site/_includes/docs_ul.html
@@ -4,6 +4,7 @@
{% for item in items %}
{% comment %} Account for the baseurl to make sure we compare the full URI. {% endcomment %}
{% capture item_url %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:".html" }}{% endcapture %}
+ {% capture item_url2 %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:"/" }}{% endcapture %}
{% capture current_url %}{{ site.baseurl }}{{ page.url }}{% endcapture %}
{% if item_url == current_url %}
@@ -19,7 +20,7 @@
{% else %}
{% assign anchor_text = p.title %}
{% endif %}
- {% if p_url == item_url %}
+ {% if p_url == item_url or p_url == item_url2 %}
<li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li>
{% break %}
{% endif %}
http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/site/_docs/api.md
----------------------------------------------------------------------
diff --git a/site/_docs/api.md b/site/_docs/api.md
index 49f456b..5ad8688 100644
--- a/site/_docs/api.md
+++ b/site/_docs/api.md
@@ -1,7 +1,7 @@
---
title: API
layout: external
-external_url: http://calcite.apache.org/apidocs
+external_url: /apidocs
---
{% comment %}
Ideally, we want to use {{ site.apiRoot }} instead of hardcoding
http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/site/_includes/docs_ul.html
----------------------------------------------------------------------
diff --git a/site/_includes/docs_ul.html b/site/_includes/docs_ul.html
index 768259c..bf2fd71 100644
--- a/site/_includes/docs_ul.html
+++ b/site/_includes/docs_ul.html
@@ -4,6 +4,7 @@
{% for item in items %}
{% comment %} Account for the baseurl to make sure we compare the full URI. {% endcomment %}
{% capture item_url %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:".html" }}{% endcapture %}
+ {% capture item_url2 %}{{site.baseurl}}{{ item | prepend:"/docs/" | append:"/" }}{% endcapture %}
{% capture current_url %}{{ site.baseurl }}{{ page.url }}{% endcapture %}
{% if item_url == current_url %}
@@ -12,18 +13,22 @@
{% assign c = "" %}
{% endif %}
- {% for p in site.docs %}
- {% capture p_url %}{{site.baseurl}}{{p.url}}{% endcapture %}
- {% if p.sidebar_title != nil %}
- {% assign anchor_text = p.sidebar_title %}
- {% else %}
- {% assign anchor_text = p.title %}
- {% endif %}
- {% if p_url == item_url %}
- <li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li>
- {% break %}
- {% endif %}
- {% endfor %}
+ {% for p in site.docs %}{% comment %}
+ {% endcomment %}{% capture p_url %}{{site.baseurl}}{{p.url}}{% endcapture %}{% comment %}
+ {% endcomment %}{% if p.sidebar_title != nil %}{% comment %}
+ {% endcomment %}{% assign anchor_text = p.sidebar_title %}{% comment %}
+ {% endcomment %}{% else %}{% comment %}
+ {% endcomment %}{% assign anchor_text = p.title %}{% comment %}
+ {% endcomment %}{% endif %}{% comment %}
+ {% endcomment %}{% if p_url == item_url %}{% comment %}
+ {% endcomment %}<li class="{{ c }}"><a href="{{ p_url }}">{{ anchor_text }}</a></li>{% comment %}
+ {% endcomment %}{% break %}{% comment %}
+ {% endcomment %}{% endif %}{% comment %}
+ {% endcomment %}{% if p_url == item_url2 %}{% comment %}
+ {% endcomment %}<li class="{{ c }}"><a href="{{ p.external_url }}">{{ anchor_text }}</a></li>{% comment %}
+ {% endcomment %}{% break %}{% comment %}
+ {% endcomment %}{% endif %}{% comment %}
+ {% endcomment %}{% endfor %}
{% endfor %}
</ul>
http://git-wip-us.apache.org/repos/asf/calcite/blob/0c582435/site/_includes/news_contents.html
----------------------------------------------------------------------
diff --git a/site/_includes/news_contents.html b/site/_includes/news_contents.html
index d1481e7..5cb8947 100644
--- a/site/_includes/news_contents.html
+++ b/site/_includes/news_contents.html
@@ -18,13 +18,13 @@
</ul>
<h4>Other News</h4>
<ul>
- {% for post in site.posts %}
- {% unless post.categories contains 'release' %}
+ {% for post in site.posts %}{% comment %}
+ {% endcomment %}{% unless post.categories contains 'release' %}
<li class="{% if page.title == post.title %}current{% endif %}">
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</li>
- {% endunless %}
- {% endfor %}
+ {% endunless %}{% comment %}
+ {% endcomment %}{% endfor %}
</ul>
</aside>
</div>
[3/3] calcite git commit: Add news item for calcite-1.8.0
Posted by jh...@apache.org.
Add news item for calcite-1.8.0
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/660d083f
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/660d083f
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/660d083f
Branch: refs/heads/master
Commit: 660d083fe24bc82aec73e7763420032b36f01434
Parents: 56b753d
Author: Julian Hyde <jh...@apache.org>
Authored: Mon Jun 13 00:25:58 2016 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Jun 13 00:29:21 2016 -0700
----------------------------------------------------------------------
site/_posts/2016-06-13-release-1.8.0.md | 55 ++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/660d083f/site/_posts/2016-06-13-release-1.8.0.md
----------------------------------------------------------------------
diff --git a/site/_posts/2016-06-13-release-1.8.0.md b/site/_posts/2016-06-13-release-1.8.0.md
new file mode 100644
index 0000000..2539926
--- /dev/null
+++ b/site/_posts/2016-06-13-release-1.8.0.md
@@ -0,0 +1,55 @@
+---
+layout: news_item
+date: "2016-06-13 07:00:00 +0000"
+author: jhyde
+version: 1.8.0
+categories: [release]
+tag: v1-8-0
+sha: aeb6bf1
+---
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+The [Apache Calcite PMC]({{ site.baseurl }})
+is pleased to announce
+[Apache Calcite release 1.8.0]({{ site.baseurl }}/docs/history.html#v-1-8-0).
+
+This release adds adapters for
+[Elasticsearch](https://issues.apache.org/jira/browse/CALCITE-1253) and
+[Druid](https://issues.apache.org/jira/browse/CALCITE-1121).
+It is also now easier to
+[make a JDBC connection based upon a single adapter](https://issues.apache.org/jira/browse/CALCITE-1259).
+
+There are several new SQL features: `UNNEST` with
+[multiple arguments](https://issues.apache.org/jira/browse/CALCITE-855),
+[MAP arguments](https://issues.apache.org/jira/browse/CALCITE-1250)
+and [with a JOIN](https://issues.apache.org/jira/browse/CALCITE-1225);
+a [DESCRIBE](https://issues.apache.org/jira/browse/CALCITE-1168) statement;
+and a [TRANSLATE](https://issues.apache.org/jira/browse/CALCITE-1115)
+function like the one in Oracle and PostgreSQL.
+
+We also added support for
+[SELECT without FROM](https://issues.apache.org/jira/browse/CALCITE-1120)
+(equivalent to the `VALUES` clause, and widely used in MySQL and PostgreSQL),
+and added a
+[conformance]({{ site.baseurl }}/docs/adapter.html#jdbc-connect-string-parameters)
+parameter to allow you to selectively enable this and other SQL features.
+
+And, as usual, there are a couple of dozen bug-fixes and enhancements to
+planner rules and APIs.
[2/3] calcite git commit: Improve Druid documentation
Posted by jh...@apache.org.
Improve Druid documentation
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/56b753df
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/56b753df
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/56b753df
Branch: refs/heads/master
Commit: 56b753df4a2e6b971720333e0fc2bef4719d50ac
Parents: 0c58243
Author: Julian Hyde <jh...@apache.org>
Authored: Fri Jun 10 16:56:49 2016 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Jun 13 00:29:21 2016 -0700
----------------------------------------------------------------------
site/_docs/druid_adapter.md | 102 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 101 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/56b753df/site/_docs/druid_adapter.md
----------------------------------------------------------------------
diff --git a/site/_docs/druid_adapter.md b/site/_docs/druid_adapter.md
index 9de2fb9..d45caba 100644
--- a/site/_docs/druid_adapter.md
+++ b/site/_docs/druid_adapter.md
@@ -140,7 +140,7 @@ sqlline>
{% endhighlight %}
That query shows the top 5 countries of origin of wiki page edits
-on 2015-09-12 (the date covered by the wikiticker data set).
+on 2015-09-12 (the date covered by the `wikiticker` data set).
Now let's see how the query was evaluated:
@@ -173,3 +173,103 @@ into a single Druid data set called "foodmart".
You can access it via the
`druid/src/test/resources/druid-foodmart-model.json` model.
+
+# Simplifying the model
+
+If less metadata is provided in the model, the Druid adapter can discover
+it automatically from Druid. Here is a schema equivalent to the previous one
+but with `dimensions`, `metrics` and `timestampColumn` removed:
+
+{% highlight json %}
+{
+ "version": "1.0",
+ "defaultSchema": "wiki",
+ "schemas": [
+ {
+ "type": "custom",
+ "name": "wiki",
+ "factory": "org.apache.calcite.adapter.druid.DruidSchemaFactory",
+ "operand": {
+ "url": "http://localhost:8082",
+ "coordinatorUrl": "http://localhost:8081"
+ },
+ "tables": [
+ {
+ "name": "wiki",
+ "factory": "org.apache.calcite.adapter.druid.DruidTableFactory",
+ "operand": {
+ "dataSource": "wikiticker",
+ "interval": "1900-01-09T00:00:00.000Z/2992-01-10T00:00:00.000Z"
+ }
+ }
+ ]
+ }
+ ]
+}
+{% endhighlight %}
+
+Calcite dispatches a
+[segmentMetadataQuery](http://druid.io/docs/latest/querying/segmentmetadataquery.html)
+to Druid to discover the columns of the table.
+Now, let's take out the `tables` element:
+
+{% highlight json %}
+{
+ "version": "1.0",
+ "defaultSchema": "wiki",
+ "schemas": [
+ {
+ "type": "custom",
+ "name": "wiki",
+ "factory": "org.apache.calcite.adapter.druid.DruidSchemaFactory",
+ "operand": {
+ "url": "http://localhost:8082",
+ "coordinatorUrl": "http://localhost:8081"
+ }
+ }
+ ]
+}
+{% endhighlight %}
+
+Calcite discovers the "wikiticker" data source via the
+[/druid/coordinator/v1/metadata/datasources](http://druid.io/docs/latest/design/coordinator.html#metadata-store-information)
+REST call. Now that the "wiki" table element is removed, the table is called
+"wikiticker". Any other data sources present in Druid will also appear as
+tables.
+
+Our model is now a single schema based on a custom schema factory with only two
+operands, so we can
+[dispense with the model](https://issues.apache.org/jira/browse/CALCITE-1206)
+and supply the operands as part of the connect string:
+
+{% highlight bash %}
+ jdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid.DruidSchemaFactory; schema.url=http://localhost:8082; schema.coordinatorUrl=http://localhost:8081
+{% endhighlight %}
+
+In fact, those are the
+[default values of the operands]({{ site.apiRoot }}/org/apache/calcite/adapter/druid/DruidSchemaFactory.html),
+so we can omit them:
+
+{% highlight bash %}
+ jdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid.DruidSchemaFactory
+{% endhighlight %}
+
+Now, we can connect to `sqlline` using a very simple connect string, and list
+the available tables:
+
+{% highlight bash %}
+$ ./sqlline
+sqlline> !connect jdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid.DruidSchemaFactory admin admin
+sqlline> !tables
++-----------+-------------+------------+--------------+
+| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE |
++-----------+-------------+------------+--------------+
+| | adhoc | foodmart | TABLE |
+| | adhoc | wikiticker | TABLE |
+| | metadata | COLUMNS | SYSTEM_TABLE |
+| | metadata | TABLES | SYSTEM_TABLE |
++-----------+-------------+------------+--------------+
+{% endhighlight %}
+
+We see the two system tables (`TABLES` and `COLUMNS`),
+and the two tables in Druid (`foodmart` and `wikiticker`).