MapD has a concept of a fragment. A fragment is the smallest number of rows we will deal with at a time when working on a query. By default the size of a fragment is 32M rows, the size can be adjusted as a parameter to the
CREATE TABLE statement. There is also a limit for a single fragment on a single column of 1GB of size (all the data for that column must fit within the 1GB limitation).
In the case we are looking at here we believe that the error is occurring when your inner table
profile is crossing a single fragment boundary due to the size of the content being stored in the
profile.audience_ids. Currently the code does not support ARRAY handling when multiple fragments occurs.
We are planning to fix this in the future.
An option you could explore currently is a new feature which has landed giving the ability to shard a table for join purposes. In your case if you sharded the tables on id and profile_id the join and created enough shards the number of fragments could be kept at one for each of the sharded joins.
The syntax would be
CREATE TABLE stories(profile_id text, dma text, SHARD KEY (profile_id)) WITH (shard_count = 10);
CREATE TABLE profile(id text, audience_ids text, SHARD KEY (id), SHARED DICTIONARY (id) REFERENCES stories(profile_id)) WITH (shard_count = 10);
you could try this with a latest build from OS to see if that gets you past your current issue