Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14914

Support in() clause in IndexQuery.

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.14
    • None
    • Added support for IN criterion for IndexQuery: IndexQuery.setCriteria(in("A", Arrays.asList(1, 2 ,3))).
    • Docs Required, Release Notes Required

    Description

      IndexQuery should support IN criterion:

      IndexQuery.setCriteria(in("A", Arrays.asList(1, 2 ,3)));

      1. IN criterion accepts collection of values to find. This collections is transformed to SortedSet(1, 2, 3) because IndexQuery provides to user sorted result.
      2. When IN applies on first indexed field - IN(A0, A1) for index (A, B) - it converts to multiple eq operations are joint with OR operation: EQ(A0) or EQ(A1).
      3. Other range criteria for other fields are applied to every such separate operation:
        IN(A0, A1) and GT(B) converts to (EQ(A0) and GT(B)) or (EQ(A1) and GT(B)).
      4. When IN applies to non-leading indexed field - IN(B0, B1) for index (A, B) - it works like a filter for prepared range:
        GTE(A) and IN(B0, B1) converts to range [[A, B0]; [A, B1]] and every cache entry within this range is checked for being included to SortedSet(B0, B1).

      Attachments

        Issue Links

          Activity

            People

              timonin.maksim Maksim Timonin
              timonin.maksim Maksim Timonin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m