You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Xikui Wang (JIRA)" <ji...@apache.org> on 2017/03/10 18:25:04 UTC

[jira] [Updated] (ASTERIXDB-1835) UnionType cast to RecordType issue when query nested record type.

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

Xikui Wang updated ASTERIXDB-1835:
----------------------------------
    Description: 
{noformat}

DROP DATAVERSE Test IF EXISTS;
CREATE DATAVERSE Test;
USE Test;

CREATE TYPE TypeA AS {
	aid: int
}

CREATE TYPE TypeB AS {
	bid: int,
	a_attr: TypeA?
}

CREATE DATASET DataB(TypeB) PRIMARY KEY bid;

SELECT * FROM DataB WHERE DataB.a_attr.aid = '0';

{noformat}

Error
Message
org.apache.asterix.om.types.AUnionType cannot be cast to org.apache.asterix.om.types.ARecordType [ClassCastException]

  was:
{noformat}

DROP DATAVERSE Test IF EXISTS;
CREATE DATAVERSE Test;
USE Test;

CREATE TYPE TypeA AS {
	aid: int
}

CREATE TYPE TypeB AS {
	bid: int,
	a_attr: TypeA?
}

CREATE DATASET DataB(TypeB) PRIMARY KEY bid;

SELECT * FROM DataB WHERE DataB.a_attr.aid = '0';

{noformat}


> UnionType cast to RecordType issue when query nested record type.
> -----------------------------------------------------------------
>
>                 Key: ASTERIXDB-1835
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1835
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Xikui Wang
>            Priority: Minor
>
> {noformat}
> DROP DATAVERSE Test IF EXISTS;
> CREATE DATAVERSE Test;
> USE Test;
> CREATE TYPE TypeA AS {
> 	aid: int
> }
> CREATE TYPE TypeB AS {
> 	bid: int,
> 	a_attr: TypeA?
> }
> CREATE DATASET DataB(TypeB) PRIMARY KEY bid;
> SELECT * FROM DataB WHERE DataB.a_attr.aid = '0';
> {noformat}
> Error
> Message
> org.apache.asterix.om.types.AUnionType cannot be cast to org.apache.asterix.om.types.ARecordType [ClassCastException]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)