Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 4.x
    • Component/s: CQL
    • Labels:

      Description

      Indexing information derived from the row can be powerful. For example, using the hypothetical extract_date function,

      create table ticks (
          symbol text,
          ticked_at datetime,
          price int,
          tags set<text>,
          PRIMARY KEY (symbol, ticked_at)
      );
      
      CREATE INDEX ticks_by_day ON ticks(extract_date(ticked_at));
      
      SELECT * FROM ticks_by_day WHERE extract_date(ticked_at) = '2014-5-13';
      

      http://www.postgresql.org/docs/9.3/static/indexes-expressional.html

        Issue Links

          Activity

          Hide
          mishail Mikhail Stepura added a comment -

          A couple of questions about the scope of this ticket:

          1. Do we want to support functions with arbitrary number of arguments f(x1,x2,...,column,...,xn) or just simple single argument functions f(column)?
          2. Do we want to allow more than 1 index per a column?
          Show
          mishail Mikhail Stepura added a comment - A couple of questions about the scope of this ticket: Do we want to support functions with arbitrary number of arguments f(x1,x2,...,column,...,xn) or just simple single argument functions f(column) ? Do we want to allow more than 1 index per a column?
          Hide
          jbellis Jonathan Ellis added a comment -

          1. Let's start with just indexing a single column. We can worry about the other when we start adding compound indexes in the non-functional case.

          2. I'm okay with just accepting a single index per column if that simplifies implementation a great deal, but that's a limitation we'll want to lift sooner than later.

          Show
          jbellis Jonathan Ellis added a comment - 1. Let's start with just indexing a single column. We can worry about the other when we start adding compound indexes in the non-functional case. 2. I'm okay with just accepting a single index per column if that simplifies implementation a great deal, but that's a limitation we'll want to lift sooner than later.
          Hide
          slebresne Sylvain Lebresne added a comment -

          I'm okay with just accepting a single index per column if that simplifies implementation a great deal, but that's a limitation we'll want to lift sooner than later

          We have CASSANDRA-7771 for that. We can and should definitively deal with that separatly.

          Show
          slebresne Sylvain Lebresne added a comment - I'm okay with just accepting a single index per column if that simplifies implementation a great deal, but that's a limitation we'll want to lift sooner than later We have CASSANDRA-7771 for that. We can and should definitively deal with that separatly.
          Hide
          jbellis Jonathan Ellis added a comment -

          Mikhail, is this still something you have time to work on? If not, we can move it elsewhere.

          Show
          jbellis Jonathan Ellis added a comment - Mikhail, is this still something you have time to work on? If not, we can move it elsewhere.
          Hide
          mishail Mikhail Stepura added a comment - - edited

          Jonathan Ellis I've almost completed the initial implementation, but had no time to finish that. I hope I should be able to complete that somewhen in January.

          Show
          mishail Mikhail Stepura added a comment - - edited Jonathan Ellis I've almost completed the initial implementation, but had no time to finish that. I hope I should be able to complete that somewhen in January.
          Hide
          jbellis Jonathan Ellis added a comment -

          Fantastic!

          Show
          jbellis Jonathan Ellis added a comment - Fantastic!
          Hide
          michaelsembwever mck added a comment -

          Bumping to fix version 4.x, as 3.11.0 is a bug-fix only release.
            ref https://s.apache.org/EHBy

          Show
          michaelsembwever mck added a comment - Bumping to fix version 4.x, as 3.11.0 is a bug-fix only release.   ref https://s.apache.org/EHBy

            People

            • Assignee:
              Unassigned
              Reporter:
              jbellis Jonathan Ellis
              Tester:
              Shawn Kumar
            • Votes:
              1 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

              • Created:
                Updated:

                Development