Closed GoogleCodeExporter closed 8 years ago
Adding some more information,
let $a := {"r1":1234}
let $b := {"r2":456}
return [ $a,$b ]
results :
[ { }, { } ]
Original comment by khfaraaz82
on 17 May 2013 at 1:01
Khurram, I think that it's not clear that this is the same problem, so I've
file issue 465 for this.
Original comment by westm...@gmail.com
on 21 May 2013 at 6:48
Yingyi, could you take a look at this one?
Please send it back, if you are too busy.
Original comment by westm...@gmail.com
on 24 May 2013 at 12:33
Original comment by westm...@gmail.com
on 24 May 2013 at 12:35
Original comment by westm...@gmail.com
on 28 May 2013 at 5:52
INFO: Optimized Plan:
distribute result [%0->$$8]
-- DISTRIBUTE_RESULT |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
project ([$$8])
-- STREAM_PROJECT |PARTITIONED|
assign [$$8] <- [function-call: ASTERIX_PRIVATE:ordered-list-constructor, Args:[%0->$$2, %0->$$7]]
-- ASSIGN |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
group by ([$$2 := %0->$$9]) decor ([]) {
aggregate [$$7] <- [function-call: ASTERIX_PRIVATE:listify, Args:[%0->$$10]]
-- AGGREGATE |LOCAL|
nested tuple source
-- NESTED_TUPLE_SOURCE |LOCAL|
}
-- PRE_CLUSTERED_GROUP_BY[$$9] |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
order (ASC, %0->$$9)
-- STABLE_SORT [$$9(ASC)] |PARTITIONED|
exchange
-- HASH_PARTITION_EXCHANGE [$$9] |PARTITIONED|
project ([$$9, $$10])
-- STREAM_PROJECT |PARTITIONED|
assign [$$9] <- [function-call: ASTERIX_PRIVATE:field-access-by-index, Args:[%0->$$0, AInt32: {1}]]
-- ASSIGN |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
data-scan []<-[$$10, $$0] <- test:DataOpen
-- DATASOURCE_SCAN |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
empty-tuple-source
-- EMPTY_TUPLE_SOURCE |PARTITIONED|
Original comment by westm...@gmail.com
on 30 May 2013 at 6:51
Original comment by westm...@gmail.com
on 4 Jun 2013 at 12:34
Original comment by westm...@gmail.com
on 4 Jun 2013 at 5:28
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type TypeOpen as open {
id : int32,
int_m : int32,
int_o : int32?,
string_m : string,
string_o : string?
};
create dataset DataOpen(TypeOpen) primary key id;
insert into dataset DataOpen({ "id": 0, "int_m": 1, "int_o": 1, "string_m": "a", "string_o": "a" });
insert into dataset DataOpen({ "id": 1, "int_m": 1, "int_o": 1, "string_m": "a", "string_o": null });
insert into dataset DataOpen({ "id": 2, "int_m": 1, "int_o": 1, "string_m": "b", "string_o": "a" });
insert into dataset DataOpen({ "id": 3, "int_m": 1, "int_o": 1, "string_m": "b", "string_o": null });
insert into dataset DataOpen({ "id": 4, "int_m": 1, "int_o": null, "string_m": "a", "string_o": "a" });
insert into dataset DataOpen({ "id": 5, "int_m": 1, "int_o": null, "string_m": "a", "string_o": null });
insert into dataset DataOpen({ "id": 6, "int_m": 1, "int_o": null, "string_m": "b", "string_o": "a" });
insert into dataset DataOpen({ "id": 7, "int_m": 1, "int_o": null, "string_m": "b", "string_o": null });
insert into dataset DataOpen({ "id": 8, "int_m": 2, "int_o": 1, "string_m": "a", "string_o": "a" });
insert into dataset DataOpen({ "id": 9, "int_m": 2, "int_o": 1, "string_m": "a", "string_o": null });
insert into dataset DataOpen({ "id": 10, "int_m": 2, "int_o": 1, "string_m": "b", "string_o": "a" });
insert into dataset DataOpen({ "id": 11, "int_m": 2, "int_o": 1, "string_m": "b", "string_o": null });
insert into dataset DataOpen({ "id": 12, "int_m": 2, "int_o": null, "string_m": "a", "string_o": "a" });
insert into dataset DataOpen({ "id": 13, "int_m": 2, "int_o": null, "string_m": "a", "string_o": null });
insert into dataset DataOpen({ "id": 14, "int_m": 2, "int_o": null, "string_m": "b", "string_o": "a" });
insert into dataset DataOpen({ "id": 15, "int_m": 2, "int_o": null, "string_m": "b", "string_o": null });
for $x in dataset DataOpen
let $id := $x.id
group by $m := $x.int_m with $id
return [ $m, $id ]
Results:
[ 1, [ 0, 1, 2, 3, 4, 5, 6, 7 ] ]
[ 2, [ 8, 9, 10, 11, 12, 13, 14, 15 ] ]
Original comment by khfaraaz82
on 4 Jun 2013 at 8:07
Original issue reported on code.google.com by
westm...@gmail.com
on 17 May 2013 at 12:48