[ https://issues.apache.org/jira/browse/ASTERIXDB-1418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jianfeng Jia updated ASTERIXDB-1418: ------------------------------------ Description: When I ran the following query {code} use dataverse twitter for $t in dataset ds_tweet_trump group by $county := $t.geo_tag.countyID, $timebin := interval-bin($t.create_at, date("2012-01-01"), day-time-duration("P1D")) with $t return { "county": $county, "time": $timebin, "count": count($t), "users": count( for $tt in $t distinct by $tt.user.id return $tt.user.id) } {code} One exception appears: {code} Attempting to construct a nested plan with 3 operator descriptors. Currently, nested plans can only consist in linear pipelines of Asterix micro operators. [AlgebricksException] {code} The ddl : {code} create dataverse twitter if not exists; use dataverse twitter create type typeUser if not exists as open { id: int64, name: string, screen_name : string, lang : string, location: string, create_at: date, description: string, followers_count: int32, friends_count: int32, statues_count: int64 } create type typePlace if not exists as open{ country : string, country_code : string, full_name : string, id : string, name : string, place_type : string, bounding_box : rectangle } create type typeGeoTag if not exists as open { stateID: int32, stateName: string, countyID: int32, countyName: string, cityID: int32?, cityName: string? } create type typeTweet if not exists as open{ create_at : datetime, id: int64, "text": string, in_reply_to_status : int64, in_reply_to_user : int64, favorite_count : int64, coordinate: point?, retweet_count : int64, lang : string, is_retweet: boolean, hashtags : {{ string }} ?, user_mentions : {{ int64 }} ? , user : typeUser, place : typePlace?, geo_tag: typeGeoTag } create dataset ds_tweet(typeTweet) if not exists primary key id; //with filter on create_at; {code} The logical plan is generated successfully: was: When I ran the following query {code} use dataverse twitter for $t in dataset ds_tweet_trump group by $county := $t.geo_tag.countyID, $timebin := interval-bin($t.create_at, date("2012-01-01"), day-time-duration("P1D")) with $t return { "county": $county, "time": $timebin, "count": count($t), "users": count( for $tt in $t distinct by $tt.user.id return $tt.user.id) } {code} One exception appears: {code} Attempting to construct a nested plan with 3 operator descriptors. Currently, nested plans can only consist in linear pipelines of Asterix micro operators. [AlgebricksException] {code} > Doesn't support some a Nested Aggregation Query > ----------------------------------------------- > > Key: ASTERIXDB-1418 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1418 > Project: Apache AsterixDB > Issue Type: Bug > Reporter: Jianfeng Jia > > When I ran the following query > {code} > use dataverse twitter > for $t in dataset ds_tweet_trump > group by > $county := $t.geo_tag.countyID, > $timebin := interval-bin($t.create_at, date("2012-01-01"), > day-time-duration("P1D")) with $t > return { > "county": $county, > "time": $timebin, > "count": count($t), > "users": count( for $tt in $t distinct by $tt.user.id return $tt.user.id) > } > {code} > One exception appears: > {code} > Attempting to construct a nested plan with 3 operator descriptors. Currently, > nested plans can only consist in linear pipelines of Asterix micro operators. > [AlgebricksException] > {code} > The ddl : > {code} > create dataverse twitter if not exists; > use dataverse twitter > create type typeUser if not exists as open { > id: int64, > name: string, > screen_name : string, > lang : string, > location: string, > create_at: date, > description: string, > followers_count: int32, > friends_count: int32, > statues_count: int64 > } > create type typePlace if not exists as open{ > country : string, > country_code : string, > full_name : string, > id : string, > name : string, > place_type : string, > bounding_box : rectangle > } > create type typeGeoTag if not exists as open { > stateID: int32, > stateName: string, > countyID: int32, > countyName: string, > cityID: int32?, > cityName: string? > } > create type typeTweet if not exists as open{ > create_at : datetime, > id: int64, > "text": string, > in_reply_to_status : int64, > in_reply_to_user : int64, > favorite_count : int64, > coordinate: point?, > retweet_count : int64, > lang : string, > is_retweet: boolean, > hashtags : {{ string }} ?, > user_mentions : {{ int64 }} ? , > user : typeUser, > place : typePlace?, > geo_tag: typeGeoTag > } > create dataset ds_tweet(typeTweet) if not exists primary key id; > //with filter on create_at; > {code} > The logical plan is generated successfully: -- This message was sent by Atlassian JIRA (v6.3.4#6332)