{"action":"closed","issue":{"url":"https://api.github.com/repos/slamdata/slamengine/issues/587","labels_url":"https://api.github.com/repos/slamdata/slamengine/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/slamdata/slamengine/issues/587/comments","events_url":"https://api.github.com/repos/slamdata/slamengine/issues/587/events","html_url":"https://github.com/slamdata/slamengine/issues/587","id":56279338,"number":587,"title":"planner: objectConcat cannot handle unrecognized shapes","user":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/slamdata/slamengine/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/slamdata/slamengine/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/slamdata/slamengine/milestones/6","labels_url":"https://api.github.com/repos/slamdata/slamengine/milestones/6/labels","id":839374,"number":6,"title":"1.3","description":"","creator":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":12,"state":"open","created_at":"2014-10-24T18:33:05Z","updated_at":"2015-02-07T21:00:08Z","due_on":"2015-03-02T07:00:00Z","closed_at":null},"comments":10,"created_at":"2015-02-02T19:12:35Z","updated_at":"2015-02-07T21:00:08Z","closed_at":"2015-02-07T21:00:08Z","body":"```sql\r\nSELECT DISTINCT affiliations[*].orgRole, COUNT(*)\r\n  FROM \"/SampleArrayObjects\" \r\n  GROUP BY affiliations[*].orgRole\r\n```\r\n\r\nCompile log:\r\n\r\n```\r\nVector(SQL AST\r\nSelect(distinct)\r\n+- Proj\r\n¦  ?- Binop({})\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ?- LiteralExpr('orgRole')\r\n+- Proj\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     ?- Splice\r\n+- TableRelation(/SampleArrayObjects)\r\n?- GroupBy\r\n   ?- Binop({})\r\n      +- Unop(flatten_array)\r\n      ¦  ?- Ident(affiliations)\r\n      ?- LiteralExpr('orgRole'), SQL AST (paths interpreted)\r\nSelect(distinct)\r\n+- Proj\r\n¦  ?- Binop({})\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ?- LiteralExpr('orgRole')\r\n+- Proj\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     ?- Splice\r\n+- TableRelation(./SampleArrayObjects)\r\n?- GroupBy\r\n   ?- Binop({})\r\n      +- Unop(flatten_array)\r\n      ¦  ?- Ident(affiliations)\r\n      ?- LiteralExpr('orgRole'), Annotated Tree\r\nSelect(distinct)\r\n+- Annotation\r\n¦  +- None\r\n¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  +- None\r\n¦  ?- Type(Product(NamedField(orgRole,Top),NamedField(1,Int)))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Top)\r\n¦  ?- Binop({})\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦     ¦  +- OneToOne(({}))\r\n¦     ¦  ?- Type(Top)\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  +- Annotation\r\n¦     ¦  ¦  +- None\r\n¦     ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n¦     ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n¦     ¦  ¦  ?- Type(AnonField(Top))\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ¦     ?- Annotation\r\n¦     ¦        +- None\r\n¦     ¦        +- Provenance(./SampleArrayObjects)\r\n¦     ¦        +- None\r\n¦     ¦        ?- Type(AnonElem(AnonField(Top)))\r\n¦     ?- LiteralExpr('orgRole')\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Value)\r\n¦           +- None\r\n¦           ?- Type(Const(Data.Str(\"orgRole\")))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance(Empty)\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Int)\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance(Empty)\r\n¦     ¦  +- ManyToOne(COUNT)\r\n¦     ¦  ?- Type(Int)\r\n¦     ?- Splice\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Empty)\r\n¦           +- None\r\n¦           ?- Type(Top)\r\n+- TableRelation(./SampleArrayObjects)\r\n¦  ?- Annotation\r\n¦     +- None\r\n¦     +- Provenance(./SampleArrayObjects)\r\n¦     +- None\r\n¦     ?- Type(Bottom)\r\n?- GroupBy\r\n   +- Annotation\r\n   ¦  +- None\r\n   ¦  +- Provenance((./SampleArrayObjects & Value))\r\n   ¦  +- None\r\n   ¦  ?- Type(IndexedElem(0,Top))\r\n   ?- Binop({})\r\n      +- Annotation\r\n      ¦  +- None\r\n      ¦  +- Provenance((./SampleArrayObjects & Value))\r\n      ¦  +- OneToOne(({}))\r\n      ¦  ?- Type(Top)\r\n      +- Unop(flatten_array)\r\n      ¦  +- Annotation\r\n      ¦  ¦  +- None\r\n      ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n      ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n      ¦  ¦  ?- Type(AnonField(Top))\r\n      ¦  ?- Ident(affiliations)\r\n      ¦     ?- Annotation\r\n      ¦        +- None\r\n      ¦        +- Provenance(./SampleArrayObjects)\r\n      ¦        +- None\r\n      ¦        ?- Type(AnonElem(AnonField(Top)))\r\n      ?- LiteralExpr('orgRole')\r\n         ?- Annotation\r\n            +- None\r\n            +- Provenance(Value)\r\n            +- None\r\n            ?- Type(Const(Data.Str(\"orgRole\"))), Annotated Tree (variables substituted)\r\nSelect(distinct)\r\n+- Annotation\r\n¦  +- None\r\n¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  +- None\r\n¦  ?- Type(Product(NamedField(orgRole,Top),NamedField(1,Int)))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Top)\r\n¦  ?- Binop({})\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦     ¦  +- OneToOne(({}))\r\n¦     ¦  ?- Type(Top)\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  +- Annotation\r\n¦     ¦  ¦  +- None\r\n¦     ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n¦     ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n¦     ¦  ¦  ?- Type(AnonField(Top))\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ¦     ?- Annotation\r\n¦     ¦        +- None\r\n¦     ¦        +- Provenance(./SampleArrayObjects)\r\n¦     ¦        +- None\r\n¦     ¦        ?- Type(AnonElem(AnonField(Top)))\r\n¦     ?- LiteralExpr('orgRole')\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Value)\r\n¦           +- None\r\n¦           ?- Type(Const(Data.Str(\"orgRole\")))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance(Empty)\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Int)\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance(Empty)\r\n¦     ¦  +- ManyToOne(COUNT)\r\n¦     ¦  ?- Type(Int)\r\n¦     ?- Splice\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Empty)\r\n¦           +- None\r\n¦           ?- Type(Top)\r\n+- TableRelation(./SampleArrayObjects)\r\n¦  ?- Annotation\r\n¦     +- None\r\n¦     +- Provenance(./SampleArrayObjects)\r\n¦     +- None\r\n¦     ?- Type(Bottom)\r\n?- GroupBy\r\n   +- Annotation\r\n   ¦  +- None\r\n   ¦  +- Provenance((./SampleArrayObjects & Value))\r\n   ¦  +- None\r\n   ¦  ?- Type(IndexedElem(0,Top))\r\n   ?- Binop({})\r\n      +- Annotation\r\n      ¦  +- None\r\n      ¦  +- Provenance((./SampleArrayObjects & Value))\r\n      ¦  +- OneToOne(({}))\r\n      ¦  ?- Type(Top)\r\n      +- Unop(flatten_array)\r\n      ¦  +- Annotation\r\n      ¦  ¦  +- None\r\n      ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n      ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n      ¦  ¦  ?- Type(AnonField(Top))\r\n      ¦  ?- Ident(affiliations)\r\n      ¦     ?- Annotation\r\n      ¦        +- None\r\n      ¦        +- Provenance(./SampleArrayObjects)\r\n      ¦        +- None\r\n      ¦        ?- Type(AnonElem(AnonField(Top)))\r\n      ?- LiteralExpr('orgRole')\r\n         ?- Annotation\r\n            +- None\r\n            +- Provenance(Value)\r\n            +- None\r\n            ?- Type(Const(Data.Str(\"orgRole\"))), Logical Plan\r\nLet('tmp0)\r\n+- Read(./SampleArrayObjects)\r\n?- Let('tmp1)\r\n   +- ManyToMany(GROUP BY)\r\n   ¦  +- Free('tmp0)\r\n   ¦  ?- OneToOne(MAKE_ARRAY)\r\n   ¦     ?- OneToOne(({}))\r\n   ¦        +- OneToManyFlat(FLATTEN_ARRAY)\r\n   ¦        ¦  ?- OneToOne(({}))\r\n   ¦        ¦     +- Free('tmp0)\r\n   ¦        ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n   ¦        ?- Constant(Data.Str(\"orgRole\"))\r\n   ?- Let('tmp2)\r\n      +- OneToOne(OBJECT_CONCAT)\r\n      ¦  +- OneToOne(MAKE_OBJECT)\r\n      ¦  ¦  +- Constant(Data.Str(\"orgRole\"))\r\n      ¦  ¦  ?- OneToOne(({}))\r\n      ¦  ¦     +- OneToManyFlat(FLATTEN_ARRAY)\r\n      ¦  ¦     ¦  ?- OneToOne(({}))\r\n      ¦  ¦     ¦     +- Free('tmp1)\r\n      ¦  ¦     ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n      ¦  ¦     ?- Constant(Data.Str(\"orgRole\"))\r\n      ¦  ?- OneToOne(MAKE_OBJECT)\r\n      ¦     +- Constant(Data.Str(\"1\"))\r\n      ¦     ?- ManyToOne(COUNT)\r\n      ¦        ?- Free('tmp1)\r\n      ?- Let('tmp3)\r\n         +- Squashing(SQUASH)\r\n         ¦  ?- Free('tmp2)\r\n         ?- Let('tmp4)\r\n            +- ManyToMany(DISTINCT)\r\n            ¦  ?- Free('tmp3)\r\n            ?- Free('tmp4), Simplified\r\nLet('tmp0)\r\n+- Read(./SampleArrayObjects)\r\n?- Let('tmp1)\r\n   +- ManyToMany(GROUP BY)\r\n   ¦  +- Free('tmp0)\r\n   ¦  ?- OneToOne(MAKE_ARRAY)\r\n   ¦     ?- OneToOne(({}))\r\n   ¦        +- OneToManyFlat(FLATTEN_ARRAY)\r\n   ¦        ¦  ?- OneToOne(({}))\r\n   ¦        ¦     +- Free('tmp0)\r\n   ¦        ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n   ¦        ?- Constant(Data.Str(\"orgRole\"))\r\n   ?- ManyToMany(DISTINCT)\r\n      ?- Squashing(SQUASH)\r\n         ?- OneToOne(OBJECT_CONCAT)\r\n            +- OneToOne(MAKE_OBJECT)\r\n            ¦  +- Constant(Data.Str(\"orgRole\"))\r\n            ¦  ?- OneToOne(({}))\r\n            ¦     +- OneToManyFlat(FLATTEN_ARRAY)\r\n            ¦     ¦  ?- OneToOne(({}))\r\n            ¦     ¦     +- Free('tmp1)\r\n            ¦     ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n            ¦     ?- Constant(Data.Str(\"orgRole\"))\r\n            ?- OneToOne(MAKE_OBJECT)\r\n               +- Constant(Data.Str(\"1\"))\r\n               ?- ManyToOne(COUNT)\r\n                  ?- Free('tmp1), Physical Plan\r\nCan not perform `objectConcat`, because unrecognized shapes:\r\nDocBuilder\r\n+- FlatteningBuilder\r\n¦  +- GroupBuilder\r\n¦  ¦  +- CollectionBuilder\r\n¦  ¦  ¦  +- Chain\r\n¦  ¦  ¦  ¦  +- $Read(SampleArrayObjects)\r\n¦  ¦  ¦  ¦  +- $Project\r\n¦  ¦  ¦  ¦  ¦  +- Name(__tmp0 -> $$ROOT)\r\n¦  ¦  ¦  ¦  ¦  +- Name(__tmp1 -> $$ROOT)\r\n¦  ¦  ¦  ¦  ¦  ?- IgnoreId\r\n¦  ¦  ¦  ¦  ?- $Unwind(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\")))\r\n¦  ¦  ¦  +- ExprOp(DocVar.ROOT())\r\n¦  ¦  ¦  ?- SchemaChange(Init)\r\n¦  ¦  +- By(-\\/(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\") \\ BsonField.Name(\"orgRole\"))))\r\n¦  ¦  +- Content\r\n¦  ¦  ¦  ?- -\\/\r\n¦  ¦  ¦     ?- ExprOp(DocField(BsonField.Name(\"__tmp1\") \\ BsonField.Name(\"affiliations\")))\r\n¦  ¦  ?- Id(76df656b)\r\n¦  +- Type(Array)\r\n¦  ?- ExprOp(DocVar.ROOT())\r\n?- Shape\r\n   ?- ExprOp(orgRole -> DocField(BsonField.Name(\"orgRole\")))\r\nGroupBuilder\r\n+- CollectionBuilder\r\n¦  +- Chain\r\n¦  ¦  +- $Read(SampleArrayObjects)\r\n¦  ¦  +- $Project\r\n¦  ¦  ¦  +- Name(__tmp0 -> $$ROOT)\r\n¦  ¦  ¦  +- Name(__tmp1 -> $$ROOT)\r\n¦  ¦  ¦  ?- IgnoreId\r\n¦  ¦  ?- $Unwind(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\")))\r\n¦  +- ExprOp(DocVar.ROOT())\r\n¦  ?- SchemaChange(Init)\r\n+- By(-\\/(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\") \\ BsonField.Name(\"orgRole\"))))\r\n+- Content\r\n¦  ?- Map\r\n¦     ?- BsonField.Name(\"1\")\r\n¦        ?- \\/-\r\n¦           ?- GroupOp(Sum(Literal(Int32(1))))\r\n?- Id(76df656b)\r\nslamdata.engine.physical.mongodb.WorkflowBuilder$.objectConcat(workflowbuilder.scala:804)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$slamdata$engine$physical$mongodb$MongoDbPlanner$$invoke$3$3.apply(planner.scala:575)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$slamdata$engine$physical$mongodb$MongoDbPlanner$$invoke$3$3.apply(planner.scala:575)\r\n  ... (11)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$WorkflowPhase$1$$anonfun$apply$96$$anonfun$apply$97.apply(planner.scala:797)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$WorkflowPhase$1$$anonfun$apply$96$$anonfun$apply$97.apply(planner.scala:797)\r\n  ... (62)\r\nslamdata.engine.physical.mongodb.WorkflowBuilder$$anonfun$swapM$1.apply(workflowbuilder.scala:199)\r\nslamdata.engine.physical.mongodb.WorkflowBuilder$$anonfun$swapM$1.apply(workflowbuilder.scala:199)\r\n  ... (7)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$.plan(planner.scala:816)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$8.apply(planner.scala:58)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$8.apply(planner.scala:57)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7.apply(planner.scala:57)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7.apply(planner.scala:56)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6.apply(planner.scala:56)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6.apply(planner.scala:55)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4.apply(planner.scala:55)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4.apply(planner.scala:54)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2.apply(planner.scala:54)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2.apply(planner.scala:53)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1.apply(planner.scala:53)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1.apply(planner.scala:52)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1.apply(planner.scala:52)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1.apply(planner.scala:46)\r\nslamdata.engine.Backend$$anon$2.run(backend.scala:119)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9$$anonfun$apply$10.apply(admin.scala:186)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9$$anonfun$apply$10.apply(admin.scala:186)\r\n  ... (2)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9.apply(admin.scala:186)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9.apply(admin.scala:185)\r\n  ... (1)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1.apply(admin.scala:185)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1.apply(admin.scala:183)\r\n  ... (1)\r\nslamdata.engine.admin.AdminUI$$anon$8.planQuery(admin.scala:183)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$runAction$1.apply$mcV$sp(admin.scala:148)\r\n  ... (38))\r\n\r\nSQL AST\r\nSelect(distinct)\r\n+- Proj\r\n¦  ?- Binop({})\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ?- LiteralExpr('orgRole')\r\n+- Proj\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     ?- Splice\r\n+- TableRelation(/SampleArrayObjects)\r\n?- GroupBy\r\n   ?- Binop({})\r\n      +- Unop(flatten_array)\r\n      ¦  ?- Ident(affiliations)\r\n      ?- LiteralExpr('orgRole')\r\n\r\nSQL AST (paths interpreted)\r\nSelect(distinct)\r\n+- Proj\r\n¦  ?- Binop({})\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ?- LiteralExpr('orgRole')\r\n+- Proj\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     ?- Splice\r\n+- TableRelation(./SampleArrayObjects)\r\n?- GroupBy\r\n   ?- Binop({})\r\n      +- Unop(flatten_array)\r\n      ¦  ?- Ident(affiliations)\r\n      ?- LiteralExpr('orgRole')\r\n\r\nAnnotated Tree\r\nSelect(distinct)\r\n+- Annotation\r\n¦  +- None\r\n¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  +- None\r\n¦  ?- Type(Product(NamedField(orgRole,Top),NamedField(1,Int)))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Top)\r\n¦  ?- Binop({})\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦     ¦  +- OneToOne(({}))\r\n¦     ¦  ?- Type(Top)\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  +- Annotation\r\n¦     ¦  ¦  +- None\r\n¦     ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n¦     ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n¦     ¦  ¦  ?- Type(AnonField(Top))\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ¦     ?- Annotation\r\n¦     ¦        +- None\r\n¦     ¦        +- Provenance(./SampleArrayObjects)\r\n¦     ¦        +- None\r\n¦     ¦        ?- Type(AnonElem(AnonField(Top)))\r\n¦     ?- LiteralExpr('orgRole')\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Value)\r\n¦           +- None\r\n¦           ?- Type(Const(Data.Str(\"orgRole\")))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance(Empty)\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Int)\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance(Empty)\r\n¦     ¦  +- ManyToOne(COUNT)\r\n¦     ¦  ?- Type(Int)\r\n¦     ?- Splice\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Empty)\r\n¦           +- None\r\n¦           ?- Type(Top)\r\n+- TableRelation(./SampleArrayObjects)\r\n¦  ?- Annotation\r\n¦     +- None\r\n¦     +- Provenance(./SampleArrayObjects)\r\n¦     +- None\r\n¦     ?- Type(Bottom)\r\n?- GroupBy\r\n   +- Annotation\r\n   ¦  +- None\r\n   ¦  +- Provenance((./SampleArrayObjects & Value))\r\n   ¦  +- None\r\n   ¦  ?- Type(IndexedElem(0,Top))\r\n   ?- Binop({})\r\n      +- Annotation\r\n      ¦  +- None\r\n      ¦  +- Provenance((./SampleArrayObjects & Value))\r\n      ¦  +- OneToOne(({}))\r\n      ¦  ?- Type(Top)\r\n      +- Unop(flatten_array)\r\n      ¦  +- Annotation\r\n      ¦  ¦  +- None\r\n      ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n      ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n      ¦  ¦  ?- Type(AnonField(Top))\r\n      ¦  ?- Ident(affiliations)\r\n      ¦     ?- Annotation\r\n      ¦        +- None\r\n      ¦        +- Provenance(./SampleArrayObjects)\r\n      ¦        +- None\r\n      ¦        ?- Type(AnonElem(AnonField(Top)))\r\n      ?- LiteralExpr('orgRole')\r\n         ?- Annotation\r\n            +- None\r\n            +- Provenance(Value)\r\n            +- None\r\n            ?- Type(Const(Data.Str(\"orgRole\")))\r\n\r\nAnnotated Tree (variables substituted)\r\nSelect(distinct)\r\n+- Annotation\r\n¦  +- None\r\n¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  +- None\r\n¦  ?- Type(Product(NamedField(orgRole,Top),NamedField(1,Int)))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Top)\r\n¦  ?- Binop({})\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance((./SampleArrayObjects & Value))\r\n¦     ¦  +- OneToOne(({}))\r\n¦     ¦  ?- Type(Top)\r\n¦     +- Unop(flatten_array)\r\n¦     ¦  +- Annotation\r\n¦     ¦  ¦  +- None\r\n¦     ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n¦     ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n¦     ¦  ¦  ?- Type(AnonField(Top))\r\n¦     ¦  ?- Ident(affiliations)\r\n¦     ¦     ?- Annotation\r\n¦     ¦        +- None\r\n¦     ¦        +- Provenance(./SampleArrayObjects)\r\n¦     ¦        +- None\r\n¦     ¦        ?- Type(AnonElem(AnonField(Top)))\r\n¦     ?- LiteralExpr('orgRole')\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Value)\r\n¦           +- None\r\n¦           ?- Type(Const(Data.Str(\"orgRole\")))\r\n+- Proj\r\n¦  +- Annotation\r\n¦  ¦  +- None\r\n¦  ¦  +- Provenance(Empty)\r\n¦  ¦  +- None\r\n¦  ¦  ?- Type(Int)\r\n¦  ?- InvokeFunction(COUNT)\r\n¦     +- Annotation\r\n¦     ¦  +- None\r\n¦     ¦  +- Provenance(Empty)\r\n¦     ¦  +- ManyToOne(COUNT)\r\n¦     ¦  ?- Type(Int)\r\n¦     ?- Splice\r\n¦        ?- Annotation\r\n¦           +- None\r\n¦           +- Provenance(Empty)\r\n¦           +- None\r\n¦           ?- Type(Top)\r\n+- TableRelation(./SampleArrayObjects)\r\n¦  ?- Annotation\r\n¦     +- None\r\n¦     +- Provenance(./SampleArrayObjects)\r\n¦     +- None\r\n¦     ?- Type(Bottom)\r\n?- GroupBy\r\n   +- Annotation\r\n   ¦  +- None\r\n   ¦  +- Provenance((./SampleArrayObjects & Value))\r\n   ¦  +- None\r\n   ¦  ?- Type(IndexedElem(0,Top))\r\n   ?- Binop({})\r\n      +- Annotation\r\n      ¦  +- None\r\n      ¦  +- Provenance((./SampleArrayObjects & Value))\r\n      ¦  +- OneToOne(({}))\r\n      ¦  ?- Type(Top)\r\n      +- Unop(flatten_array)\r\n      ¦  +- Annotation\r\n      ¦  ¦  +- None\r\n      ¦  ¦  +- Provenance(./SampleArrayObjects)\r\n      ¦  ¦  +- OneToManyFlat(FLATTEN_ARRAY)\r\n      ¦  ¦  ?- Type(AnonField(Top))\r\n      ¦  ?- Ident(affiliations)\r\n      ¦     ?- Annotation\r\n      ¦        +- None\r\n      ¦        +- Provenance(./SampleArrayObjects)\r\n      ¦        +- None\r\n      ¦        ?- Type(AnonElem(AnonField(Top)))\r\n      ?- LiteralExpr('orgRole')\r\n         ?- Annotation\r\n            +- None\r\n            +- Provenance(Value)\r\n            +- None\r\n            ?- Type(Const(Data.Str(\"orgRole\")))\r\n\r\nLogical Plan\r\nLet('tmp0)\r\n+- Read(./SampleArrayObjects)\r\n?- Let('tmp1)\r\n   +- ManyToMany(GROUP BY)\r\n   ¦  +- Free('tmp0)\r\n   ¦  ?- OneToOne(MAKE_ARRAY)\r\n   ¦     ?- OneToOne(({}))\r\n   ¦        +- OneToManyFlat(FLATTEN_ARRAY)\r\n   ¦        ¦  ?- OneToOne(({}))\r\n   ¦        ¦     +- Free('tmp0)\r\n   ¦        ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n   ¦        ?- Constant(Data.Str(\"orgRole\"))\r\n   ?- Let('tmp2)\r\n      +- OneToOne(OBJECT_CONCAT)\r\n      ¦  +- OneToOne(MAKE_OBJECT)\r\n      ¦  ¦  +- Constant(Data.Str(\"orgRole\"))\r\n      ¦  ¦  ?- OneToOne(({}))\r\n      ¦  ¦     +- OneToManyFlat(FLATTEN_ARRAY)\r\n      ¦  ¦     ¦  ?- OneToOne(({}))\r\n      ¦  ¦     ¦     +- Free('tmp1)\r\n      ¦  ¦     ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n      ¦  ¦     ?- Constant(Data.Str(\"orgRole\"))\r\n      ¦  ?- OneToOne(MAKE_OBJECT)\r\n      ¦     +- Constant(Data.Str(\"1\"))\r\n      ¦     ?- ManyToOne(COUNT)\r\n      ¦        ?- Free('tmp1)\r\n      ?- Let('tmp3)\r\n         +- Squashing(SQUASH)\r\n         ¦  ?- Free('tmp2)\r\n         ?- Let('tmp4)\r\n            +- ManyToMany(DISTINCT)\r\n            ¦  ?- Free('tmp3)\r\n            ?- Free('tmp4)\r\n\r\nSimplified\r\nLet('tmp0)\r\n+- Read(./SampleArrayObjects)\r\n?- Let('tmp1)\r\n   +- ManyToMany(GROUP BY)\r\n   ¦  +- Free('tmp0)\r\n   ¦  ?- OneToOne(MAKE_ARRAY)\r\n   ¦     ?- OneToOne(({}))\r\n   ¦        +- OneToManyFlat(FLATTEN_ARRAY)\r\n   ¦        ¦  ?- OneToOne(({}))\r\n   ¦        ¦     +- Free('tmp0)\r\n   ¦        ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n   ¦        ?- Constant(Data.Str(\"orgRole\"))\r\n   ?- ManyToMany(DISTINCT)\r\n      ?- Squashing(SQUASH)\r\n         ?- OneToOne(OBJECT_CONCAT)\r\n            +- OneToOne(MAKE_OBJECT)\r\n            ¦  +- Constant(Data.Str(\"orgRole\"))\r\n            ¦  ?- OneToOne(({}))\r\n            ¦     +- OneToManyFlat(FLATTEN_ARRAY)\r\n            ¦     ¦  ?- OneToOne(({}))\r\n            ¦     ¦     +- Free('tmp1)\r\n            ¦     ¦     ?- Constant(Data.Str(\"affiliations\"))\r\n            ¦     ?- Constant(Data.Str(\"orgRole\"))\r\n            ?- OneToOne(MAKE_OBJECT)\r\n               +- Constant(Data.Str(\"1\"))\r\n               ?- ManyToOne(COUNT)\r\n                  ?- Free('tmp1)\r\n\r\nPhysical Plan\r\nCan not perform `objectConcat`, because unrecognized shapes:\r\nDocBuilder\r\n+- FlatteningBuilder\r\n¦  +- GroupBuilder\r\n¦  ¦  +- CollectionBuilder\r\n¦  ¦  ¦  +- Chain\r\n¦  ¦  ¦  ¦  +- $Read(SampleArrayObjects)\r\n¦  ¦  ¦  ¦  +- $Project\r\n¦  ¦  ¦  ¦  ¦  +- Name(__tmp0 -> $$ROOT)\r\n¦  ¦  ¦  ¦  ¦  +- Name(__tmp1 -> $$ROOT)\r\n¦  ¦  ¦  ¦  ¦  ?- IgnoreId\r\n¦  ¦  ¦  ¦  ?- $Unwind(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\")))\r\n¦  ¦  ¦  +- ExprOp(DocVar.ROOT())\r\n¦  ¦  ¦  ?- SchemaChange(Init)\r\n¦  ¦  +- By(-\\/(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\") \\ BsonField.Name(\"orgRole\"))))\r\n¦  ¦  +- Content\r\n¦  ¦  ¦  ?- -\\/\r\n¦  ¦  ¦     ?- ExprOp(DocField(BsonField.Name(\"__tmp1\") \\ BsonField.Name(\"affiliations\")))\r\n¦  ¦  ?- Id(76df656b)\r\n¦  +- Type(Array)\r\n¦  ?- ExprOp(DocVar.ROOT())\r\n?- Shape\r\n   ?- ExprOp(orgRole -> DocField(BsonField.Name(\"orgRole\")))\r\nGroupBuilder\r\n+- CollectionBuilder\r\n¦  +- Chain\r\n¦  ¦  +- $Read(SampleArrayObjects)\r\n¦  ¦  +- $Project\r\n¦  ¦  ¦  +- Name(__tmp0 -> $$ROOT)\r\n¦  ¦  ¦  +- Name(__tmp1 -> $$ROOT)\r\n¦  ¦  ¦  ?- IgnoreId\r\n¦  ¦  ?- $Unwind(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\")))\r\n¦  +- ExprOp(DocVar.ROOT())\r\n¦  ?- SchemaChange(Init)\r\n+- By(-\\/(DocField(BsonField.Name(\"__tmp0\") \\ BsonField.Name(\"affiliations\") \\ BsonField.Name(\"orgRole\"))))\r\n+- Content\r\n¦  ?- Map\r\n¦     ?- BsonField.Name(\"1\")\r\n¦        ?- \\/-\r\n¦           ?- GroupOp(Sum(Literal(Int32(1))))\r\n?- Id(76df656b)\r\nslamdata.engine.physical.mongodb.WorkflowBuilder$.objectConcat(workflowbuilder.scala:804)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$slamdata$engine$physical$mongodb$MongoDbPlanner$$invoke$3$3.apply(planner.scala:575)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$slamdata$engine$physical$mongodb$MongoDbPlanner$$invoke$3$3.apply(planner.scala:575)\r\n  ... (11)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$WorkflowPhase$1$$anonfun$apply$96$$anonfun$apply$97.apply(planner.scala:797)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$$anonfun$WorkflowPhase$1$$anonfun$apply$96$$anonfun$apply$97.apply(planner.scala:797)\r\n  ... (62)\r\nslamdata.engine.physical.mongodb.WorkflowBuilder$$anonfun$swapM$1.apply(workflowbuilder.scala:199)\r\nslamdata.engine.physical.mongodb.WorkflowBuilder$$anonfun$swapM$1.apply(workflowbuilder.scala:199)\r\n  ... (7)\r\nslamdata.engine.physical.mongodb.MongoDbPlanner$.plan(planner.scala:816)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$8.apply(planner.scala:58)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$8.apply(planner.scala:57)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7.apply(planner.scala:57)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6$$anonfun$apply$7.apply(planner.scala:56)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6.apply(planner.scala:56)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4$$anonfun$apply$6.apply(planner.scala:55)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4.apply(planner.scala:55)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$4.apply(planner.scala:54)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2.apply(planner.scala:54)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1$$anonfun$apply$2.apply(planner.scala:53)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1.apply(planner.scala:53)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1$$anonfun$apply$1.apply(planner.scala:52)\r\n  ... (12)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1.apply(planner.scala:52)\r\nslamdata.engine.Planner$$anonfun$queryPlanner$1.apply(planner.scala:46)\r\nslamdata.engine.Backend$$anon$2.run(backend.scala:119)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9$$anonfun$apply$10.apply(admin.scala:186)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9$$anonfun$apply$10.apply(admin.scala:186)\r\n  ... (2)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9.apply(admin.scala:186)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1$$anonfun$apply$9.apply(admin.scala:185)\r\n  ... (1)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1.apply(admin.scala:185)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$planQuery$1.apply(admin.scala:183)\r\n  ... (1)\r\nslamdata.engine.admin.AdminUI$$anon$8.planQuery(admin.scala:183)\r\nslamdata.engine.admin.AdminUI$$anon$8$$anonfun$runAction$1.apply$mcV$sp(admin.scala:148)\r\n  ... (38)\r\n```"}}