Peeyush Gupta created ASTERIXDB-3302:
----------------------------------------

             Summary: Compilation error when creating index with field type 
provided for field in closed type 
                 Key: ASTERIXDB-3302
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3302
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: COMP - Compiler
            Reporter: Peeyush Gupta


The following index creation fails with error Compilation error: Typed index on 
'name' field could be created only for open datatype
{code:java}
CREATE DATAVERSE test;
USE test;
CREATE TYPE t1 AS { id: int, name: string, phone:string };
CREATE DATASET ds1(t1) primary key id;

CREATE INDEX idx1 ON ds1(name: string); {code}
Note that I have provided the same data type for name as in the type 
information. We should allow index creation on field type having a closed-type 
when there type is provided in the index creation statement as long as the type 
provided is same as their closed-type.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to