This is an automated email from the ASF dual-hosted git repository.
nizhikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 78f4b40a9b7 IGNITE-29117 Both engines must be available. Calcite
default. (#13692)
78f4b40a9b7 is described below
commit 78f4b40a9b7f3bebe8c7a4bbaa0fa888201f648c
Author: Nikolay <[email protected]>
AuthorDate: Fri Oct 16 13:59:27 2026 +0300
IGNITE-29117 Both engines must be available. Calcite default. (#13692)
---
assembly/dependencies-apache-ignite-lgpl.xml | 2 +
assembly/dependencies-apache-ignite-slim.xml | 2 +
assembly/dependencies-apache-ignite.xml | 2 +
docs/_docs/setup.adoc | 4 +-
modules/calcite-testing/pom.xml | 6 +
.../test/config/jdbc-client-driver-calcite.xml} | 34 +-----
.../src/test/config/jdbc-client-driver-h2.xml} | 47 +++-----
.../QueryEngineConfigurationIntegrationTest.java | 20 ++--
.../integration/SqlPlanHistoryIntegrationTest.java | 12 +-
.../jdbc/JdbcClientDriverDefaultEngineTest.java | 122 +++++++++++++++++++++
.../ignite/testsuites/CalciteAndH2TestSuite.java | 2 +
modules/calcite/README.txt | 4 +-
.../CalciteOnlyNodeIntegrationTest.java | 12 +-
.../ignite/configuration/SqlConfiguration.java | 5 +-
.../ignite/internal/jdbc2/JdbcBatchUpdateTask.java | 4 +-
.../jdbc2/JdbcQueryMultipleStatementsTask.java | 4 +-
.../ignite/internal/jdbc2/JdbcQueryTask.java | 8 +-
.../processors/query/GridQueryProcessor.java | 64 ++++++++---
modules/indexing/README.txt | 6 +-
.../indexing/IndexingQueryEngineConfiguration.java | 3 +-
.../core-test/config/cache-identity-default.xml | 13 +++
.../config/cache-query-schema-default.xml | 13 +++
modules/platforms/cpp/core/src/ignition.cpp | 2 +
.../examples/odbc-example/config/example-odbc.xml | 13 +++
.../query-example/config/query-example.xml | 13 +++
.../odbc-test/config/queries-schema-default.xml | 13 +++
.../config/sql-query-fields-default.xml | 13 +++
.../Apache.Ignite.Core.Tests.DotNetCore.csproj | 1 +
.../Apache.Ignite.Core.Tests.csproj | 1 +
.../Binary/Serializable/SqlDmlTest.cs | 4 +-
.../Cache/CacheQueryMetricsTest.cs | 6 +-
.../Cache/Query/CacheDmlQueriesTest.cs | 4 +-
.../Cache/Query/CacheDmlQueriesTestSchema.cs | 4 +-
.../Cache/Query/Linq/CacheLinqTest.Base.cs | 4 +-
.../Client/Cache/SqlQueryTestBase.cs | 11 ++
.../Config/cache-query-continuous.xml | 13 +++
.../Config/cache-query.xml | 13 +++
.../Config/query-engine-h2-default.xml | 39 +++++++
.../Examples/ThickExamplesExternalNodeTest.cs | 6 +-
.../Examples/ThinExamplesTest.cs | 6 +-
.../Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs | 2 +
modules/platforms/dotnet/build.ps1 | 11 +-
.../platforms/dotnet/examples/Shared/Shared.csproj | 4 +
modules/platforms/dotnet/examples/Shared/Utils.cs | 2 +
.../dotnet/examples/Shared/ignite-config.xml | 43 ++++++++
45 files changed, 499 insertions(+), 118 deletions(-)
diff --git a/assembly/dependencies-apache-ignite-lgpl.xml
b/assembly/dependencies-apache-ignite-lgpl.xml
index 51754b12f58..fc875284fe8 100644
--- a/assembly/dependencies-apache-ignite-lgpl.xml
+++ b/assembly/dependencies-apache-ignite-lgpl.xml
@@ -34,6 +34,7 @@
<includes>
<include>${project.groupId}:ignite-spring</include>
<include>${project.groupId}:ignite-calcite</include>
+ <include>${project.groupId}:ignite-indexing</include>
<include>${project.groupId}:ignite-control-utility</include>
</includes>
<sources>
@@ -130,6 +131,7 @@
<exclude>${project.groupId}:ignite-extdata-pluggable</exclude>
<exclude>${project.groupId}:ignite-examples</exclude>
<exclude>${project.groupId}:ignite-calcite</exclude>
+ <exclude>${project.groupId}:ignite-indexing</exclude>
<exclude>${project.groupId}:ignite-codegen</exclude>
<exclude>${project.groupId}:ignite-appserver-test</exclude>
<exclude>${project.groupId}:ignite-websphere-test</exclude>
diff --git a/assembly/dependencies-apache-ignite-slim.xml
b/assembly/dependencies-apache-ignite-slim.xml
index 68cfd59abbc..c5507370289 100644
--- a/assembly/dependencies-apache-ignite-slim.xml
+++ b/assembly/dependencies-apache-ignite-slim.xml
@@ -34,6 +34,7 @@
<includes>
<include>${project.groupId}:ignite-spring</include>
<include>${project.groupId}:ignite-calcite</include>
+ <include>${project.groupId}:ignite-indexing</include>
<include>${project.groupId}:ignite-control-utility</include>
</includes>
<sources>
@@ -130,6 +131,7 @@
<exclude>${project.groupId}:ignite-extdata-pluggable</exclude>
<exclude>${project.groupId}:ignite-examples</exclude>
<exclude>${project.groupId}:ignite-calcite</exclude>
+ <exclude>${project.groupId}:ignite-indexing</exclude>
<exclude>${project.groupId}:ignite-codegen</exclude>
<exclude>${project.groupId}:ignite-schedule</exclude>
<exclude>${project.groupId}:ignite-appserver-test</exclude>
diff --git a/assembly/dependencies-apache-ignite.xml
b/assembly/dependencies-apache-ignite.xml
index cc6b475b106..bcfaad84170 100644
--- a/assembly/dependencies-apache-ignite.xml
+++ b/assembly/dependencies-apache-ignite.xml
@@ -34,6 +34,7 @@
<includes>
<include>${project.groupId}:ignite-spring</include>
<include>${project.groupId}:ignite-calcite</include>
+ <include>${project.groupId}:ignite-indexing</include>
<include>${project.groupId}:ignite-control-utility</include>
</includes>
<sources>
@@ -131,6 +132,7 @@
<exclude>${project.groupId}:ignite-extdata-pluggable</exclude>
<exclude>${project.groupId}:ignite-examples</exclude>
<exclude>${project.groupId}:ignite-calcite</exclude>
+ <exclude>${project.groupId}:ignite-indexing</exclude>
<exclude>${project.groupId}:ignite-codegen</exclude>
<exclude>${project.groupId}:ignite-schedule</exclude>
<exclude>${project.groupId}:ignite-appserver-test</exclude>
diff --git a/docs/_docs/setup.adoc b/docs/_docs/setup.adoc
index 8cdb8bcc9e0..d70ce9a131c 100644
--- a/docs/_docs/setup.adoc
+++ b/docs/_docs/setup.adoc
@@ -151,8 +151,8 @@ Ignite ships with a number of modules and have a lot of
extensions that provide
You can enable modules or extensions one by one, as required.
All modules are included in the binary distribution, but by default they
-are disabled (except for the `ignite-core`, `ignite-spring`,
`ignite-control-utility` and
-`ignite-indexing` modules). Modules can be found in the `libs/optional`
+are disabled (except for the `ignite-core`, `ignite-spring`,
`ignite-control-utility`,
+`ignite-calcite` and `ignite-indexing` modules). Modules can be found in the
`libs/optional`
directory of the distribution package (each module is located in a
separate sub-directory).
diff --git a/modules/calcite-testing/pom.xml b/modules/calcite-testing/pom.xml
index ab7ed13e5f2..b0381ed85e4 100644
--- a/modules/calcite-testing/pom.xml
+++ b/modules/calcite-testing/pom.xml
@@ -66,6 +66,12 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ignite-spring</artifactId>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-calcite</artifactId>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
b/modules/calcite-testing/src/test/config/jdbc-client-driver-calcite.xml
similarity index 57%
copy from modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
copy to modules/calcite-testing/src/test/config/jdbc-client-driver-calcite.xml
index bcdaec578c5..64f8a2074f5 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
+++ b/modules/calcite-testing/src/test/config/jdbc-client-driver-calcite.xml
@@ -17,37 +17,15 @@
limitations under the License.
-->
-<!--
- Ignite Spring configuration file to startup grid cache.
--->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean abstract="true" id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="clientMode" value="true"/>
<property name="localHost" value="127.0.0.1"/>
- <property name="connectorConfiguration"><null/></property>
-
- <property name="clientConnectorConfiguration">
- <bean
class="org.apache.ignite.configuration.ClientConnectorConfiguration">
- <property name="host" value="127.0.0.1"/>
- <property name="port" value="11110"/>
- <property name="portRange" value="10"/>
- </bean>
- </property>
-
- <property name="sqlSchemas">
- <list>
- <value>SCHEMA_1</value>
- <value>SCHEMA_2</value>
- <value>"ScHeMa3"</value>
- <value>SCHEMA_4</value>
- </list>
- </property>
+ <property name="peerClassLoadingEnabled" value="true"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
@@ -55,13 +33,11 @@
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
- <!-- In distributed environment, replace with
actual host IP address. -->
- <value>127.0.0.1:47500</value>
+ <value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
- <property name="socketTimeout" value="300" />
</bean>
</property>
</bean>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
b/modules/calcite-testing/src/test/config/jdbc-client-driver-h2.xml
similarity index 58%
copy from modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
copy to modules/calcite-testing/src/test/config/jdbc-client-driver-h2.xml
index bcdaec578c5..27bf72b11c7 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
+++ b/modules/calcite-testing/src/test/config/jdbc-client-driver-h2.xml
@@ -17,37 +17,15 @@
limitations under the License.
-->
-<!--
- Ignite Spring configuration file to startup grid cache.
--->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean abstract="true" id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="clientMode" value="true"/>
<property name="localHost" value="127.0.0.1"/>
- <property name="connectorConfiguration"><null/></property>
-
- <property name="clientConnectorConfiguration">
- <bean
class="org.apache.ignite.configuration.ClientConnectorConfiguration">
- <property name="host" value="127.0.0.1"/>
- <property name="port" value="11110"/>
- <property name="portRange" value="10"/>
- </bean>
- </property>
-
- <property name="sqlSchemas">
- <list>
- <value>SCHEMA_1</value>
- <value>SCHEMA_2</value>
- <value>"ScHeMa3"</value>
- <value>SCHEMA_4</value>
- </list>
- </property>
+ <property name="peerClassLoadingEnabled" value="true"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
@@ -55,13 +33,24 @@
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
- <!-- In distributed environment, replace with
actual host IP address. -->
- <value>127.0.0.1:47500</value>
+ <value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
</property>
- <property name="socketTimeout" value="300" />
+ </bean>
+ </property>
+
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
</bean>
</property>
</bean>
diff --git
a/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/QueryEngineConfigurationIntegrationTest.java
b/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/QueryEngineConfigurationIntegrationTest.java
index 272fb24019d..24cb8f4d2b1 100644
---
a/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/QueryEngineConfigurationIntegrationTest.java
+++
b/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/QueryEngineConfigurationIntegrationTest.java
@@ -99,7 +99,7 @@ public class QueryEngineConfigurationIntegrationTest extends
GridCommonAbstractW
/** */
@Test
public void testDefaultEngineConfiguration() throws Exception {
- checkDefaultEngine(INDEXING_ENGINE);
+ checkDefaultEngine(CALCITE_ENGINE);
checkDefaultEngine(INDEXING_ENGINE, new
IndexingQueryEngineConfiguration(),
new CalciteQueryEngineConfiguration());
@@ -149,22 +149,28 @@ public class QueryEngineConfigurationIntegrationTest
extends GridCommonAbstractW
}
}
- /** */
+ /** Without an explicit configuration both engines on the classpath can be
selected by name. */
@Test
@SuppressWarnings("ThrowableNotThrown")
public void testEngineWithoutConfiguration() throws Exception {
try (Ignite ignite = startGrid(createConfiguration())) {
IgniteCache<?, ?> cache = ignite.createCache("test");
- // Hint can't be used when engines is not configured.
+ checkEngine(cache, CALCITE_ENGINE, "SELECT QUERY_ENGINE()");
+ checkEngine(cache, INDEXING_ENGINE, "SELECT /*+ QUERY_ENGINE('" +
INDEXING_ENGINE + "') */ QUERY_ENGINE()");
+ checkEngine(cache, CALCITE_ENGINE, "SELECT /*+ QUERY_ENGINE('" +
CALCITE_ENGINE + "') */ QUERY_ENGINE()");
+
+ checkJdbcEngine(CALCITE_ENGINE, jdbcUrl, "SELECT QUERY_ENGINE()");
+ checkJdbcEngine(INDEXING_ENGINE, jdbcUrl + "?queryEngine=" +
INDEXING_ENGINE, "SELECT QUERY_ENGINE()");
+ checkJdbcEngine(CALCITE_ENGINE, jdbcUrl + "?queryEngine=" +
CALCITE_ENGINE, "SELECT QUERY_ENGINE()");
+
+ // Unknown engine.
GridTestUtils.assertThrowsWithCause(
- () -> cache.query(new SqlFieldsQuery(
- "SELECT /*+ QUERY_ENGINE('" + INDEXING_ENGINE + "') */
QUERY_ENGINE()")).getAll(),
+ () -> cache.query(new SqlFieldsQuery("SELECT /*+
QUERY_ENGINE('noop') */ QUERY_ENGINE()")).getAll(),
IgniteException.class);
- // JDBC connection property can't be used when engines is not
configured.
GridTestUtils.assertThrowsWithCause(
- () -> DriverManager.getConnection(jdbcUrl + "?queryEngine=" +
INDEXING_ENGINE),
+ () -> DriverManager.getConnection(jdbcUrl +
"?queryEngine=noop"),
SQLException.class);
}
}
diff --git
a/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlPlanHistoryIntegrationTest.java
b/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlPlanHistoryIntegrationTest.java
index 54369aabf2e..b4a02664bd6 100644
---
a/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlPlanHistoryIntegrationTest.java
+++
b/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlPlanHistoryIntegrationTest.java
@@ -480,25 +480,25 @@ public class SqlPlanHistoryIntegrationTest extends
GridCommonAbstractWrapperTest
}
/**
- * Checks that the actual SQL plan history remains empty and its size in
{@link SqlConfiguration} equals {@code -1}
- * when SQL is not explicitly configured. In such cases, H2 is used as the
default engine.
+ * Checks that the SQL plan history is enabled with the default size when
SQL is not explicitly configured. In such
+ * cases, both engines are on the classpath and Calcite is used as the
default engine.
*/
@Test
public void testNoSqlConfiguration() throws Exception {
isSqlConfigured = false;
- checkDefaultHistorySize(true, -1, 0, 1);
+ checkDefaultHistorySize(true, DFLT_SQL_PLAN_HISTORY_SIZE,
DFLT_SQL_PLAN_HISTORY_SIZE, DFLT_SQL_PLAN_HISTORY_SIZE);
}
/**
- * Checks that the actual SQL plan history remains empty and its size in
{@link SqlConfiguration} equals {@code -1}
- * when the SQL engine is not configured. In such cases, H2 is used as the
default engine.
+ * Checks that the SQL plan history is enabled with the default size when
the SQL engine is not configured. In such
+ * cases, both engines are on the classpath and Calcite is used as the
default engine.
*/
@Test
public void testNoSqlEngineConfiguration() throws Exception {
isSqlEngineConfigured = false;
- checkDefaultHistorySize(true, -1, 0, 1);
+ checkDefaultHistorySize(true, DFLT_SQL_PLAN_HISTORY_SIZE,
DFLT_SQL_PLAN_HISTORY_SIZE, DFLT_SQL_PLAN_HISTORY_SIZE);
}
/**
diff --git
a/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/jdbc/JdbcClientDriverDefaultEngineTest.java
b/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/jdbc/JdbcClientDriverDefaultEngineTest.java
new file mode 100644
index 00000000000..e9af8fd7941
--- /dev/null
+++
b/modules/calcite-testing/src/test/java/org/apache/ignite/internal/processors/query/calcite/jdbc/JdbcClientDriverDefaultEngineTest.java
@@ -0,0 +1,122 @@
+/*
+ * 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.
+ */
+
+package org.apache.ignite.internal.processors.query.calcite.jdbc;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.List;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.calcite.CalciteQueryEngineConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.SqlConfiguration;
+import org.apache.ignite.indexing.IndexingQueryEngineConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.Parameter;
+import org.junit.jupiter.params.ParameterizedClass;
+import org.junit.jupiter.params.provider.ValueSource;
+
+/** Checks that the JDBC Client Driver ({@code jdbc:ignite:cfg://}) works with
any default SQL engine of the client node it starts. */
+@ParameterizedClass(name = "engine={0}")
+@ValueSource(strings = {IndexingQueryEngineConfiguration.ENGINE_NAME,
CalciteQueryEngineConfiguration.ENGINE_NAME})
+public class JdbcClientDriverDefaultEngineTest extends AbstractJdbcTest {
+ /** Directory with the Spring XML configurations of the client node
started by the driver. */
+ private static final String CFG_DIR =
"modules/calcite-testing/src/test/config/";
+
+ /** Name of the default engine. */
+ @Parameter(0)
+ private String dfltEngine;
+
+ /** */
+ private Connection conn;
+
+ /** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String
igniteInstanceName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+ if (dfltEngine.equals(IndexingQueryEngineConfiguration.ENGINE_NAME)) {
+ cfg.setSqlConfiguration(new
SqlConfiguration().setQueryEnginesConfiguration(
+ new IndexingQueryEngineConfiguration().setDefault(true),
+ new CalciteQueryEngineConfiguration()));
+ }
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
+ @BeforeEach
+ @Override protected void beforeTest() throws Exception {
+ startGrid(0);
+
+ serverSql("CREATE TABLE test (id INT PRIMARY KEY, val VARCHAR)");
+ serverSql("INSERT INTO test VALUES (1, 'val1'), (2, 'val2')");
+
+ conn = DriverManager.getConnection("jdbc:ignite:cfg://" + CFG_DIR +
"jdbc-client-driver-" + dfltEngine + ".xml");
+
+ conn.setSchema("PUBLIC");
+ }
+
+ /** {@inheritDoc} */
+ @AfterEach
+ @Override protected void afterTest() throws Exception {
+ U.closeQuiet(conn);
+
+ stopAllGrids();
+ }
+
+ /** */
+ @Test
+ public void testSelect() throws Exception {
+ checkEngine();
+
+ List<List<Object>> res = executeQuery(conn, "SELECT id, val FROM test
ORDER BY id");
+
+ assertEquals(2, res.size());
+ assertEquals(1, res.get(0).get(0));
+ assertEquals("val1", res.get(0).get(1));
+ assertEquals(2, res.get(1).get(0));
+ assertEquals("val2", res.get(1).get(1));
+ }
+
+ /** */
+ @Test
+ public void testDml() throws Exception {
+ try (Statement stmt = conn.createStatement()) {
+ assertEquals(1, stmt.executeUpdate("INSERT INTO test VALUES (3,
'val3')"));
+ }
+
+ assertEquals(3L, serverSql("SELECT COUNT(*) FROM test").get(0).get(0));
+ }
+
+ /** Executes a query on the server node with its default engine. */
+ private List<List<?>> serverSql(String sql) {
+ return grid(0).context().query().querySqlFields(new
SqlFieldsQuery(sql), false).getAll();
+ }
+
+ /** */
+ private void checkEngine() throws SQLException {
+ List<List<Object>> res = executeQuery(conn, "SELECT QUERY_ENGINE()");
+
+ assertEquals(1, res.size());
+ assertEquals(dfltEngine, res.get(0).get(0));
+ }
+}
diff --git
a/modules/calcite-testing/src/test/java/org/apache/ignite/testsuites/CalciteAndH2TestSuite.java
b/modules/calcite-testing/src/test/java/org/apache/ignite/testsuites/CalciteAndH2TestSuite.java
index df0f4114243..6ad50c47028 100644
---
a/modules/calcite-testing/src/test/java/org/apache/ignite/testsuites/CalciteAndH2TestSuite.java
+++
b/modules/calcite-testing/src/test/java/org/apache/ignite/testsuites/CalciteAndH2TestSuite.java
@@ -24,6 +24,7 @@ import
org.apache.ignite.internal.processors.query.calcite.integration.ResultSet
import
org.apache.ignite.internal.processors.query.calcite.integration.SqlPlanHistoryIntegrationTest;
import
org.apache.ignite.internal.processors.query.calcite.integration.TimeoutIntegrationTest;
import
org.apache.ignite.internal.processors.query.calcite.integration.ViewsIntegrationTest;
+import
org.apache.ignite.internal.processors.query.calcite.jdbc.JdbcClientDriverDefaultEngineTest;
import
org.apache.ignite.internal.processors.query.calcite.jdbc.JdbcCrossEngineTest;
import
org.apache.ignite.internal.processors.query.calcite.thin.MultiLineQueryTest;
import
org.apache.ignite.internal.processors.tx.TxWithExceptionalInterceptorTest;
@@ -36,6 +37,7 @@ import org.junit.platform.suite.api.Suite;
@Suite
@SelectClasses({
JdbcCrossEngineTest.class,
+ JdbcClientDriverDefaultEngineTest.class,
MultiLineQueryTest.class,
TimeoutIntegrationTest.class,
TxWithExceptionalInterceptorTest.class,
diff --git a/modules/calcite/README.txt b/modules/calcite/README.txt
index 5b31619d755..854e2c680d2 100644
--- a/modules/calcite/README.txt
+++ b/modules/calcite/README.txt
@@ -3,8 +3,8 @@ Apache Ignite Calcite Module
Apache Ignite Calcite module provides 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.
+Calcite based engine is default.
+If legacy mode required then `IndexingQueryEngineConfiguration` must be set as
default.
Config example:
<bean id="queries.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
diff --git
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/CalciteOnlyNodeIntegrationTest.java
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/CalciteOnlyNodeIntegrationTest.java
index 54de44b55a2..be47f1798b5 100644
---
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/CalciteOnlyNodeIntegrationTest.java
+++
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/CalciteOnlyNodeIntegrationTest.java
@@ -63,6 +63,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import static
org.apache.ignite.internal.processors.query.GridQueryProcessor.INDEXING_ENGINE_NAME;
import static org.apache.ignite.testframework.GridTestUtils.assertThrows;
import static
org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;
@@ -80,9 +81,6 @@ public class CalciteOnlyNodeIntegrationTest extends
GridCommonAbstractWrapperTes
public static final String H2_ONLY_QRY_MSG = "is supported by the H2 query
engine only. Add module " +
"'ignite-indexing' to the classpath of all Ignite nodes";
- /** Name of the H2 engine, which is not available to the node. */
- private static final String H2_ENGINE_NAME = "h2";
-
/** */
private static final String[] CLASS_PATH_PROPS = {"java.class.path",
"surefire.test.class.path"};
@@ -291,9 +289,9 @@ public class CalciteOnlyNodeIntegrationTest extends
GridCommonAbstractWrapperTes
public void testJdbcH2QueryEngineProperty() {
assertThrowsAnyCause(
log,
- () -> DriverManager.getConnection(JDBC_URL + "?queryEngine=" +
H2_ENGINE_NAME),
+ () -> DriverManager.getConnection(JDBC_URL + "?queryEngine=" +
INDEXING_ENGINE_NAME),
SQLException.class,
- "Not found configuration for query engine: " + H2_ENGINE_NAME
+ "Not found configuration for query engine: " + INDEXING_ENGINE_NAME
);
}
@@ -314,7 +312,7 @@ public class CalciteOnlyNodeIntegrationTest extends
GridCommonAbstractWrapperTes
/** The H2 engine cannot be selected by the query hint. */
@Test
public void testH2QueryEngineHint() throws Exception {
- String qry = "SELECT /*+ QUERY_ENGINE('" + H2_ENGINE_NAME + "') */
QUERY_ENGINE()";
+ String qry = "SELECT /*+ QUERY_ENGINE('" + INDEXING_ENGINE_NAME + "')
*/ QUERY_ENGINE()";
try (Connection conn = DriverManager.getConnection(JDBC_URL);
Statement stmt = conn.createStatement()
@@ -323,7 +321,7 @@ public class CalciteOnlyNodeIntegrationTest extends
GridCommonAbstractWrapperTes
log,
() -> stmt.executeQuery(qry),
SQLException.class,
- "Query engine not found: " + H2_ENGINE_NAME
+ "Query engine not found: " + INDEXING_ENGINE_NAME
);
}
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/configuration/SqlConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/SqlConfiguration.java
index 7bead0b04e7..af440ad2d4d 100644
---
a/modules/core/src/main/java/org/apache/ignite/configuration/SqlConfiguration.java
+++
b/modules/core/src/main/java/org/apache/ignite/configuration/SqlConfiguration.java
@@ -229,8 +229,9 @@ public class SqlConfiguration {
* {@code QUERY_ENGINE('engineName')} SQL query hint. If no query engine
is explicitly chosen, default query engine
* will be used (see {@link QueryEngineConfiguration#setDefault(boolean)}).
* <p>
- * When this property is not set, the query engine cannot be chosen in
run-time, and the engine provided by the
- * ignite-indexing module will be used for all queries.
+ * When this property is not set, the query engines found on the classpath
are used: the Calcite-based engine
+ * (the ignite-calcite module) is the default one and the H2-based engine
(the ignite-indexing module), if present,
+ * can be chosen in run-time. If only one of the modules is on the
classpath, its engine is used for all queries.
*
* @param enginesConfiguration Query engines configuration.
* @return {@code this} for chaining.
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBatchUpdateTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBatchUpdateTask.java
index d3a1ce3cb45..6c4f345cb2c 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBatchUpdateTask.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBatchUpdateTask.java
@@ -27,8 +27,8 @@ import org.apache.ignite.IgniteJdbcDriver;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
+import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
import org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
import org.apache.ignite.internal.util.typedef.F;
@@ -174,7 +174,7 @@ class JdbcBatchUpdateTask implements IgniteCallable<int[]> {
qry.setSchema(schemaName);
qry.setArgs(args == null ? null : args.toArray());
- QueryCursorImpl<List<?>> qryCursor =
(QueryCursorImpl<List<?>>)cache.withKeepBinary().query(qry);
+ QueryCursorEx<List<?>> qryCursor =
(QueryCursorEx<List<?>>)cache.withKeepBinary().query(qry);
if (qryCursor.isQuery()) {
throw createJdbcSqlException(getError("Query produced result set",
qry),
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryMultipleStatementsTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryMultipleStatementsTask.java
index 9b0ae1935d5..975d31d50b0 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryMultipleStatementsTask.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryMultipleStatementsTask.java
@@ -29,7 +29,7 @@ import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
+import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
import org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -136,7 +136,7 @@ class JdbcQueryMultipleStatementsTask implements
IgniteCallable<List<JdbcStateme
throw new SQLException("COPY command is currently supported
only in thin JDBC driver.");
}
- QueryCursorImpl<List<?>> cur = (QueryCursorImpl<List<?>>)cur0;
+ QueryCursorEx<List<?>> cur = (QueryCursorEx<List<?>>)cur0;
long updCnt = -1;
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryTask.java
index 773976bc74e..9493e31039c 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryTask.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcQueryTask.java
@@ -36,7 +36,7 @@ import org.apache.ignite.cache.query.FieldsQueryCursor;
import org.apache.ignite.cache.query.QueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
+import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
import org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx;
import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
import org.apache.ignite.internal.util.typedef.CAX;
@@ -178,7 +178,7 @@ class JdbcQueryTask implements
IgniteCallable<JdbcQueryTaskResult> {
throw new SQLException("COPY command is currently supported
only in thin JDBC driver.");
}
- QueryCursorImpl<List<?>> qryCursor =
(QueryCursorImpl<List<?>>)fldQryCursor;
+ QueryCursorEx<List<?>> qryCursor =
(QueryCursorEx<List<?>>)fldQryCursor;
if (isQry == null)
isQry = qryCursor.isQuery();
@@ -362,8 +362,8 @@ class JdbcQueryTask implements
IgniteCallable<JdbcQueryTaskResult> {
/**
* @return Cursor.
*/
- public QueryCursorImpl<List<?>> queryCursor() {
- return (QueryCursorImpl<List<?>>)cursor;
+ public QueryCursorEx<List<?>> queryCursor() {
+ return (QueryCursorEx<List<?>>)cursor;
}
}
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index c64e2e4f724..62b46330621 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -202,6 +202,9 @@ public class GridQueryProcessor extends
GridProcessorAdapter {
public static final String INDEXING_DISABLED_MSG = "Failed to execute
query because indexing is disabled " +
"(consider adding module '" + INDEXING.module() + "' to classpath or
moving it from 'optional' to 'libs' folder).";
+ /** */
+ public static final String INDEXING_ENGINE_NAME = "h2";
+
/** */
private static final ThreadLocal<AffinityTopologyVersion> requestTopVer =
new ThreadLocal<>();
@@ -562,19 +565,7 @@ public class GridQueryProcessor extends
GridProcessorAdapter {
QueryEngineConfiguration[] qryEnginesCfg =
ctx.config().getSqlConfiguration().getQueryEnginesConfiguration();
if (F.isEmpty(qryEnginesCfg)) {
- // No query engines explicitly configured - indexing will be used.
- // If indexing is disabled, try to find any query engine in
components.
- if (!indexingEnabled()) {
- for (GridComponent cmp : ctx.components()) {
- if (cmp instanceof QueryEngine qryEngine &&
qryEngine.config() != null) {
- qryEngines = new QueryEngine[] {qryEngine};
- dfltQryEngine = qryEngine;
- this.qryEnginesCfg = new QueryEngineConfigurationEx[]
{qryEngine.config()};
-
- break;
- }
- }
- }
+ initImplicitQueryEngines();
return;
}
@@ -639,6 +630,53 @@ public class GridQueryProcessor extends
GridProcessorAdapter {
dfltQryEngine = qryEngines[dfltQryEngineIdx];
}
+ /**
+ * Registers the query engines found on the classpath.
+ * A query engine component that provides its own configuration (the
Calcite-based engine) becomes the default engine.
+ * The indexing (H2) engine, if it is on the classpath too, remains
available by name.
+ */
+ private void initImplicitQueryEngines() {
+ QueryEngine qryEngine = null;
+
+ for (GridComponent cmp : ctx.components()) {
+ if (cmp instanceof QueryEngine qryEngine0 && qryEngine0.config()
!= null) {
+ qryEngine = qryEngine0;
+
+ break;
+ }
+ }
+
+ if (qryEngine == null)
+ return;
+
+ if (indexingEnabled()) {
+ qryEngines = new QueryEngine[] {qryEngine, null};
+ qryEnginesCfg = new QueryEngineConfigurationEx[]
{qryEngine.config(), new QueryEngineConfigurationEx() {
+ @Override public String engineName() {
+ return INDEXING_ENGINE_NAME;
+ }
+
+ @Override public Class<? extends QueryEngine> engineClass() {
+ return IndexingQueryEngine.class;
+ }
+
+ @Override public boolean isDefault() {
+ return false;
+ }
+
+ @Override public QueryEngineConfiguration setDefault(boolean
isDflt) {
+ throw new UnsupportedOperationException("Implicit query
engine configuration is read-only.");
+ }
+ } };
+ }
+ else {
+ qryEngines = new QueryEngine[] {qryEngine};
+ qryEnginesCfg = new QueryEngineConfigurationEx[]
{qryEngine.config()};
+ }
+
+ dfltQryEngine = qryEngine;
+ }
+
/**
* @return Information about secondary indexes inline size. Key is a full
index name, value is a effective inline size.
* @see IndexProcessor#secondaryIndexesInlineSize()
diff --git a/modules/indexing/README.txt b/modules/indexing/README.txt
index f0ea6ba8d0b..fadbaba566d 100644
--- a/modules/indexing/README.txt
+++ b/modules/indexing/README.txt
@@ -4,9 +4,9 @@ Apache Ignite Indexing Module
Apache Ignite indexing module provides capabilities to index cache context and
run SQL, full text or
individual field queries against these indexes.
-To enable indexing module when starting a standalone node, move
'optional/ignite-indexing' folder to
-'libs' folder before running 'ignite.{sh|bat}' script. The content of the
module folder will
-be added to classpath in this case.
+The module is located in the 'libs' folder of the binary distribution and is
enabled by default. It provides
+the H2-based SQL engine. When the Calcite-based engine (the 'ignite-calcite'
module) is on the classpath too and
+`SqlConfiguration.QueryEnginesConfiguration` is not set, the Calcite-based
engine is the default one.
Importing indexing Module In Maven Project
------------------------------------------
diff --git
a/modules/indexing/src/main/java/org/apache/ignite/indexing/IndexingQueryEngineConfiguration.java
b/modules/indexing/src/main/java/org/apache/ignite/indexing/IndexingQueryEngineConfiguration.java
index cfba6aa376a..878f22b6d52 100644
---
a/modules/indexing/src/main/java/org/apache/ignite/indexing/IndexingQueryEngineConfiguration.java
+++
b/modules/indexing/src/main/java/org/apache/ignite/indexing/IndexingQueryEngineConfiguration.java
@@ -17,6 +17,7 @@
package org.apache.ignite.indexing;
+import org.apache.ignite.internal.processors.query.GridQueryProcessor;
import org.apache.ignite.internal.processors.query.IndexingQueryEngine;
import org.apache.ignite.internal.processors.query.QueryEngine;
import org.apache.ignite.internal.processors.query.QueryEngineConfigurationEx;
@@ -26,7 +27,7 @@ import
org.apache.ignite.internal.processors.query.QueryEngineConfigurationEx;
*/
public class IndexingQueryEngineConfiguration implements
QueryEngineConfigurationEx {
/** Query engine name. */
- public static final String ENGINE_NAME = "h2";
+ public static final String ENGINE_NAME =
GridQueryProcessor.INDEXING_ENGINE_NAME;
/** */
private boolean isDflt;
diff --git a/modules/platforms/cpp/core-test/config/cache-identity-default.xml
b/modules/platforms/cpp/core-test/config/cache-identity-default.xml
index a73d0bbd392..36e7fcc4edd 100644
--- a/modules/platforms/cpp/core-test/config/cache-identity-default.xml
+++ b/modules/platforms/cpp/core-test/config/cache-identity-default.xml
@@ -29,6 +29,19 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean abstract="true" id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
diff --git
a/modules/platforms/cpp/core-test/config/cache-query-schema-default.xml
b/modules/platforms/cpp/core-test/config/cache-query-schema-default.xml
index 84c12e12331..724130bb704 100644
--- a/modules/platforms/cpp/core-test/config/cache-query-schema-default.xml
+++ b/modules/platforms/cpp/core-test/config/cache-query-schema-default.xml
@@ -29,6 +29,19 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean abstract="true" id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
diff --git a/modules/platforms/cpp/core/src/ignition.cpp
b/modules/platforms/cpp/core/src/ignition.cpp
index 40e3b7ffa4d..367b290f196 100644
--- a/modules/platforms/cpp/core/src/ignition.cpp
+++ b/modules/platforms/cpp/core/src/ignition.cpp
@@ -171,6 +171,8 @@ namespace ignite
opts.push_back(CopyChars("--add-opens=java.base/java.lang.invoke=ALL-UNNAMED"));
opts.push_back(CopyChars("--add-opens=java.base/java.math=ALL-UNNAMED"));
opts.push_back(CopyChars("--add-opens=java.sql/java.sql=ALL-UNNAMED"));
+
opts.push_back(CopyChars("--add-opens=java.base/java.time=ALL-UNNAMED"));
+
opts.push_back(CopyChars("--add-opens=java.base/java.text=ALL-UNNAMED"));
opts.push_back(CopyChars("--add-opens=java.logging/java.util.logging=ALL-UNNAMED"));
}
}
diff --git
a/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
index d170d6b68ee..244fc511f6f 100644
--- a/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
+++ b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
@@ -26,6 +26,19 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="cacheKeyConfiguration">
<list>
diff --git
a/modules/platforms/cpp/examples/query-example/config/query-example.xml
b/modules/platforms/cpp/examples/query-example/config/query-example.xml
index 758da99d3e4..2e9c2b646af 100644
--- a/modules/platforms/cpp/examples/query-example/config/query-example.xml
+++ b/modules/platforms/cpp/examples/query-example/config/query-example.xml
@@ -26,6 +26,19 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<!-- Set to true to enable distributed class loading for examples,
default is false. -->
<property name="peerClassLoadingEnabled" value="true"/>
diff --git a/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
b/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
index bcdaec578c5..4f09b1ffc64 100644
--- a/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
+++ b/modules/platforms/cpp/odbc-test/config/queries-schema-default.xml
@@ -29,6 +29,19 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean abstract="true" id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
diff --git
a/modules/platforms/cpp/thin-client-test/config/sql-query-fields-default.xml
b/modules/platforms/cpp/thin-client-test/config/sql-query-fields-default.xml
index 5a2c6abd0a1..72d39a9571f 100644
--- a/modules/platforms/cpp/thin-client-test/config/sql-query-fields-default.xml
+++ b/modules/platforms/cpp/thin-client-test/config/sql-query-fields-default.xml
@@ -29,6 +29,19 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean abstract="true" id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="localHost" value="127.0.0.1"/>
<property name="connectorConfiguration"><null/></property>
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
index 99fd2689f5e..627e0814de7 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
@@ -58,6 +58,7 @@
<None Update="Config\cache-default.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\native-client-test-cache-store.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\cache-query.xml"
CopyToOutputDirectory="PreserveNewest" />
+ <None Update="Config\query-engine-h2-default.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\cache-query-continuous.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\ignite-dotnet-cfg-logger.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\cache-binarizables.xml"
CopyToOutputDirectory="PreserveNewest" />
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index 7f2df3da76b..6fe497fefb5 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -78,6 +78,7 @@
<None Update="Config\cache-default.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\native-client-test-cache-store.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\cache-query.xml"
CopyToOutputDirectory="PreserveNewest" />
+ <None Update="Config\query-engine-h2-default.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\cache-query-continuous.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\ignite-dotnet-cfg-logger.xml"
CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\cache-binarizables.xml"
CopyToOutputDirectory="PreserveNewest" />
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs
index b368d811d5a..800051353ec 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/Serializable/SqlDmlTest.cs
@@ -21,6 +21,7 @@
namespace Apache.Ignite.Core.Tests.Binary.Serializable
{
using System;
+ using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
@@ -52,7 +53,8 @@ namespace Apache.Ignite.Core.Tests.Binary.Serializable
{
NameMapper = new BinaryBasicNameMapper {IsSimpleName =
true}
},
- Logger = new ListLogger(new TestUtils.TestContextLogger())
{EnabledLevels = new[] {LogLevel.Warn}}
+ Logger = new ListLogger(new TestUtils.TestContextLogger())
{EnabledLevels = new[] {LogLevel.Warn}},
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
};
_ignite = Ignition.Start(cfg);
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheQueryMetricsTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheQueryMetricsTest.cs
index 70eba6f0d06..63cf94f12e8 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheQueryMetricsTest.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheQueryMetricsTest.cs
@@ -20,6 +20,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+ using System.IO;
using System.Linq;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
@@ -39,7 +40,10 @@ namespace Apache.Ignite.Core.Tests.Cache
[TestFixtureSetUp]
public void FixtureSetUp()
{
- Ignition.Start(TestUtils.GetTestConfiguration());
+ Ignition.Start(new
IgniteConfiguration(TestUtils.GetTestConfiguration())
+ {
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
+ });
}
/// <summary>
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
index b9a5798b5e1..16a7326a878 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
@@ -20,6 +20,7 @@
namespace Apache.Ignite.Core.Tests.Cache.Query
{
using System;
+ using System.IO;
using System.Linq;
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Cache.Configuration;
@@ -44,7 +45,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
BinaryConfiguration = new BinaryConfiguration(typeof(Foo),
typeof(Key), typeof(Key2), typeof(KeyAll))
{
NameMapper = GetNameMapper()
- }
+ },
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
};
Ignition.Start(cfg);
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTestSchema.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTestSchema.cs
index f0f56116209..371c1a99d74 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTestSchema.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTestSchema.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
{
using System;
using System.Collections.Generic;
+ using System.IO;
using System.Linq;
using Apache.Ignite.Core.Cache.Query;
using Apache.Ignite.Core.Common;
@@ -53,7 +54,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
SchemaName2,
QSchemaName4,
SchemaName4
- }
+ },
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
};
Ignition.Start(cfg);
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Base.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Base.cs
index 209184505b5..dc84f6449c2 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Base.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Base.cs
@@ -28,6 +28,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Linq
{
using System;
using System.Collections;
+ using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
@@ -131,7 +132,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Linq
{
NameMapper = GetNameMapper()
},
- IgniteInstanceName = gridName
+ IgniteInstanceName = gridName,
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
};
}
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/SqlQueryTestBase.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/SqlQueryTestBase.cs
index 7efcb9c4a06..db65247c309 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/SqlQueryTestBase.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/SqlQueryTestBase.cs
@@ -17,6 +17,7 @@
namespace Apache.Ignite.Core.Tests.Client.Cache
{
+ using System.IO;
using System.Linq;
using Apache.Ignite.Core.Cache.Configuration;
@@ -52,6 +53,16 @@ namespace Apache.Ignite.Core.Tests.Client.Cache
InitCache(CacheName2);
}
+ /** <inheritdoc /> */
+ protected override IgniteConfiguration GetIgniteConfiguration()
+ {
+ var cfg = base.GetIgniteConfiguration();
+
+ cfg.SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml");
+
+ return cfg;
+ }
+
/// <summary>
/// Initializes the cache.
/// </summary>
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
index 903091aaa94..1527e000765 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
@@ -29,6 +29,19 @@
<property name="connectorConfiguration"><null/></property>
<property name="lateAffinityAssignment" value="false"/>
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="cacheConfiguration">
<list>
<bean
class="org.apache.ignite.configuration.CacheConfiguration">
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml
index 87e65a23ee5..39683197861 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query.xml
@@ -47,6 +47,19 @@
<util:constant
static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/>
</property>
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+
<property name="cacheConfiguration">
<list>
<bean
class="org.apache.ignite.configuration.CacheConfiguration">
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/query-engine-h2-default.xml
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/query-engine-h2-default.xml
new file mode 100644
index 00000000000..3dbe305fc83
--- /dev/null
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/query-engine-h2-default.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
index 1cb23c2cf84..dd128976644 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
@@ -17,6 +17,7 @@
namespace Apache.Ignite.Core.Tests.Examples
{
+ using System.IO;
using System.Linq;
using NUnit.Framework;
@@ -37,7 +38,10 @@ namespace Apache.Ignite.Core.Tests.Examples
[TestFixtureSetUp]
public void FixtureSetUp()
{
- Ignition.Start(TestUtils.GetTestConfiguration(name: "server"));
+ Ignition.Start(new
IgniteConfiguration(TestUtils.GetTestConfiguration(name: "server"))
+ {
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
+ });
}
/// <summary>
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs
index b9cd4509237..3642425921b 100644
---
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs
+++
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs
@@ -17,6 +17,7 @@
namespace Apache.Ignite.Core.Tests.Examples
{
+ using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
@@ -57,7 +58,10 @@ namespace Apache.Ignite.Core.Tests.Examples
{
for (int i = 0; i < _serverCount; i++)
{
- Ignition.Start(TestUtils.GetTestConfiguration(name:
i.ToString()));
+ Ignition.Start(new
IgniteConfiguration(TestUtils.GetTestConfiguration(name: i.ToString()))
+ {
+ SpringConfigUrl = Path.Combine("Config",
"query-engine-h2-default.xml")
+ });
}
// Init default services.
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs
index ac9c52404f2..9246f3ce336 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Jvm.cs
@@ -70,6 +70,8 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens=java.base/java.math=ALL-UNNAMED",
"--add-opens=java.sql/java.sql=ALL-UNNAMED",
+ "--add-opens=java.base/java.time=ALL-UNNAMED",
+ "--add-opens=java.base/java.text=ALL-UNNAMED",
"--add-opens=java.logging/java.util.logging=ALL-UNNAMED"
};
diff --git a/modules/platforms/dotnet/build.ps1
b/modules/platforms/dotnet/build.ps1
index 7dfbe8b7b4c..022134baaff 100644
--- a/modules/platforms/dotnet/build.ps1
+++ b/modules/platforms/dotnet/build.ps1
@@ -84,7 +84,7 @@ param (
[ValidateSet("Release", "Debug")]
[string]$configuration="Release",
[string]$mavenOpts="-U
-P-lgpl,-scala,-spark-2.4,-examples,-test,-benchmarks
-Dmaven.javadoc.skip=true",
-
[string]$jarDirs="modules\indexing\target,modules\core\target,modules\spring\target",
+
[string]$jarDirs="modules\indexing\target,modules\core\target,modules\spring\target,modules\calcite\target",
[string]$version="",
[string]$versionSuffix=""
)
@@ -172,11 +172,18 @@ $libsDir = "$PSScriptRoot\bin\libs"
Make-Dir($libsDir)
Get-ChildItem $jarDirs.Split(',') *.jar -recurse `
- -include
"ignite-core*","ignite-indexing*","ignite-spring*","lucene*","h2*","cache-api*","commons-*","spring*"
`
+ -include
"ignite-core*","ignite-indexing*","ignite-spring*","ignite-calcite*","lucene*","h2*","cache-api*","commons-*","spring*"
`
-exclude "*-sources*","*-javadoc*","*-tests*" `
| ? { $_.FullName -inotmatch '[\\/]optional[\\/]' } `
| % { Copy-Item -Force $_ $libsDir }
+# Dependencies of the Calcite SQL engine (the same set as libs\ignite-calcite
in the binary distribution).
+$calciteLibsDir = "modules\calcite\target\libs"
+
+if ([IO.Directory]::Exists($calciteLibsDir)) {
+ Get-ChildItem $calciteLibsDir *.jar | % { Copy-Item -Force $_ $libsDir }
+}
+
# Restore directory
cd $PSScriptRoot
diff --git a/modules/platforms/dotnet/examples/Shared/Shared.csproj
b/modules/platforms/dotnet/examples/Shared/Shared.csproj
index 1dda71ff5f6..aabf07103ef 100644
--- a/modules/platforms/dotnet/examples/Shared/Shared.csproj
+++ b/modules/platforms/dotnet/examples/Shared/Shared.csproj
@@ -6,6 +6,10 @@
<NoWarn>CS0649</NoWarn>
</PropertyGroup>
+ <ItemGroup>
+ <None Update="ignite-config.xml" CopyToOutputDirectory="PreserveNewest" />
+ </ItemGroup>
+
<!-- Standalone examples mode: use NuGet -->
<ItemGroup Condition="$(IgniteBinaryDistro) == '' And $(IgniteDevMode) ==
''">
<PackageReference Include="Apache.Ignite" Version="2.*" />
diff --git a/modules/platforms/dotnet/examples/Shared/Utils.cs
b/modules/platforms/dotnet/examples/Shared/Utils.cs
index cae754b47d3..dba28334ea1 100644
--- a/modules/platforms/dotnet/examples/Shared/Utils.cs
+++ b/modules/platforms/dotnet/examples/Shared/Utils.cs
@@ -19,6 +19,7 @@ namespace Apache.Ignite.Examples.Shared
{
using System;
using System.Collections.Generic;
+ using System.IO;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Client;
@@ -54,6 +55,7 @@ namespace Apache.Ignite.Examples.Shared
// * Logging options reduce console output
return new IgniteConfiguration
{
+ SpringConfigUrl =
Path.Combine(Path.GetDirectoryName(typeof(Utils).Assembly.Location),
"ignite-config.xml"),
Localhost = "127.0.0.1",
DiscoverySpi = new TcpDiscoverySpi
{
diff --git a/modules/platforms/dotnet/examples/Shared/ignite-config.xml
b/modules/platforms/dotnet/examples/Shared/ignite-config.xml
new file mode 100644
index 00000000000..6abef02eb61
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Shared/ignite-config.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ 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.
+-->
+
+<!--
+ Spring part of the configuration of the nodes started by the examples: the
SQL examples and the LINQ provider use
+ the SQL dialect of the H2-based engine, so it is configured as the default
SQL engine.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="sqlConfiguration">
+ <bean class="org.apache.ignite.configuration.SqlConfiguration">
+ <property name="queryEnginesConfiguration">
+ <list>
+ <bean
class="org.apache.ignite.indexing.IndexingQueryEngineConfiguration">
+ <property name="default" value="true"/>
+ </bean>
+ <bean
class="org.apache.ignite.calcite.CalciteQueryEngineConfiguration"/>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>