blob: 025298c66a398e81109fc78429863713fdb1fb7c [file] [log] [blame]
Apache Ignite Calcite Module
Apache Ignite Calcite module provides experimental Apache Calcite based query engine.
To enable Calcite based engine explicit `CalciteQueryEngineConfiguration` instance should be added to
`SqlConfiguration.QueryEnginesConfiguration` property (see `SqlConfiguration.setQueryEnginesConfiguration()`) or ./examples/config/example-sql.xml.
Config example:
<bean id="queries.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="clientConnectorConfiguration">
<bean class="org.apache.ignite.configuration.ClientConnectorConfiguration">
<property name="host" value=""/>
<property name="port" value="10800"/>
<property name="portRange" value="10"/>
<property name="sqlConfiguration">
<bean class="org.apache.ignite.configuration.SqlConfiguration">
<property name="queryEnginesConfiguration">
<bean class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
<property name="default" value="true"/>
<bean class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration">
<property name="default" value="false"/>
Also, Calcite module libraries should be in a classpath.
When starting a standalone node, move 'optional/ignite-calcite' folder to 'libs' folder before running
'ignite.{sh|bat}' script. The content of the module folder will be added to classpath in this case.
Note: At now some logic from ignite-indexing module is reused, this means ignite-indexing module also
has to be present at classpath.
If more than one engine configured throught "queryEnginesConfiguration" it`s possible to use exact engine:
1. JDBC:
By passing "queryEngine" param.
Connection url via JDBC with Calcite engine: jdbc:ignite:thin://
and with H2 engine: jdbc:ignite:thin://
2. ODBC, connection string samples:
DRIVER=Apache Ignite
DRIVER=Apache Ignite
More extended info can be found here
3. From code or 3-rd party tools:
By using hints:
SELECT /*+ QUERY_ENGINE('h2') */ fld FROM table;
SELECT /*+ QUERY_ENGINE('calcite') */ fld FROM table;
Importing Calcite Module In Maven Project
If you are using Maven to manage dependencies of your project, you can add Calcite module
dependency like this (replace '${ignite.version}' with actual Apache Ignite version you are
interested in):
<project xmlns=""