Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2218

Enforcement of a secondary index does not work.

    XMLWordPrintableJSON

Details

    Description

      The enforced index does not check the field type when inserting a record. The following code work on the current master.

      create type tempType if not exists as open {
          id: int64
      };
      
      create dataset tempDataset(tempType) primary key id;
      
      create index tempIndex on tempDataset(val:int64?) enforced;
      
      insert into tempDataset({"id":1,"val":64.79});
      

      For a closed-type field, it works as well.

      create type tempClosedType if not exists as closed {
          id: int64,
          val: int64
      };
      
      create dataset tempClosedDataset(tempClosedType) primary key id;
      
      create index tempClosedIndex on tempClosedDataset(val);
      
      insert into tempClosedDataset({"id":1,"val":64.79});
      

      Attachments

        Activity

          People

            dlychagin-cb Dmitry Lychagin
            wangsaeu Taewoo Kim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: