You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Murtadha Hubail (JIRA)" <ji...@apache.org> on 2016/05/26 17:16:12 UTC

[jira] [Resolved] (ASTERIXDB-1419) Can not drop a accidently created type

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

Murtadha Hubail resolved ASTERIXDB-1419.
----------------------------------------
    Resolution: Fixed

The issue was caused by the assumption that all types and subtypes are of type ARecordType. So, when it encountered the CollectionType (top50HashTags), the downcast failed. Now it uses the abstraction of all complex types and does proper types checking on every complex type.

> Can not drop a accidently created type
> --------------------------------------
>
>                 Key: ASTERIXDB-1419
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1419
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Metadata
>            Reporter: Jianfeng Jia
>            Assignee: Murtadha Hubail
>
> I create a datatype as following:
> {code}
>   create type typeSnapshot if not exists as open {
>       countyID : int32,
>       timeBin: interval,
>       tweetCount: int32,
>       retweetCount: int32,
>       users: [int64],
>       top50HashTags: [{string:int32}]
>     }
> {code}
> It was created successfully. Then I found the *top50HashTags* was wrong. However I can't drop this type due to the following exception:
> {code}
> java.lang.ClassCastException: org.apache.asterix.om.types.AOrderedListType cannot be cast to org.apache.asterix.om.types.ARecordType
>     at org.apache.asterix.metadata.MetadataNode.confirmDatatypeIsUnusedByDatatypes(MetadataNode.java:748)
>     at org.apache.asterix.metadata.MetadataNode.confirmDatatypeIsUnused(MetadataNode.java:723)
>     at org.apache.asterix.metadata.MetadataNode.dropDatatype(MetadataNode.java:502)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)