AMashenkov commented on code in PR #2857:
URL: https://github.com/apache/ignite-3/pull/2857#discussion_r1410527812
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##########
@@ -516,12 +519,18 @@ private List<AbstractNode<?>> localFragments() {
private CompletableFuture<Void> sendFragment(
String targetNodeName, String serialisedFragment,
FragmentDescription desc, TxAttributes txAttributes
) {
+ DynamicParameterValue[] parameters = ctx.parameters();
+ Object[] parameterValues = new Object[parameters.length];
+ for (int i = 0; i < parameters.length; i++) {
Review Comment:
Is it just an array copy ? and System.arrayCopy() can be used?
Or you mean `parameterValues[i] = parameters[i].value()`?
We can add an utility method, and replace with smth like this
```
ArrayUtils.transform(source, target, DynamicParameterValue::value)
```
This should work without using hacks to instantiate target array of desired
type.
```
static <S, T> void transform(S[] source, T[] target, Function<S, T>
transformer)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]