asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ildar Absalyamov (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (ASTERIXDB-1738) Change feed fails to delete record with meta PK
Date Tue, 06 Jun 2017 22:06:18 GMT

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

Ildar Absalyamov closed ASTERIXDB-1738.
---------------------------------------
    Resolution: Fixed

> Change feed fails to delete record with meta PK
> -----------------------------------------------
>
>                 Key: ASTERIXDB-1738
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1738
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Ildar Absalyamov
>            Assignee: Ildar Absalyamov
>
> I am trying to create the following dataset with meta PK and feed in data to it using
change-feed localFS adapter
> {noformat}
> drop dataverse test if exists;
> create dataverse test;
> use dataverse test;
> create type TestType as closed {
>     test: string
> }
> create type MetaType as {
> id:int
> }
> create dataset TestDS(TestType) with meta(MetaType) primary key meta().id;
> create index TestIdx on TestDS(test);
> drop feed TestFeed if exists;
> create feed TestFeed using adapter
> (
>     ("parser"="record-with-metadata"),
>     ("reader"="localfs"),
>     ("path"="localhost:///ABSOLUTE_PATH/test.adm"),
>     //type of the record
>     ("type-name"="TestType"),
>     //type of the meta record
>     ("meta-type-name"="MetaType"),
>     //format of the record
>     ("record-format"="adm"),
>     // format of the meta record
>     ("format"="csv"),
>     ("delimiter"=","),
>     // index of the primary key the record (meta or orig)
>     ("key-indexes"="0"),
>     // indicates that PK originates from meta
>     ("key-indicators"="1"),
> 	//index of the record in the meta record
>     ("record-index"="1"),
>     ("change-feed"="true"),
>     // whether CSV header is present in the input
>     ("header"="false")
> );
> set wait-for-completion-feed "false";
> connect feed TestFeed to dataset TestDS;
> {noformat}
> Contents of the test.adm:
> {noformat}
> 1,"{""test"":""test1""}"
> 2,"{""test"":""test2""}"
> 3,"{""test"":""test3""}"
> 3,
> 2,"{""test"":""test4""}"
> {noformat}
> Ingestion is able to update the record with id=2, but fails to delete the third record:
> {noformat}
> for $x in dataset TestDS return {"record": $x, "id": meta().id}
> {noformat}
> Result:
> {noformat}
> { "record": { "test": "test1" }, "id": 1 }
> { "record": { "test": "test4" }, "id": 2 }
> { "record": { "test": "test3" }, "id": 3 }
> {noformat}



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

Mime
View raw message