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

Need better error messages for CREATE INDEX on undefined fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • MacOS, latest snapshot of master

    Description

      THE OFFENDING ERROR MSG:

      Unknown type [userSince] [AlgebricksException]

      THE COMPLAINT:

      The error message is missing location info (e.g., line number) and should indicate that userSince is a non-predeclared field in the data type of the data set - and therefore its type also needs to be specified in order for CREATE INDEX to work. (See manual. )

      THE REPRODUCER SETUP:

      DROP DATAVERSE TinySocial IF EXISTS;

      CREATE DATAVERSE TinySocial;
      USE TinySocial;

      CREATE TYPE ChirpUserType AS

      { screenName: string }

      ;

      CREATE TYPE ChirpMessageType AS closed

      { chirpId: string }

      ;

      CREATE TYPE GleambookUserType AS

      { id: int }

      ;

      CREATE TYPE GleambookMessageType AS

      { messageId: int }

      ;

      CREATE DATASET GleambookUsers(GleambookUserType)
      PRIMARY KEY id;

      CREATE DATASET GleambookMessages(GleambookMessageType)
      PRIMARY KEY messageId;

      CREATE DATASET ChirpUsers(ChirpUserType)
      PRIMARY KEY screenName;

      CREATE DATASET ChirpMessages(ChirpMessageType)
      PRIMARY KEY chirpId;

      CREATE INDEX gbUserSinceIdx on GleambookUsers(userSince);

      Attachments

        Activity

          People

            dlychagin-cb Dmitry Lychagin
            dtabass Michael J. Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: