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 2022/08/11 13:40:16 UTC

[GitHub] [ignite] timoninmaxim opened a new pull request, #10195: IGNITE-14914 Add IndexQuery IN criterion

timoninmaxim opened a new pull request, #10195:
URL: https://github.com/apache/ignite/pull/10195

   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


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


[GitHub] [ignite] tledkov commented on a diff in pull request #10195: IGNITE-14914 Add IndexQuery IN criterion

Posted by GitBox <gi...@apache.org>.
tledkov commented on code in PR #10195:
URL: https://github.com/apache/ignite/pull/10195#discussion_r945578546


##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexQueryProcessor.java:
##########
@@ -538,25 +442,12 @@ private boolean inclBoundary(IndexRangeQuery qry, boolean lower) {
         return true;
     }
 
-    /**
-     * @param isNull {@code true} if user explicitly set {@code null} with a query argument.
-     */
-    private IndexKey key(Object val, boolean isNull, IndexKeyDefinition def, IndexKeyTypeSettings settings, CacheObjectContext coctx) {
-        IndexKey key = null;
-        IndexKeyType keyType = val == null ? IndexKeyType.NULL : IndexKeyType.forClass(val.getClass());
-
-        if (val != null || isNull)
-            key = IndexKeyFactory.wrap(val, keyType, coctx, settings);
-
-        return key;
-    }
-
     /**
      * Checks index rows for matching to specified index criteria.
      */
     private static class IndexQueryCriteriaClosure implements BPlusTree.TreeRowClosure<IndexRow, IndexRow> {

Review Comment:
   Maybe we should move inner classes to the top level? 



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


[GitHub] [ignite] timoninmaxim merged pull request #10195: IGNITE-14914 Add IndexQuery IN criterion

Posted by GitBox <gi...@apache.org>.
timoninmaxim merged PR #10195:
URL: https://github.com/apache/ignite/pull/10195


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


[GitHub] [ignite] tledkov commented on a diff in pull request #10195: IGNITE-14914 Add IndexQuery IN criterion

Posted by GitBox <gi...@apache.org>.
tledkov commented on code in PR #10195:
URL: https://github.com/apache/ignite/pull/10195#discussion_r945576543


##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexQueryProcessor.java:
##########
@@ -615,14 +503,22 @@ private boolean rowIsOutOfRange(
             List<InlineIndexKeyType> keyTypes = tree.rowHandler().inlineIndexKeyTypes();
 
             for (int keyIdx = 0; keyIdx < criteriaKeysCnt; keyIdx++) {
-                RangeIndexQueryCriterion c = qry.criteria[keyIdx];
+                RangeIndexQueryCriterion c = qry.keyCond[keyIdx].range();
+                Set<IndexKey> inVals = qry.keyCond[keyIdx].inVals();
 
                 InlineIndexKeyType keyType = keyIdx < keyTypes.size() ? keyTypes.get(keyIdx) : null;
 
                 boolean descOrder = descOrderCache[keyIdx];
 
                 int maxSize = tree.inlineSize() - fieldOff;
 
+                if (inVals != null) {
+                    IndexRow row = io.getLookupRow(tree, pageAddr, idx);

Review Comment:
   What do you think about using inline payload data if it is available for check IN condition? 



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


[GitHub] [ignite] tledkov commented on a diff in pull request #10195: IGNITE-14914 Add IndexQuery IN criterion

Posted by GitBox <gi...@apache.org>.
tledkov commented on code in PR #10195:
URL: https://github.com/apache/ignite/pull/10195#discussion_r946543786


##########
modules/core/src/main/java/org/apache/ignite/internal/client/thin/TcpClientCache.java:
##########
@@ -989,6 +990,17 @@ private QueryCursor<Cache.Entry<K, V>> indexQuery(IndexQuery<K, V> qry) {
                             serDes.writeObject(out, range.lower());
                             serDes.writeObject(out, range.upper());
                         }
+                        else if (c instanceof InIndexQueryCriterion) {

Review Comment:
   Please add support backward compatibility for the thin client protocol:
   see: `ClientBitmaskFeature`, `ClientProtocolContext`.
   For new compatibility tests see: to `JavaThinCompatibilityTest`



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