rezataroosheh commented on code in PR #13745:
URL: https://github.com/apache/ignite/pull/13745#discussion_r4493519306


##########
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/H2QueryInfo.java:
##########
@@ -76,6 +77,9 @@ public class H2QueryInfo implements TrackableQuery {
     /** Query initiator ID. */
     private final String initiatorId;
 
+    /** Query parameters. */
+    private final Object[] params;

Review Comment:
   Both can happen.
   
   The array is null for a LOCAL query without arguments: 
`SqlFieldsQuery.getArgs()` returns null when `SqlFieldsQuery.setArgs()` was 
never called, so `H2QueryInfo.queryInfo()` checks `params != null`. For MAP and 
REDUCE, it is never null: `GridCacheSqlQuery.parameters()` returns 
`EMPTY_PARAMS` or a new array, and `GridReduceQueryExecutor.query()` replaces 
null with `EMPTY_PARAMS`.
   
   Elements can be null when an argument is SQL NULL. For MAP, the array also 
has nulls at positions for parameters the map query doesn't use. 
`S.arrayToString()` prints them as `null`.
   



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