XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.8.0
    • None

    Description

      When a view or base table is created, we should have an string AUTO_PARTITION_SEQ parameter on CREATE TABLE which uses a sequence based on the argument on the server side to generate a WHERE clause with the first PK column and the unique identifier from the sequence.

      For example:

      CREATE SEQUENCE metric_id_seq;
      CREATE TABLE metric_table (metric_id INTEGER, val DOUBLE) AUTO_PARTITION_SEQ=metric_id_seq;
      CREATE VIEW my_view1 AS SELECT * FROM base_table;
      

      would tack on a WHERE clause base on the next value in a sequence, logically like this:

      WHERE partition_id =  NEXT VALUE FROM metric_id_seq
      

      It's important that the sequence be generated after the check for the existence of the view so that we don't burn sequence values needlessly if the view already exists.

      Attachments

        1. PHOENIX-2795.patch
          119 kB
          Thomas D'Silva
        2. PHOENIX-2795-v2.patch
          123 kB
          Thomas D'Silva
        3. PHOENIX-2795-v3.patch
          125 kB
          Thomas D'Silva

        Activity

          People

            tdsilva Thomas D'Silva
            jamestaylor James R. Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: