Skip to content

Commit 19cfbf9

Browse files
committed
[Analytics] Add SHA + LICENSE files for new bundled deps; spotless
The `dependencyLicenses` precommit task scans `licenses/` for a `<jar>.sha1` sibling per bundled dependency. Two deps added in this PR were missing them: * `commons-text-1.11.0` in analytics-engine — needs sha1 + LICENSE + NOTICE (no shared `commons-text-*` license files yet in this plugin). Apache 2.0; LICENSE and NOTICE extracted from the released jar. * `jackson-datatype-jsr310-2.21.3` in arrow-flight-rpc — sha1 only. arrow-flight-rpc's `dependencyLicenses` already maps `jackson-.*` to the shared `jackson-LICENSE` / `jackson-NOTICE` files via `mapping from: /jackson-.*/, to: 'jackson'`, so no new license/notice files are needed. Plus googleJavaFormat reflow on `ArraySliceAdapter` and `DataFusionPlugin` that spotlessCheck flagged in precommit. Verified `:plugins:arrow-flight-rpc:precommit`, `:sandbox:plugins:analytics-engine:precommit`, and `:sandbox:plugins:analytics-backend-datafusion:precommit` all succeed. Addresses review feedback on opensearch-project#21554. Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent f718b15 commit 19cfbf9

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a0958ebdaba836d31e5462ebc37b6349a0725ff9

sandbox/plugins/analytics-backend-datafusion/src/main/java/org/opensearch/be/datafusion/ArraySliceAdapter.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ public RexNode adapt(RexCall original, List<FieldStorageInfo> fieldStorage, RelO
7676
if (operands.size() != 3) {
7777
// Defensive: unexpected arity. Fall through with BIGINT coercion only — the substrait
7878
// converter will surface a missing-signature error with a clear message.
79-
return rexBuilder.makeCall(original.getType(), original.getOperator(), coerceIndexes(rexBuilder, typeFactory, bigint, operands));
79+
return rexBuilder.makeCall(
80+
original.getType(),
81+
original.getOperator(),
82+
coerceIndexes(rexBuilder, typeFactory, bigint, operands)
83+
);
8084
}
8185
List<RexNode> coerced = coerceIndexes(rexBuilder, typeFactory, bigint, operands);
8286
RexNode array = coerced.get(0);
@@ -88,7 +92,12 @@ public RexNode adapt(RexCall original, List<FieldStorageInfo> fieldStorage, RelO
8892
return rexBuilder.makeCall(original.getType(), original.getOperator(), List.of(array, oneBasedStart, endInclusive));
8993
}
9094

91-
private static List<RexNode> coerceIndexes(RexBuilder rexBuilder, RelDataTypeFactory typeFactory, RelDataType bigint, List<RexNode> operands) {
95+
private static List<RexNode> coerceIndexes(
96+
RexBuilder rexBuilder,
97+
RelDataTypeFactory typeFactory,
98+
RelDataType bigint,
99+
List<RexNode> operands
100+
) {
92101
List<RexNode> coerced = new ArrayList<>(operands.size());
93102
for (int i = 0; i < operands.size(); i++) {
94103
RexNode operand = operands.get(i);

sandbox/plugins/analytics-backend-datafusion/src/main/java/org/opensearch/be/datafusion/DataFusionPlugin.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ private static SimpleExtension.ExtensionCollection loadSubstraitExtensions() {
172172
SimpleExtension.ExtensionCollection delegationExtensions = SimpleExtension.load(List.of("/delegation_functions.yaml"));
173173
SimpleExtension.ExtensionCollection scalarExtensions = SimpleExtension.load(List.of("/opensearch_scalar_functions.yaml"));
174174
SimpleExtension.ExtensionCollection arrayExtensions = SimpleExtension.load(List.of("/opensearch_array_functions.yaml"));
175-
return DefaultExtensionCatalog.DEFAULT_COLLECTION
176-
.merge(delegationExtensions)
177-
.merge(scalarExtensions)
178-
.merge(arrayExtensions);
175+
return DefaultExtensionCatalog.DEFAULT_COLLECTION.merge(delegationExtensions).merge(scalarExtensions).merge(arrayExtensions);
179176
} finally {
180177
t.setContextClassLoader(previous);
181178
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2bb044b7717ec2eccaf9ea7769c1509054b50e9a
1+
2bb044b7717ec2eccaf9ea7769c1509054b50e9a

0 commit comments

Comments
 (0)