asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ildar Absalyamov <ildar.absalya...@gmail.com>
Subject Random element list accessor
Date Tue, 15 Dec 2015 21:24:29 GMT
Hi all,

It was very surprising for me that in addition to regular array-style list accessors (e.g.
list[5]) we support special random element accessor (e.g. list[?]), which according to documentation
should return random element from the list.
However the current implementation ALWAYS returns the first element from the list.
Not only this behavior is deterministic, contradicting the semantics of the accessor, but
it is also used in the test cases, where it’s used to access elements in the list, containing
more then 1 item (e.g. asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.3.query.aql).

Is there any reason for such implementation, other than someone trowing a dice and considering
1 to be pretty random number to be used? :)

Best regards,
Ildar


Mime
View raw message