You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by Steven Jacobs <sj...@ucr.edu> on 2017/09/19 17:08:01 UTC
inserting into an autogenerated key dataset from a query result
Hi all,
I'm seeing a strange issue when inserting into a dataset with an
autogenerated key the result of a query. I was wondering if anyone has had
success with such a case. I have a simple example below which fails on
master (The full JIRA issue is here:
https://issues.apache.org/jira/browse/ASTERIXDB-2101)
drop dataverse channels if exists;
create dataverse channels;
use channels;
create type result as {
id:uuid
};
create type subscriptionType as {
subscriptionId:uuid,
param0:int
};
create dataset roomRecordsResults(result)
primary key id autogenerated;
create dataset roomRecordsSubscriptions(subscriptionType)
primary key subscriptionId autogenerated;
use channels;
insert into channels.roomRecordsResults (
select sub.subscriptionId
from channels.roomRecordsSubscriptions sub
);
Re: inserting into an autogenerated key dataset from a query result
Posted by Steven Jacobs <sj...@ucr.edu>.
Apologies, this appears to be only happening on my local copy of master.
I've cleaned and rebuilt several times and still can't get it to resolve
locally, but it seems to be my problem and not the code base.
Steven
On Tue, Sep 19, 2017 at 10:49 AM, Mike Carey <dt...@gmail.com> wrote:
> Note that this works on the release from a couple of weeks ago, so this is
> a regression that got missed by our tests (surprise!) it seems.
>
>
>
> On 9/19/17 10:08 AM, Steven Jacobs wrote:
>
>> Hi all,
>> I'm seeing a strange issue when inserting into a dataset with an
>> autogenerated key the result of a query. I was wondering if anyone has had
>> success with such a case. I have a simple example below which fails on
>> master (The full JIRA issue is here:
>> https://issues.apache.org/jira/browse/ASTERIXDB-2101)
>>
>>
>> drop dataverse channels if exists;
>> create dataverse channels;
>> use channels;
>> create type result as {
>> id:uuid
>> };
>> create type subscriptionType as {
>> subscriptionId:uuid,
>> param0:int
>> };
>> create dataset roomRecordsResults(result)
>> primary key id autogenerated;
>> create dataset roomRecordsSubscriptions(subscriptionType)
>> primary key subscriptionId autogenerated;
>> use channels;
>> insert into channels.roomRecordsResults (
>> select sub.subscriptionId
>> from channels.roomRecordsSubscriptions sub
>> );
>>
>>
>
Re: inserting into an autogenerated key dataset from a query result
Posted by Mike Carey <dt...@gmail.com>.
Note that this works on the release from a couple of weeks ago, so this
is a regression that got missed by our tests (surprise!) it seems.
On 9/19/17 10:08 AM, Steven Jacobs wrote:
> Hi all,
> I'm seeing a strange issue when inserting into a dataset with an
> autogenerated key the result of a query. I was wondering if anyone has had
> success with such a case. I have a simple example below which fails on
> master (The full JIRA issue is here:
> https://issues.apache.org/jira/browse/ASTERIXDB-2101)
>
>
> drop dataverse channels if exists;
> create dataverse channels;
> use channels;
> create type result as {
> id:uuid
> };
> create type subscriptionType as {
> subscriptionId:uuid,
> param0:int
> };
> create dataset roomRecordsResults(result)
> primary key id autogenerated;
> create dataset roomRecordsSubscriptions(subscriptionType)
> primary key subscriptionId autogenerated;
> use channels;
> insert into channels.roomRecordsResults (
> select sub.subscriptionId
> from channels.roomRecordsSubscriptions sub
> );
>