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

Invalid entries in array index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.9
    • 0.9.9
    • IDX - Indexes

    Description

      The following example shows that array index has invalid entries when documents has an indexed field of a different type than the one used to create the index.

      drop dataverse test if exists;
      create dataverse test;
      use test;
      
      CREATE TYPE dsType AS OPEN {id:int};
      CREATE DATASET ds1(dsType) primary key id;
      
      CREATE INDEX i2 ON ds1(UNNEST b SELECT x : int) EXCLUDE UNKNOWN KEY;
      
      UPSERT INTO ds1 {"id": 5, "a": ["hello"], "b": [{"x":1}]};
      UPSERT INTO ds1 {"id": 6, "a": ["hello"], "b": [{"x":"aa"}]};
      
      SET `import-private-functions` `true`;
      FROM DUMP_INDEX("test", "ds1", "i2") AS v
      SELECT VALUE v
      ORDER BY v.values; 

      The output shows invalid entries

      { "values": [ 1, 5 ] }
      { "values": [ 171524930624552960, 7023095185408 ] } 

      Attachments

        Activity

          People

            ggalvizo Glenn Justo Galvizo
            peeyushgupta1 Peeyush Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: