Skip to content

IGNITE-29117 Calcite-only node: integration test and prerequisite fixes - #13668

Open
nizhikov wants to merge 3 commits into
apache:masterfrom
nizhikov:IGNITE-29117
Open

nizhikov wants to merge 3 commits into
apache:masterfrom
nizhikov:IGNITE-29117

Conversation

@nizhikov

@nizhikov nizhikov commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Prerequisites for making Calcite the default SQL engine (IGNITE-29117): a node with ignite-calcite but without ignite-indexing on the classpath must work for the supported SQL entry points and fail with a precise error for the H2-only ones.

What

  • CalciteOnlyNodeIntegrationTest (calcite module): starts the node under test in a child JVM (IgniteProcessProxy) whose classpath is the test classpath without ignite-indexing, H2 and Lucene, so it runs in the existing CI jobs. The test JVM talks to that node via thin JDBC, the thin client and a thin-client compute task for the cache API checks. Covers SqlFieldsQuery/DDL/DML, deprecated SqlQuery, TextQuery, SET STREAMING, COPY, the queryEngine JDBC property and the QUERY_ENGINE hint.
  • Implicit engine configuration: when no engines are configured and H2 is absent, the only available engine is registered with its default configuration (new QueryEngine.config()), so ?queryEngine=calcite and /*+ QUERY_ENGINE('calcite') */ work without an explicit SqlConfiguration. The JDBC/ODBC handshakes ask GridQueryProcessor.queryEngineConfigured() instead of scanning the user configuration, which does not contain the implicit entry.
  • Precise errors for H2-only query types: IgniteCacheProxyImpl.validate() rejects deprecated SqlQuery and TextQuery without H2 with a message naming ignite-indexing (and suggesting SqlFieldsQuery) instead of an NPE / bare "Indexing is disabled.". querySql and streamUpdateQuery check indexing like the other H2-only paths.
  • Thin JDBC driver: executeNative enables the stream state only after the server accepted SET STREAMING ON. Previously a rejected command left the state set and Connection.close() blocked forever waiting for a batch response. Latent with H2 (the command never fails), reachable on a Calcite-only node.

Why

Decisions taken while preparing the engine switch: deprecated SqlQuery is not ported to Calcite and stays H2-only; SET STREAMING and COPY keep failing with the Calcite parse error (the test pins the current message).

🤖 Generated with Claude Code

nizhikov and others added 2 commits October 8, 2026 16:32
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ignitetcbot

Copy link
Copy Markdown
Contributor

TCBot Test Analysis

Possible Blockers (0)

No blockers found.

New Tests (11)

  • Calcite SQL 3: 8 tests
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testQueryEngineHint - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testCopy - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testSetStreaming - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testJdbcQueryEngineProperty - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testThinClientSqlQuery - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testSqlQueryNotSupported - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testTextQuery - PASSED
    • IgniteCalciteTestSuite3: CalciteOnlyNodeIntegrationTest.testSqlFieldsQuery - PASSED
  • Calcite SQL 2: 3 tests
    • IgniteCalciteTestSuite2: rel.IntersectExecutionTest[2].testDistributedInputs()[2] - PASSED
    • IgniteCalciteTestSuite2: rel.IntersectExecutionTest[2].testMapReduceAll()[2] - PASSED
    • IgniteCalciteTestSuite2: rel.IntersectExecutionTest[2].testSingleAll()[2] - PASSED

…rs/query/GridQueryProcessor.java

Co-authored-by: Vladimir Steshin <vladsz83@gmail.com>
Comment thread modules/calcite/pom.xml
<scope>test</scope>
</dependency>

<dependency>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to add? I tried to removed. Th project is built normally, some related tests tun. CalciteOnlyNodeIntegrationTest works locally without it. Tried to remove Ignite's libs from the .m2.

}

streamState = new StreamState((SqlSetStreamingCommand)cmd, cliIo);
StreamState streamState0 = new StreamState(cmd0, cliIo);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: let's rename cmd0 to smth. like streamingCmd.

Also above:
boolean newVal = ((SqlSetStreamingCommand)cmd).isTurnOn(); -> boolean newVal = cmd0.isTurnOn()

}

streamState = new StreamState((SqlSetStreamingCommand)cmd, cliIo);
StreamState streamState0 = new StreamState(cmd0, cliIo);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I test this change? Any test? CalciteOnlyNodeIntegrationTest seems to work without it.


/**
* @param engineName Query engine name.
* @return {@code True} if a query engine with the given name can be selected by the {@code QUERY_ENGINE} hint or

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you. If we refer to a hint like {@code QUERY_ENGINE}, we might refer to the property in the same way.

CASE_INSENSITIVE);

/** Error message for the features that require the H2 query engine when it is not on the classpath. */
private static final String INDEXING_DISABLED_MSG = "Failed to execute query because indexing is disabled " +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: because indexing is disabled -> because the indexing is disabled

CASE_INSENSITIVE);

/** Error message for the features that require the H2 query engine when it is not on the classpath. */
private static final String INDEXING_DISABLED_MSG = "Failed to execute query because indexing is disabled " +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check checkxModuleEnabled() pls.
I don't like x in the name. But the question is can we join/reuse the messages somehow?

) throws IgniteSQLException;

/** @return Configuration of the engine. */
default QueryEngineConfigurationEx config() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nullable ?

}

if ((qry instanceof SqlQuery || qry instanceof TextQuery) && !ctx.kernalContext().query().indexingEnabled()) {
throw new CacheException("Failed to execute query. " + qry.getClass().getSimpleName() + " is supported " +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you. Maybe we should finally rename indexing to h2/h2engine within the internals.

}

if ((qry instanceof SqlQuery || qry instanceof TextQuery) && !ctx.kernalContext().query().indexingEnabled()) {
throw new CacheException("Failed to execute query. " + qry.getClass().getSimpleName() + " is supported " +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: query. " + qry.getClass().getSimpleName() + " is -> query. '" + qry.getClass().getSimpleName() + "' is


if ((qry instanceof SqlQuery || qry instanceof TextQuery) && !ctx.kernalContext().query().indexingEnabled()) {
throw new CacheException("Failed to execute query. " + qry.getClass().getSimpleName() + " is supported " +
"by the H2 query engine only, add module 'ignite-indexing' to the classpath of all Ignite nodes" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: only, add module 'ignite-indexing' -> only. Add module 'ignite-indexing' or To proceed, add module 'ignite-indexing'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants