Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sandbox/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def patchedCalciteVersion = "${libVersions['calcite']}-opensearch-${libVersions[

subprojects {
group = 'org.opensearch.sandbox'
ext.patchedCalciteVersion = patchedCalciteVersion

// The patched calcite-core / calcite-linq4j live in the OpenSearch
// snapshots Maven repo; analytics-framework advertises them as `api`,
Expand Down
30 changes: 30 additions & 0 deletions sandbox/libs/analytics-api/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

/*
* Analytics Engine API surface consumable from JDK 21 code paths.
*/

java { sourceCompatibility = JavaVersion.toVersion(21); targetCompatibility = JavaVersion.toVersion(21) }

// no test for now, so disable
testingConventions.enabled = false

dependencies {
compileOnly project(':server')
// Declared compileOnly rather than api because analytics-api is never
// loaded standalone — downstream consumers should declare Calcite themselves.
compileOnly "org.apache.calcite:calcite-core:${patchedCalciteVersion}"
compileOnly "org.apache.calcite:calcite-linq4j:${patchedCalciteVersion}"

// Calcite bytecode references annotations from apiguardian (@API) and
// checker-framework (@EnsuresNonNullIf). compileOnlyApi propagates to
// consumers' compile/javadoc classpath without becoming a runtime dep.
compileOnlyApi 'org.apiguardian:apiguardian-api:1.1.2'
compileOnlyApi 'org.checkerframework:checker-qual:3.43.0'
}
6 changes: 2 additions & 4 deletions sandbox/libs/analytics-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
// for Janino parent CL); API surface is identical to upstream. The OpenSearch
// Snapshots repo and the resolutionStrategy.force for this coordinate are
// declared centrally in sandbox/build.gradle's subprojects block.
def calciteVersion = "${versions.calcite}-opensearch-${versions.calcite_os_rev}"

java { sourceCompatibility = JavaVersion.toVersion(25); targetCompatibility = JavaVersion.toVersion(25) }

configurations {
Expand All @@ -39,9 +37,9 @@ dependencies {
// interfaces declares its own runtime arrow dep (see analytics-backend-datafusion).
compileOnly "org.apache.arrow:arrow-vector:${versions.arrow}"
compileOnly "org.apache.arrow:arrow-memory-core:${versions.arrow}"
api "org.apache.calcite:calcite-core:${calciteVersion}"
api "org.apache.calcite:calcite-core:${patchedCalciteVersion}"
// Calcite's expression tree and Enumerable runtime — required by calcite-core API
api "org.apache.calcite:calcite-linq4j:${calciteVersion}"
api "org.apache.calcite:calcite-linq4j:${patchedCalciteVersion}"
// Calcite's JDBC abstraction layer — required by calcite-core internals
runtimeOnly 'org.apache.calcite.avatica:avatica-core:1.27.0'
// Guava — required by Calcite internally, forbidden on compile classpaths by OpenSearch policy
Expand Down
5 changes: 3 additions & 2 deletions sandbox/plugins/analytics-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ tasks.named('missingJavadoc').configure {
}

dependencies {
// Shared types and SPI interfaces (QueryPlanExecutor, EngineBridge, AnalyticsBackEndPlugin, etc.)
// Also provides calcite-core transitively via api.
implementation project(':sandbox:libs:analytics-api')

// Shared SPI interfaces (EngineBridge, AnalyticsBackEndPlugin, etc.) + calcite-core transitively.
api project(':sandbox:libs:analytics-framework')

// Arrow — provided at runtime by the extended arrow-flight-rpc plugin (same classloader).
Expand Down
1 change: 1 addition & 0 deletions sandbox/plugins/dsl-query-executor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ sourceSets.test.compileClasspath += configurations.calciteCompile

dependencies {
compileOnly project(':server')
compileOnly project(':sandbox:libs:analytics-api')
compileOnly project(':sandbox:libs:analytics-framework')
compileOnly project(':sandbox:plugins:analytics-engine')
// TODO: Consume Calcite dependency from Analytics Framework instead of declaring it separately.
Expand Down
1 change: 1 addition & 0 deletions sandbox/plugins/test-ppl-frontend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ sourceSets.test.compileClasspath += configurations.calciteCompile

dependencies {
// Analytics framework + Calcite provided at runtime by analytics-engine (parent classloader via extendedPlugins)
compileOnly project(':sandbox:libs:analytics-api')
compileOnly project(':sandbox:libs:analytics-framework')

// Guava for compilation — Calcite API exposes guava types
Expand Down
Loading