@@ -23,13 +23,15 @@ opensearchplugin {
2323 name = pluginName
2424 description = pluginDescription
2525 classname = " ${ projectPath} .${ pathToPlugin} "
26+ extendedPlugins = [' analytics-engine' ]
2627 licenseFile = rootProject. file(' LICENSE.txt' )
2728 noticeFile = rootProject. file(' NOTICE.txt' )
2829}
2930
3031
3132dependencies {
3233 api project(' :libs:opensearch-vectorized-exec-spi' )
34+ api project(' :sandbox:libs:analytics-framework' )
3335 implementation " org.apache.logging.log4j:log4j-api:${ versions.log4j} "
3436 implementation " org.apache.logging.log4j:log4j-core:${ versions.log4j} "
3537
@@ -47,10 +49,32 @@ dependencies {
4749 // SLF4J API for Arrow logging compatibility
4850 implementation " org.slf4j:slf4j-api:${ versions.slf4j} "
4951 // CheckerFramework annotations required by Arrow 17.0.0
50- implementation " org.checkerframework:checker-qual:3.42 .0"
52+ implementation " org.checkerframework:checker-qual:3.43 .0"
5153 // FlatBuffers dependency required by Arrow 17.0.0
5254 implementation " com.google.flatbuffers:flatbuffers-java:${ versions.flatbuffers} "
5355
56+ // Substrait: RelNode → Substrait plan conversion via Calcite Isthmus
57+ implementation(' io.substrait:core:0.67.0' ) {
58+ exclude group : ' ch.qos.logback' , module : ' logback-classic'
59+ exclude group : ' ch.qos.logback' , module : ' logback-core'
60+ exclude group : ' org.apache.calcite' , module : ' calcite-core'
61+ exclude group : ' org.apache.calcite' , module : ' calcite-linq4j'
62+ exclude group : ' com.google.code.gson' , module : ' gson'
63+ exclude group : ' org.antlr' , module : ' antlr4-runtime'
64+ exclude group : ' org.antlr' , module : ' antlr4'
65+ }
66+ implementation(' io.substrait:isthmus:0.67.0' ) {
67+ exclude group : ' ch.qos.logback' , module : ' logback-classic'
68+ exclude group : ' ch.qos.logback' , module : ' logback-core'
69+ exclude group : ' org.apache.calcite' , module : ' calcite-core'
70+ exclude group : ' org.apache.calcite' , module : ' calcite-linq4j'
71+ exclude group : ' com.google.code.gson' , module : ' gson'
72+ exclude group : ' org.antlr' , module : ' antlr4-runtime'
73+ exclude group : ' org.antlr' , module : ' antlr4'
74+ }
75+ implementation " com.google.protobuf:protobuf-java:${ versions.protobuf} "
76+ implementation " com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${ versions.jackson} "
77+
5478 testImplementation " junit:junit:${ versions.junit} "
5579 testImplementation " org.hamcrest:hamcrest:${ versions.hamcrest} "
5680 testImplementation " org.mockito:mockito-core:${ versions.mockito} "
@@ -131,6 +155,47 @@ task copyNativeLibrary(type: Copy, dependsOn: buildRustLibrary) {
131155 }
132156}
133157
158+ // Exclude jars provided by analytics-engine plugin (shared via extendedPlugins classloader)
159+ // Exclude jars already in the analytics-engine parent plugin ZIP (via analytics-framework)
160+ bundlePlugin {
161+ exclude ' analytics-framework-*.jar'
162+ exclude ' calcite-core-*.jar'
163+ exclude ' calcite-linq4j-*.jar'
164+ exclude ' avatica-core-*.jar'
165+ exclude ' avatica-metrics-*.jar'
166+ exclude ' guava-*.jar'
167+ exclude ' failureaccess-*.jar'
168+ exclude ' slf4j-api-*.jar'
169+ exclude ' checker-qual-*.jar'
170+ exclude ' jackson-annotations-*.jar'
171+ exclude ' jackson-databind-*.jar'
172+ exclude ' jackson-core-*.jar'
173+ exclude ' commons-codec-*.jar'
174+ exclude ' janino-*.jar'
175+ exclude ' commons-compiler-*.jar'
176+ exclude ' joou-java-6-*.jar'
177+ exclude ' commons-lang3-*.jar'
178+ exclude ' commons-text-*.jar'
179+ exclude ' commons-math3-*.jar'
180+ exclude ' value-annotations-*.jar'
181+ exclude ' json-path-*.jar'
182+ exclude ' json-smart-*.jar'
183+ exclude ' accessors-smart-*.jar'
184+ exclude ' asm-*.jar'
185+ exclude ' jts-core-*.jar'
186+ exclude ' jts-io-common-*.jar'
187+ exclude ' proj4j-*.jar'
188+ exclude ' uzaygezen-core-*.jar'
189+ exclude ' sketches-core-*.jar'
190+ exclude ' memory-*.jar'
191+ exclude ' httpcore5-*.jar'
192+ exclude ' httpcore5-h2-*.jar'
193+ exclude ' httpclient5-*.jar'
194+ exclude ' jts-core-*.jar'
195+ exclude ' jackson-core-*.jar'
196+ exclude ' error_prone_annotations-*.jar'
197+ }
198+
134199// Ensure native library is built before Java compilation
135200compileJava. dependsOn copyNativeLibrary
136201
@@ -194,13 +259,37 @@ tasks.named("dependencyLicenses").configure {
194259 mapping from : / slf4j-.*/ , to : ' slf4j-api'
195260 mapping from : / checker-qual.*/ , to : ' checker-qual'
196261 mapping from : / flatbuffers-.*/ , to : ' flatbuffers-java'
262+ mapping from : / substrait-.*/ , to : ' substrait'
263+ mapping from : / protobuf-.*/ , to : ' protobuf-java'
197264}
198265
199266// Configure third party audit to handle Apache Arrow dependencies
200267tasks. named(' thirdPartyAudit' ). configure {
201268 ignoreMissingClasses(
202269 // Apache Commons Codec (missing dependency)
203- ' org.apache.commons.codec.binary.Hex'
270+ ' org.apache.commons.codec.binary.Hex' ,
271+ // Immutables annotations (used by Substrait generated code, annotation-only)
272+ ' org.immutables.value.Value' ,
273+ ' org.immutables.value.Value$Check' ,
274+ ' org.immutables.value.Value$Default' ,
275+ ' org.immutables.value.Value$Derived' ,
276+ ' org.immutables.value.Value$Enclosing' ,
277+ ' org.immutables.value.Value$Immutable' ,
278+ ' org.immutables.value.Value$Lazy' ,
279+ ' org.immutables.value.Value$Parameter' ,
280+ ' org.immutables.value.Value$Style' ,
281+ // Error Prone annotations (used by Substrait/Protobuf, annotation-only)
282+ ' com.google.errorprone.annotations.CanIgnoreReturnValue' ,
283+ ' com.google.errorprone.annotations.CheckReturnValue' ,
284+ ' com.google.errorprone.annotations.Immutable' ,
285+ ' com.google.errorprone.annotations.InlineMe' ,
286+ ' com.google.errorprone.annotations.InlineMeValidationDisabled' ,
287+ ' com.google.errorprone.annotations.concurrent.LazyInit' ,
288+ // JSR-305 annotations (used by Substrait, annotation-only)
289+ ' javax.annotation.Nonnull' ,
290+ ' javax.annotation.Nullable' ,
291+ ' javax.annotation.concurrent.Immutable' ,
292+ ' javax.annotation.concurrent.NotThreadSafe'
204293 )
205294 ignoreViolations(
206295 // Apache Arrow internal classes that use Unsafe operations
0 commit comments