Add SQL-Gremlin to Adapters page Add description of JDBC connect string
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/9cd2f402 Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/9cd2f402 Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/9cd2f402 Branch: refs/heads/master Commit: 9cd2f40267d7e4ad385f86cb59e9dc39deefc86d Parents: 558e442 Author: Julian Hyde <[email protected]> Authored: Thu Feb 25 15:49:57 2016 -0800 Committer: Julian Hyde <[email protected]> Committed: Fri Mar 4 15:25:59 2016 -0800 ---------------------------------------------------------------------- .../calcite/avatica/ConnectStringParser.java | 11 +++--- site/_docs/adapter.md | 37 ++++++++++++++++++-- 2 files changed, 40 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/9cd2f402/avatica/src/main/java/org/apache/calcite/avatica/ConnectStringParser.java ---------------------------------------------------------------------- diff --git a/avatica/src/main/java/org/apache/calcite/avatica/ConnectStringParser.java b/avatica/src/main/java/org/apache/calcite/avatica/ConnectStringParser.java index 61de10a..0145024 100644 --- a/avatica/src/main/java/org/apache/calcite/avatica/ConnectStringParser.java +++ b/avatica/src/main/java/org/apache/calcite/avatica/ConnectStringParser.java @@ -22,8 +22,8 @@ import java.util.Properties; /** * ConnectStringParser is a utility class that parses or creates a JDBC connect - * string according to the OLE DB connect string syntax described at <a - * href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbconnectionstringsyntax.asp"> + * string according to the + * <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms722656(v=vs.85).aspx"> * OLE DB Connection String Syntax</a>. * * <p>This code was adapted from Mondrian's mondrian.olap.Util class. @@ -32,7 +32,7 @@ import java.util.Properties; * <ul> * <li>use of regular {@link Properties} for compatibility with the JDBC API * (replaces Mondrian's use of its own order-preserving and case-insensitive - * PropertyList, found in Util.java at link above)</li> + * PropertyList)</li> * * <li>ability to pass to {@link #parse} a pre-existing Properties object into * which properties are to be parsed, possibly overriding prior values</li> @@ -217,7 +217,7 @@ public class ConnectStringParser { String value = parseQuoted(c); // skip over trailing white space - while ((i < n) && ((c = s.charAt(i)) == ' ')) { + while (i < n && s.charAt(i) == ' ') { i++; } if (i >= n) { @@ -327,7 +327,7 @@ public class ConnectStringParser { // write parameter value len = value.length(); boolean hasSemi = value.indexOf(';') >= 0; - boolean hasSQ = value.indexOf("'") >= 0; + boolean hasSQ = value.indexOf('\'') >= 0; boolean hasDQ = value.indexOf('"') >= 0; if (value.startsWith(" ") || value.endsWith(" ")) { quote = "'"; @@ -383,6 +383,7 @@ public class ConnectStringParser { */ public static Map<String, String> toMap( final Properties properties) { + //noinspection unchecked return (Map) properties; } } http://git-wip-us.apache.org/repos/asf/calcite/blob/9cd2f402/site/_docs/adapter.md ---------------------------------------------------------------------- diff --git a/site/_docs/adapter.md b/site/_docs/adapter.md index f40c5b8..09c5904 100644 --- a/site/_docs/adapter.md +++ b/site/_docs/adapter.md @@ -22,8 +22,6 @@ limitations under the License. {% endcomment %} --> -* <a href="https://github.com/apache/drill">Apache Drill adapter</a> -* Cascading adapter (<a href="https://github.com/Cascading/lingual">Lingual</a>) * Cassandra adapter (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/cassandra/package-summary.html">calcite-cassandra</a>) * CSV adapter (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/csv/package-summary.html">example/csv</a>) * JDBC adapter (part of <a href="{{ site.apiRoot }}/org/apache/calcite/adapter/jdbc/package-summary.html">calcite-core</a>) @@ -32,13 +30,46 @@ limitations under the License. * Splunk adapter (<a href="{{ site.apiRoot }}/org/apache/calcite/adapter/splunk/package-summary.html">calcite-splunk</a>) * Eclipse Memory Analyzer (MAT) adapter (<a href="https://github.com/vlsi/mat-calcite-plugin">mat-calcite-plugin</a>) +## Engines + +The following standalone engines are powered by Apache Calcite. + +* <a href="https://drill.apache.org">Apache Drill</a> + uses Calcite for SQL parsing and query optimization +* <a href="https://flink.apache.org">Apache Flink</a> + uses Calcite for parsing both regular and streaming SQL, + and for query optimization +* <a href="https://hive.apache.org">Apache Hive</a> + uses Calcite for query optimization +* <a href="https://kylin.apache.org">Apache Kylin</a> + uses Calcite for SQL parsing and query optimization +* <a href="https://phoenix.apache.org">Apache Phoenix</a> + uses Calcite for SQL parsing and query optimization (under development), + and also uses Avatica for its remote JDBC driver +* <a href="https://github.com/milinda/samza-sql">SamzaSQL</a>, + an extension to + <a href="https://samza.apache.org">Apache Samza</a>, + uses Calcite for parsing streaming SQL and query optimization +* <a href="https://storm.apache.org">Apache Storm</a> + uses Calcite for parsing streaming SQL and query optimization +* Cascading adapter (<a href="https://github.com/Cascading/lingual">Lingual</a>) +* <a href="https://github.com/twilmes/sql-gremlin">SQL-Gremlin</a>, + a SQL interface to a + <a href="http://tinkerpop.incubator.apache.org/">Apache TinkerPop</a>-enabled + graph database + ## Drivers * <a href="{{ site.apiRoot }}/org/apache/calcite/jdbc/package-summary.html">JDBC driver</a> The basic form of the JDBC connect string is - "jdbc:calcite:?prop=value&prop2=value2&prop3=value3" + jdbc:calcite:property=value;property2=value2 + +where `property`, `property2` are properties as described below. +(Connect strings are compliant with OLE DB Connect String syntax, +as implemented by Avatica's +<a href="{{ site.apiRoot }}/org/apache/calcite/avatica/ConnectStringParser.html">ConnectStringParser</a>.) JDBC connect string parameters
