Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Fix Version/s: 3.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
          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
          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
          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
          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
          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
          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
          Jonathan Ellis added a comment -

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

          Show
          Jonathan Ellis added a comment - Mikhail, is this still something you have time to work on? If not, we can move it elsewhere.
          Hide
          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
          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
          Jonathan Ellis added a comment -

          Fantastic!

          Show
          Jonathan Ellis added a comment - Fantastic!

            People

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

              Dates

              • Created:
                Updated:

                Development