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

Composite atomic-array indexes not ingesting data on creation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • IDX - Indexes
    • None

    Description

      The following sequence of events does not deliver the right result. The issue lies with ingestion job created on CREATE INDEX.

      SET               `compiler.arrayindex` "true";
      DROP DATAVERSE    TestDataverse IF EXISTS;
      CREATE DATAVERSE  TestDataverse;
      USE               TestDataverse;
      CREATE TYPE       GenericType AS { _id: bigint  };
      CREATE DATASET    TestDataset (GenericType)
      PRIMARY KEY       _id;
      INSERT INTO       TestDataset [
          { "_id": 100, "f": 1, "a": {"b": [{"c": {"d": 1}}]} },
          { "_id": 101, "f": "a", "a": null },
          { "_id": 102, "f": "a", "a": {"b": null} },
          { "_id": 103, "f": "a", "a": {"b": [{"c": null}]} },
          { "_id": 104, "f": "a", "a": {"b": [{"c": {"d": null}}]} }
          ];
      CREATE INDEX      TestIdx
      ON                TestDataset (
          f : bigint,
          UNNEST a.b
          SELECT c.d : bigint
      );
      FROM TestDataset D
      UNNEST D.a.b AB
      WHERE D.f = 1 AND AB.c.d = 1
      SELECT D._id;

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: