[ 
https://issues.apache.org/jira/browse/ASTERIXDB-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael J. Carey updated ASTERIXDB-1958:
----------------------------------------

In addition, error messages related to text and keyword indexing refer to 
internal index types that aren't what the user asked for (so there's a bit of 
an impedance mismatch there), e.g.:

CREATE INDEX gbMessageIdx ON GleambookMessages(message: string?) TYPE keyword;

==>  Error: ASX1042: Cannot create non-enforced typed index of this kind: 
LENGTH_PARTITIONED_WORD_INVIX


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

Reply via email to