korlov42 commented on a change in pull request #9663:
URL: https://github.com/apache/ignite/pull/9663#discussion_r776212006



##########
File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
##########
@@ -592,7 +594,14 @@ private GridQueryFieldsResult executeSelectLocal(
 

Review comment:
       On the line above you create a list of argument from an array of 
parameter. The only usage of this list is on the 599 line where you create an 
array from it. So why don't just use the original array from 
`qryParams.arguments()`?

##########
File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
##########
@@ -592,7 +594,14 @@ private GridQueryFieldsResult executeSelectLocal(
 
                         PreparedStatement stmt = conn.prepareStatement(qry, 
H2StatementCache.queryFlags(qryDesc));
 
-                        H2Utils.bindParameters(stmt, args);
+                        // Convert parameters into BinaryObjects.
+                        Marshaller m = ctx.config().getMarshaller();
+                        byte[] paramsBytes = U.marshal(m, args.toArray(new 
Object[0]));
+                        final ClassLoader ldr = 
U.resolveClassLoader(ctx.config());
+                        Object[] params = 
BinaryUtils.rawArrayFromBinary(((BinaryMarshaller)m).binaryMarshaller()

Review comment:
       what if someone has its own marshaller configured?




-- 
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]


Reply via email to