asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Carey (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ASTERIXDB-1958) Need better error message for CREATE INDEX on undefined fields
Date Wed, 28 Jun 2017 05:06:01 GMT
Michael J. Carey created ASTERIXDB-1958:
-------------------------------------------

             Summary: Need better error message for CREATE INDEX on undefined fields
                 Key: ASTERIXDB-1958
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1958
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: *DB - AsterixDB, SQL - Translator SQL++
         Environment: MacOS, latest snapshot of master
            Reporter: Michael J. Carey
            Assignee: Dmitry Lychagin


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);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message