Skip to content

Commit

Permalink
[OPTIQ-430] Rename project from "Optiq" to "Calcite"
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhyde committed Sep 30, 2014
1 parent 356a606 commit a6f586a
Show file tree
Hide file tree
Showing 99 changed files with 373 additions and 369 deletions.
2 changes: 1 addition & 1 deletion DISCLAIMER
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache Optiq is an effort undergoing incubation at the Apache Software
Apache Calcite is an effort undergoing incubation at the Apache Software
Foundation (ASF), sponsored by the Apache Incubator PMC.

Incubation is required of all newly accepted projects until a further
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache Optiq
Apache Calcite
Copyright 2012-2014 The Apache Software Foundation

This product includes software developed at
Expand Down
10 changes: 5 additions & 5 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apache Optiq release 0.9.0 (incubating)
Apache Calcite release 0.9.1 (incubating)

This is a source or binary distribution of Apache Optiq.
This is a source or binary distribution of Apache Calcite.

Changes since the previous release are described in the doc/HISTORY.md
file.
Expand All @@ -11,14 +11,14 @@ If this is a source distribution, you can find instructions how to
build the release in the "Building from a source release" section in
doc/HOWTO.md.

README.md contains examples of running Optiq.
README.md contains examples of running Calcite.

Further information about Apache Optiq is available at its web site,
Further information about Apache Calcite is available at its web site,
http://incubator.apache.org/optiq.

Disclaimer

Apache Optiq is an effort undergoing incubation at The Apache Software
Apache Calcite is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the Apache Incubator. Incubation is
required of all newly accepted projects until a further review
indicates that the infrastructure, communications, and decision making
Expand Down
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![Build Status](https://travis-ci.org/julianhyde/optiq.svg?branch=master)](https://travis-ci.org/julianhyde/optiq)

# Apache Optiq
# Apache Calcite

Apache Optiq is a dynamic data management framework.
Apache Calcite is a dynamic data management framework.

## Getting Optiq
## Getting Calcite

To run Apache Optiq, you can either
To run Apache Calcite, you can either
[download and build from github](doc/HOWTO.md#building-from-git),
or [download a release](http://www.apache.org/dyn/closer.cgi/incubator/optiq)
then [build the source code](doc/HOWTO.md#building-from-a-source-distribution).
Expand All @@ -17,15 +17,15 @@ with the following Maven coordinates:

```xml
<dependency>
<groupId>org.apache.optiq</groupId>
<artifactId>optiq-core</artifactId>
<version>0.9.0-incubating</version>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<version>0.9.1-incubating</version>
</dependency>
```

## Example

Optiq makes data anywhere, of any format, look like a database. For
Calcite makes data anywhere, of any format, look like a database. For
example, you can execute a complex ANSI-standard SQL statement on
in-memory collections:

Expand All @@ -36,7 +36,7 @@ public static class HrSchema {
}

Class.forName("net.hydromatic.optiq.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:optiq:");
Connection connection = DriverManager.getConnection("jdbc:calcite:");
OptiqConnection optiqConnection =
connection.unwrap(OptiqConnection.class);
ReflectiveSchema.create(optiqConnection,
Expand All @@ -60,11 +60,11 @@ completely empty until <code>ReflectiveSchema.create</code> registers
a Java object as a schema and its collection fields <code>emps</code>
and <code>depts</code> as tables.

Optiq does not want to own data; it does not even have favorite data
Calcite does not want to own data; it does not even have favorite data
format. This example used in-memory data sets, and processed them
using operators such as <code>groupBy</code> and <code>join</code>
from the linq4j
library. But Optiq can also process data in other data formats, such
library. But Calcite can also process data in other data formats, such
as JDBC. In the first example, replace

```java
Expand All @@ -83,28 +83,28 @@ dataSource.setPassword("");
JdbcSchema.create(optiqConnection, dataSource, rootSchema, "hr", "");
```

and Optiq will execute the same query in JDBC. To the application, the
and Calcite will execute the same query in JDBC. To the application, the
data and API are the same, but behind the scenes the implementation is
very different. Optiq uses optimizer rules
very different. Calcite uses optimizer rules
to push the <code>JOIN</code> and <code>GROUP BY</code> operations to
the source database.

In-memory and JDBC are just two familiar examples. Optiq can handle
In-memory and JDBC are just two familiar examples. Calcite can handle
any data source and data format. To add a data source, you need to
write an adapter that tells Optiq
write an adapter that tells Calcite
what collections in the data source it should consider "tables".

For more advanced integration, you can write optimizer
rules. Optimizer rules allow Optiq to access data of a new format,
rules. Optimizer rules allow Calcite to access data of a new format,
allow you to register new operators (such as a better join algorithm),
and allow Optiq to optimize how queries are translated to
operators. Optiq will combine your rules and operators with built-in
and allow Calcite to optimize how queries are translated to
operators. Calcite will combine your rules and operators with built-in
rules and operators, apply cost-based optimization, and generate an
efficient plan.

### Non-JDBC access

Optiq also allows front-ends other than SQL/JDBC. For example, you can
Calcite also allows front-ends other than SQL/JDBC. For example, you can
execute queries in <a href="https://github.com/julianhyde/linq4j">linq4j</a>:

```java
Expand All @@ -125,7 +125,7 @@ for (Customer customer
```

Linq4j understands the full query parse tree, and the Linq4j query
provider for Optiq invokes Optiq as an query optimizer. If the
provider for Calcite invokes Calcite as an query optimizer. If the
<code>customer</code> table comes from a JDBC database (based on
this code fragment, we really can't tell) then the optimal plan
will be to send the query
Expand All @@ -149,7 +149,7 @@ See the <a href="https://github.com/julianhyde/optiq-csv/blob/master/TUTORIAL.md
for information on using optiq-csv and writing adapters.

See the <a href="doc/HOWTO.md">HOWTO</a> for more information about using other
adapters, and about using Optiq in general.
adapters, and about using Calcite in general.

## Status

Expand All @@ -166,17 +166,17 @@ For more details, see the <a href="doc/REFERENCE.md">Reference guide</a>.

### Drivers

* <a href="http://www.hydromatic.net/optiq/optiq-core/apidocs/net/hydromatic/optiq/jdbc/package-summary.html">JDBC driver</a>
* <a href="http://www.hydromatic.net/calcite/calcite-core/apidocs/net/hydromatic/optiq/jdbc/package-summary.html">JDBC driver</a>

### Adapters

* <a href="https://github.com/apache/incubator-drill">Apache Drill adapter</a>
* Cascading adapter (<a href="https://github.com/Cascading/lingual">Lingual</a>)
* CSV adapter (<a href="https://github.com/julianhyde/optiq-csv">optiq-csv</a>)
* JDBC adapter (part of <a href="http://www.hydromatic.net/optiq/optiq-core/apidocs/net/hydromatic/optiq/impl/jdbc/package-summary.html">optiq-core</a>)
* MongoDB adapter (<a href="http://www.hydromatic.net/optiq/optiq-mongodb/apidocs/net/hydromatic/optiq/impl/mongodb/package-summary.html">optiq-mongodb</a>)
* Spark adapter (<a href="http://www.hydromatic.net/optiq/optiq-spark/apidocs/net/hydromatic/optiq/impl/spark/package-summary.html">optiq-spark</a>)
* Splunk adapter (<a href="http://www.hydromatic.net/optiq/optiq-splunk/apidocs/net/hydromatic/optiq/impl/splunk/package-summary.html">optiq-splunk</a>)
* JDBC adapter (part of <a href="http://www.hydromatic.net/calcite/calcite-core/apidocs/net/hydromatic/optiq/impl/jdbc/package-summary.html">calcite-core</a>)
* MongoDB adapter (<a href="http://www.hydromatic.net/calcite/calcite-mongodb/apidocs/net/hydromatic/optiq/impl/mongodb/package-summary.html">calcite-mongodb</a>)
* Spark adapter (<a href="http://www.hydromatic.net/calcite/calcite-spark/apidocs/net/hydromatic/optiq/impl/spark/package-summary.html">calcite-spark</a>)
* Splunk adapter (<a href="http://www.hydromatic.net/calcite/calcite-splunk/apidocs/net/hydromatic/optiq/impl/splunk/package-summary.html">calcite-splunk</a>)
* Eclipse Memory Analyzer (MAT) adapter (<a href="https://github.com/vlsi/optiq-mat-plugin">optiq-mat-plugin</a>)

## More information
Expand All @@ -185,8 +185,8 @@ For more details, see the <a href="doc/REFERENCE.md">Reference guide</a>.
* Author: Julian Hyde
* Blog: http://julianhyde.blogspot.com
* Incubation status page: http://incubator.apache.org/projects/optiq.html
* Project page: http://www.hydromatic.net/optiq
* Source code: http://github.com/julianhyde/optiq
* Project page: http://www.hydromatic.net/calcite
* Source code: http://github.com/apache/incubator-optiq
* Issues: <a href="https://issues.apache.org/jira/browse/OPTIQ">Apache JIRA</a>
* Developers list: <a href="mailto:dev@optiq.incubator.apache.org">dev at optiq.incubator.apache.org</a> (<a href="http://mail-archives.apache.org/mod_mbox/incubator-optiq-dev/">archive</a>, <a href="mailto:dev-subscribe@optiq.incubator.apache.org">subscribe</a>)
* <a href="doc/HOWTO.md">HOWTO</a>
Expand All @@ -196,7 +196,7 @@ For more details, see the <a href="doc/REFERENCE.md">Reference guide</a>.

### Pre-Apache resources

These resources, which we used before Optiq was an Apache incubator
These resources, which we used before Calcite was an Apache incubator
project, are for reference only.
They may be out of date.
Please don't post to the mailing list.
Expand All @@ -214,7 +214,7 @@ Please don't post to the mailing list.

## Disclaimer

Apache Optiq is an effort undergoing incubation at The Apache Software
Apache Calcite is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the Apache Incubator. Incubation is
required of all newly accepted projects until a further review
indicates that the infrastructure, communications, and decision making
Expand Down
8 changes: 4 additions & 4 deletions avatica/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ limitations under the License.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.optiq</groupId>
<artifactId>optiq</artifactId>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
<version>0.9.1-incubating-SNAPSHOT</version>
</parent>

<artifactId>optiq-avatica</artifactId>
<artifactId>calcite-avatica</artifactId>
<packaging>jar</packaging>
<version>0.9.1-incubating-SNAPSHOT</version>
<name>Optiq Avatica</name>
<name>Calcite Avatica</name>
<description>JDBC driver framework.</description>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public boolean acceptsURL(String url) throws SQLException {
}

/** Returns the prefix of the connect string that this driver will recognize
* as its own. For example, "jdbc:optiq:". */
* as its own. For example, "jdbc:calcite:". */
protected abstract String getConnectStringPrefix();

public DriverPropertyInfo[] getPropertyInfo(
Expand Down
18 changes: 9 additions & 9 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ limitations under the License.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.optiq</groupId>
<artifactId>optiq</artifactId>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
<version>0.9.1-incubating-SNAPSHOT</version>
</parent>

<artifactId>optiq-core</artifactId>
<artifactId>calcite-core</artifactId>
<packaging>jar</packaging>
<version>0.9.1-incubating-SNAPSHOT</version>
<name>Optiq Core</name>
<description>Core Optiq APIs and engine.</description>
<name>Calcite Core</name>
<description>Core Calcite APIs and engine.</description>

<properties>
<top.dir>${project.basedir}/..</top.dir>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
</properties>

<dependencies>
<!-- Sorted by groupId, artifactId; optiq dependencies first. Put versions
<!-- Sorted by groupId, artifactId; calcite dependencies first. Put versions
in dependencyManagement in the root POM, not here. -->
<dependency>
<groupId>org.apache.optiq</groupId>
<artifactId>optiq-avatica</artifactId>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-avatica</artifactId>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
Expand Down Expand Up @@ -158,7 +158,7 @@ limitations under the License.
</resource>
<resource>
<!-- Copy freemarker template and fmpp configuration files of
Optiq's SQL parser to allow clients to extend parser. -->
Calcite's SQL parser to allow clients to extend parser. -->
<directory>${basedir}/src/main/codegen</directory>
<targetPath>codegen</targetPath>
</resource>
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/codegen/config.fmpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# limitations under the License.

# This file is an FMPP (http://fmpp.sourceforge.net/) configuration file to
# allow clients to extend Optiq's SQL parser to support application specific
# allow clients to extend Calcite's SQL parser to support application specific
# SQL statements, literals or data types.
#
# Optiq's parser grammar file (CombinedParser.jj) is written in javacc
# Calcite's parser grammar file (CombinedParser.jj) is written in javacc
# (http://javacc.java.net/) with Freemarker (http://freemarker.org/) variables
# to allow clients to:
# 1. have custom parser implementation class and package name.
Expand All @@ -30,7 +30,7 @@
# 4. add import statements needed by inserted custom parser implementations.
#
# Parser template file (CombinerParser.jj) along with this file are packaged as
# part of the optiq-core-<version>.jar under "codegen" directory.
# part of the calcite-core-<version>.jar under "codegen" directory.

data: {
parser: {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/net/hydromatic/optiq/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
* <p>Several kinds of members crop up in real life. They all implement the
* {@code Member} interface, but tend to be treated differently by the
* back-end system if not by Optiq.</p>
* back-end system if not by Calcite.</p>
*
* <p>A member that has zero arguments and a type that is a collection of
* records is referred to as a <i>relation</i>. In schemas backed by a
Expand Down
10 changes: 5 additions & 5 deletions core/src/main/java/net/hydromatic/optiq/Schema.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* <p>There may be multiple overloaded functions with the same name but
* different numbers or types of parameters.
* For this reason, {@link #getFunctions} returns a list of all
* members with the same name. Optiq will call
* members with the same name. Calcite will call
* {@link Schemas#resolve(org.eigenbase.reltype.RelDataTypeFactory, String, java.util.Collection, java.util.List)}
* to choose the appropriate one.</p>
*
Expand Down Expand Up @@ -102,23 +102,23 @@ public interface Schema {
* and sub-schemas in this schema, in addition to those returned automatically
* by methods such as {@link #getTable(String)}.
*
* <p>Even if this method returns true, the maps are not modified. Optiq
* <p>Even if this method returns true, the maps are not modified. Calcite
* stores the defined objects in a wrapper object. */
boolean isMutable();

/** Returns whether the contents of this schema have changed since a given
* time. The time is a millisecond value, as returned by
* {@link System#currentTimeMillis()}. If this method returns true, and
* caching is enabled, Optiq will re-build caches.
* caching is enabled, Calcite will re-build caches.
*
* <p>The default implementation in
* {@link net.hydromatic.optiq.impl.AbstractSchema} always returns
* {@code false}.</p>
*
* <p>To control whether Optiq caches the contents of a schema, use the
* <p>To control whether Calcite caches the contents of a schema, use the
* "cache" JSON attribute. The default value is "true".</p>
*
* @param lastCheck The last time that Optiq called this method, or
* @param lastCheck The last time that Calcite called this method, or
* {@link Long#MIN_VALUE} if this is the first call
* @param now The current time in millis, as returned by
* {@link System#currentTimeMillis()}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/net/hydromatic/optiq/SchemaPlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Extension to the {@link Schema} interface.
*
* <p>Given a user-defined schema that implements the {@link Schema} interface,
* Optiq creates a wrapper that implements the {@code SchemaPlus} interface.
* Calcite creates a wrapper that implements the {@code SchemaPlus} interface.
* This provides extra functionality, such as access to tables that have been
* added explicitly.</p>
*
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/net/hydromatic/optiq/Schemas.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static <E> Queryable<E> queryable(DataContext root, SchemaPlus schema,
return table.asQueryable(root.getQueryProvider(), schema, tableName);
}

/** Parses and validates a SQL query. For use within Optiq only. */
/** Parses and validates a SQL query. For use within Calcite only. */
public static OptiqPrepare.ParseResult parse(
final OptiqConnection connection, final OptiqSchema schema,
final List<String> schemaPath, final String sql) {
Expand All @@ -213,7 +213,7 @@ public static OptiqPrepare.ParseResult parse(
}

/** Parses and validates a SQL query and converts to relational algebra. For
* use within Optiq only. */
* use within Calcite only. */
public static OptiqPrepare.ConvertResult convert(
final OptiqConnection connection, final OptiqSchema schema,
final List<String> schemaPath, final String sql) {
Expand All @@ -229,7 +229,7 @@ public static OptiqPrepare.ConvertResult convert(
}
}

/** Prepares a SQL query for execution. For use within Optiq only. */
/** Prepares a SQL query for execution. For use within Calcite only. */
public static OptiqPrepare.PrepareResult<Object> prepare(
final OptiqConnection connection, final OptiqSchema schema,
final List<String> schemaPath, final String sql,
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/net/hydromatic/optiq/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
/**
* Table.
*
* <p>The typical way for a table to be created is when Optiq interrogates
* <p>The typical way for a table to be created is when Calcite interrogates
* a user-defined schema in order to validate names appearing in a SQL query.
* Optiq finds the schema by calling {@link Schema#getSubSchema(String)} on the
* Calcite finds the schema by calling {@link Schema#getSubSchema(String)} on the
* connection's root schema, then gets a table by calling
* {@link Schema#getTable(String)}.</p>
*
Expand Down
Loading

0 comments on commit a6f586a

Please sign in to comment.