Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18493

SAI - LIKE prefix/suffix support

    XMLWordPrintableJSON

Details

    • Epic
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 5.x
    • Feature/SAI
    • None
    • Operability
    • Byzantine
    • All
    • None

    Description

      This should provide the following functionality:

      • LIKE abc% - prefix support
      • LIKE %bcd - suffix support
      • LIKE ab%cd - prefix/suffix support

      Out of scope:

      • LIKE %abc% - contains support

      The index support for this can broken down as follows (general ideas that are open to suggestions):

      • Prefix support. This can currently be achieved with the existing trie index but this needs work to make it more performant in coalescing postings. An alternative approach could be to modify the block balanced tree to support variable length datatypes. This would make general range queries possible on variable length types as well as prefix queries. These would benefit from the auxilary postings present in the balanced tree.
      • Suffix support. This will need a reverse index on the values. This allows a search of the suffix to operate in the same way as a prefix query. There is no reason why suffix index cannot be built on top of the prefix index with separate postings for prefix and suffix. We would need to look at the byte comparable code in order to produce reverse values efficiently that sort correctly. 
      • Prefix/Suffix support. This would require separate prefix and suffix index searches and an intersection on the resulting postings.

      Attachments

        Issue Links

          Activity

            People

              mike_tr_adamson Mike Adamson
              mike_tr_adamson Mike Adamson
              Mike Adamson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: