You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Peeyush Gupta (Jira)" <ji...@apache.org> on 2023/11/07 21:50:00 UTC
[jira] [Created] (ASTERIXDB-3302) Compilation error when creating index with field type provided for field in closed type
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)