You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Michael J. Carey (JIRA)" <ji...@apache.org> on 2016/08/21 17:59:20 UTC
[jira] [Commented] (ASTERIXDB-1601) CREATE TYPE failure as NPE
(unsupported/untested feature?)
[ https://issues.apache.org/jira/browse/ASTERIXDB-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15429820#comment-15429820 ]
Michael J. Carey commented on ASTERIXDB-1601:
---------------------------------------------
E.g., here's another document-allowed CREATE TYPE example that doesn't actually work (though no NPE :-)) if you try replacing the employment history for users with the renamed type:
CREATE TYPE EmploymentHistory AS [ EmploymentType ];
CREATE TYPE GleambookUserType AS {
id: int,
alias: string,
name: string,
userSince: datetime,
friendIds: {{ int }},
employment: [ EmploymentType ]
};
If you change the above field to " .... employment: EmploymentHistory ... " you get:
org.apache.asterix.om.types.AOrderedListType cannot be cast to org.apache.asterix.om.types.ARecordType [ClassCastException]
My proposal would be to only allow CREATE TYPE to be used to create a new record type for now, which is all we ever use it for. I can't even remember why all that other stuff was/is there - but - sure enough, it dates back to the reference manual for UC AsterixDB 2013... :-)
> CREATE TYPE failure as NPE (unsupported/untested feature?)
> ----------------------------------------------------------
>
> Key: ASTERIXDB-1601
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1601
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: AsterixDB, Documentation, Error Reporting, Translator - AQL
> Environment: OSX and master
> Reporter: Michael J. Carey
> Assignee: Till
> Priority: Critical
> Labels: soon
>
> I just tried something that I'd long forgotten about that's documented in the reference manual but basically never used - and it doesn't work. I am thinking we should disable this (and other things like it), perhaps? Here's what I did:
> DROP DATAVERSE TinySocial2;
> CREATE DATAVERSE TinySocial2;
> USE TinySocial2;
> CREATE TYPE MyUserTupleType AS CLOSED {
> id: uuid, alias: string?, name: string
> };
> CREATE TYPE RenamedType AS MyUserTupleType;
> Here's what I got:
> Internal error. Please check instance logs for further details. [NullPointerException]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)