You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/12/24 08:09:42 UTC

[GitHub] [ignite] Berkof commented on a change in pull request #9663: IGNITE-16140 Cannot find data in index when querying a pojo key in local mode.

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



##########
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()
+                            .unmarshal(paramsBytes, ldr));

Review comment:
       To use the same code everywhere we serialize query parameters. Through network or nor.




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org