shamim8888 / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Auto-generated key failing on manual insert (Also highlights the need for documentation on uuid) #823

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

This query fails:

==================
drop dataverse twitter if exists;
create dataverse twitter;
use dataverse twitter;

create type TweetMessageType as closed {
    id: uuid,
    message-text: string
}

create dataset TweetMessages(TweetMessageType)
primary key id autogenerated;

insert into dataset TweetMessages(
{
"message-text":"hello"
});
==================
With this error:

SEVERE: edu.uci.ics.asterix.om.base.AOrderedList cannot be cast to 
edu.uci.ics.asterix.om.base.AString
java.lang.ClassCastException: edu.uci.ics.asterix.om.base.AOrderedList cannot 
be cast to edu.uci.ics.asterix.om.base.AString
    at edu.uci.ics.asterix.om.typecomputer.impl.OpenRecordConstructorResultType.computeType(OpenRecordConstructorResultType.java:67)
    at edu.uci.ics.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:88)
    at edu.uci.ics.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:56)
    at edu.uci.ics.hyracks.algebricks.core.algebra.typing.AbstractTypeEnvironment.getType(AbstractTypeEnvironment.java:41)
=======

Original issue reported on code.google.com by sjaco...@ucr.edu on 17 Nov 2014 at 10:33

GoogleCodeExporter commented 9 years ago
Are you sure that's the full ddl? I tested that on master query worked fine

Original comment by ildar.absalyamov on 17 Nov 2014 at 11:00

GoogleCodeExporter commented 9 years ago
Yeah you're right looks like this is an issue in our branch only (Which 
hopefully will one day be in Master). There must not be a test case for this. I 
think it is related to the changes I made to index keys, so I'll work on it and 
add a test case for it.

Original comment by sjaco...@ucr.edu on 17 Nov 2014 at 11:39

GoogleCodeExporter commented 9 years ago
Marking as invalid, since the bug is not in master

Original comment by ildar.absalyamov on 18 Nov 2014 at 2:27