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

Malformed metadata record for enforced open index

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      drop dataverse test if exists;
      create dataverse test;
      use dataverse test;

      create type Emp as closed {
      id:int64,
      fname:string,
      lname:string,
      age:int64,
      dept:string
      }

      create type EmpOpen as open {
      id:int64,
      age:int64,
      dept:string
      }

      create dataset employee(Emp) primary key id;

      create dataset employeeOpen(EmpOpen) primary key id;

      create index idx_employee_f_l_name on employeeOpen(fname:string,lname:string) enforced;

      for $m in dataset Metadata.Index
      return $m.SearchKeyType;

      Exception:
      No getLength implemented for a value of this type UINT16 . [NotImplementedException]

      I verified that regular open datasets works when there is a list of string on the open part.

      It seems to me the serialization format of the metadata entry for the enforced open index is not right.

      This should be a release blocker because it seems to affect the metadata record format.

      The root cause is that "SearchKeyType" is in the open part of the record but serialized as if it is in the closed part:
      https://github.com/apache/incubator-asterixdb/blob/master/asterix-metadata/src/main/java/org/apache/asterix/metadata/entitytupletranslators/IndexTupleTranslator.java#L259

        Attachments

          Activity

            People

            • Assignee:
              iabsalyamov Ildar Absalyamov
              Reporter:
              buyingyi Yingyi Bu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: