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 54de44b55a2b9..be47f1798b5da 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.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 void testJdbcQueryEngineProperty() throws Exception {
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 void testQueryEngineHint() throws Exception {
/** 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 void testH2QueryEngineHint() throws Exception {
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 7bead0b04e7a2..af440ad2d4d13 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 SqlConfiguration setValidationEnabled(boolean validationEnabled) {
* {@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)}).
*
- * 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 d3a1ce3cb45f8..6c4f345cb2c8f 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.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 @@ private Integer doSingleUpdate(IgniteCache, ?> cache, String sqlText, List> qryCursor = (QueryCursorImpl>)cache.withKeepBinary().query(qry);
+ QueryCursorEx> qryCursor = (QueryCursorEx>)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 9b0ae1935d5da..975d31d50b03b 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.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 @@ public JdbcQueryMultipleStatementsTask(Ignite ignite, String schemaName, String
throw new SQLException("COPY command is currently supported only in thin JDBC driver.");
}
- QueryCursorImpl> cur = (QueryCursorImpl>)cur0;
+ QueryCursorEx> cur = (QueryCursorEx>)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 773976bc74edf..9493e31039ce2 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.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 @@ public JdbcQueryTask(Ignite ignite, String cacheName, String schemaName, String
throw new SQLException("COPY command is currently supported only in thin JDBC driver.");
}
- QueryCursorImpl> qryCursor = (QueryCursorImpl>)fldQryCursor;
+ QueryCursorEx> qryCursor = (QueryCursorEx>)fldQryCursor;
if (isQry == null)
isQry = qryCursor.isQuery();
@@ -362,8 +362,8 @@ public boolean hasNext() {
/**
* @return Cursor.
*/
- public QueryCursorImpl> queryCursor() {
- return (QueryCursorImpl>)cursor;
+ public QueryCursorEx> queryCursor() {
+ return (QueryCursorEx>)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 c64e2e4f7247a..62b463306217a 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 requestTopVer = new ThreadLocal<>();
@@ -562,19 +565,7 @@ private void initQueryEngines() throws IgniteCheckedException {
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 @@ private void initQueryEngines() throws IgniteCheckedException {
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 f0ea6ba8d0b13..fadbaba566d40 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 cfba6aa376a35..878f22b6d52cf 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 @@
*/
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 a73d0bbd3928a..36e7fcc4edda9 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">
+
+
+
+
+
+
+
+
+
+
+
+
+
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 84c12e12331df..724130bb70437 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">
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/platforms/cpp/core/src/ignition.cpp b/modules/platforms/cpp/core/src/ignition.cpp
index 40e3b7ffa4d45..367b290f19682 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 d170d6b68ee28..244fc511f6f65 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">
+
+
+
+
+
+
+
+
+
+
+
+
+
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 758da99d3e468..2e9c2b646af13 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">
+
+
+
+
+
+
+
+
+
+
+
+
+
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 bcdaec578c578..4f09b1ffc64cd 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">
+
+
+
+
+
+
+
+
+
+
+
+
+
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 5a2c6abd0a100..72d39a9571f3d 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">
+
+
+
+
+
+
+
+
+
+
+
+
+
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 99fd2689f5e60..627e0814de71f 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 @@
+
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 7f2df3da76b78..6fe497fefb577 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 @@
+
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 b368d811d5aa3..800051353ec52 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 @@ public void FixtureSetUp()
{
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 70eba6f0d067c..63cf94f12e8f7 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 @@ public class CacheQueryMetricsTest
[TestFixtureSetUp]
public void FixtureSetUp()
{
- Ignition.Start(TestUtils.GetTestConfiguration());
+ Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
+ {
+ SpringConfigUrl = Path.Combine("Config", "query-engine-h2-default.xml")
+ });
}
///
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 b9a5798b5e159..16a7326a878eb 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 @@ public void FixtureSetUp()
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 f0f5611620910..371c1a99d74d2 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 @@ public void FixtureSetUp()
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 209184505b5dc..dc84f6449c282 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 @@ private IgniteConfiguration GetConfig(string gridName = null)
{
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 7efcb9c4a0687..db65247c309bc 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 @@ public override void TestSetUp()
InitCache(CacheName2);
}
+ /** */
+ protected override IgniteConfiguration GetIgniteConfiguration()
+ {
+ var cfg = base.GetIgniteConfiguration();
+
+ cfg.SpringConfigUrl = Path.Combine("Config", "query-engine-h2-default.xml");
+
+ return cfg;
+ }
+
///
/// Initializes the cache.
///
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 903091aaa940e..1527e000765af 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
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 87e65a23ee596..3968319786170 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
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 0000000000000..3dbe305fc8357
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/query-engine-h2-default.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 1cb23c2cf8424..dd12897664429 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 @@ public class ThickExamplesExternalNodeTest : ExamplesTestBase
[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")
+ });
}
///
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 b9cd45092377c..3642425921b52 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 @@ public void FixtureSetUp()
{
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 ac9c52404f2e6..9246f3ce336bd 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 @@ internal sealed unsafe partial class Jvm
"--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 7dfbe8b7b4c61..022134baaffdd 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 1dda71ff5f62e..aabf07103ef0c 100644
--- a/modules/platforms/dotnet/examples/Shared/Shared.csproj
+++ b/modules/platforms/dotnet/examples/Shared/Shared.csproj
@@ -6,6 +6,10 @@
CS0649
+
+
+
+
diff --git a/modules/platforms/dotnet/examples/Shared/Utils.cs b/modules/platforms/dotnet/examples/Shared/Utils.cs
index cae754b47d3e1..dba28334ea1f1 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 @@ public static IgniteConfiguration GetServerNodeConfiguration()
// * 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 0000000000000..6abef02eb613c
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Shared/ignite-config.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+