{"action":"closed","issue":{"url":"https://api.github.com/repos/slamdata/slamengine/issues/715","labels_url":"https://api.github.com/repos/slamdata/slamengine/issues/715/labels{/name}","comments_url":"https://api.github.com/repos/slamdata/slamengine/issues/715/comments","events_url":"https://api.github.com/repos/slamdata/slamengine/issues/715/events","html_url":"https://github.com/slamdata/slamengine/issues/715","id":76196921,"number":715,"title":"array flattening should be protected from non-arrays","user":{"login":"cryogenian","id":10245930,"avatar_url":"https://avatars.githubusercontent.com/u/10245930?v=3","gravatar_id":"","url":"https://api.github.com/users/cryogenian","html_url":"https://github.com/cryogenian","followers_url":"https://api.github.com/users/cryogenian/followers","following_url":"https://api.github.com/users/cryogenian/following{/other_user}","gists_url":"https://api.github.com/users/cryogenian/gists{/gist_id}","starred_url":"https://api.github.com/users/cryogenian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cryogenian/subscriptions","organizations_url":"https://api.github.com/users/cryogenian/orgs","repos_url":"https://api.github.com/users/cryogenian/repos","events_url":"https://api.github.com/users/cryogenian/events{/privacy}","received_events_url":"https://api.github.com/users/cryogenian/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/question","name":"question","color":"cc317c"}],"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/7","html_url":"https://github.com/slamdata/slamengine/milestones/2.0","labels_url":"https://api.github.com/repos/slamdata/slamengine/milestones/7/labels","id":839376,"number":7,"title":"2.0","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":5,"closed_issues":9,"state":"open","created_at":"2014-10-24T18:33:28Z","updated_at":"2015-05-30T22:02:43Z","due_on":"2015-05-31T06:00:00Z","closed_at":null},"comments":13,"created_at":"2015-05-14T02:08:37Z","updated_at":"2015-05-30T22:02:43Z","closed_at":"2015-05-30T22:02:43Z","body":"I've tried to run this query \r\n```sql\r\nselect * from {{path}} where \r\n(foo LIKE '%foo%' OR foo = 'foo' OR foo[*] LIKE '%foo%' OR \r\nfoo[*] = 'foo' OR foo[*][*] LIKE '%foo%' OR\r\n foo[*][*] = 'foo' OR foo[*][*].baz LIKE '%foo%' \r\nOR foo[*][*].baz = 'foo' OR foo[*][*].baz[*] LIKE '%foo%' OR\r\n foo[*][*].baz[*] = 'foo' OR a LIKE '%foo%' OR a = 'foo')\r\n```\r\nand got error \r\n```\r\nAn error occurred during evaluation: com.mongodb.MongoCommandException: \r\nCommand failed with error 15978: 'exception: \r\nValue at end of $unwind field path '$__tmp203.__tmp200.__tmp198' must be an Array, but is a String' on \r\nserver localhost:27017. The full response is { \"errmsg\" : \"exception: Value at end of $unwind field path \r\n'$__tmp203.__tmp200.__tmp198' must be an Array, but is a String\", \"code\" : 15978, \"ok\" : 0.0 }\r\n```\r\ncollection \r\n```javascript\r\n{ \"_id\" : ObjectId(\"55520669d86735b7268fd000\"), \"a\" : 11 }\r\n{ \"_id\" : ObjectId(\"55527448d86735b7268fd001\"), \"a\" : 12 }\r\n{ \"_id\" : ObjectId(\"5552744bd86735b7268fd002\"), \"a\" : 13 }\r\n{ \"_id\" : ObjectId(\"55538123d86735b7268fd003\"), \"foo\" : [ \"bar\", [ { \"baz\" : [ \"quux\" ] } ] ] }\r\n```\r\n\r\nWhat am I doing wrong? \r\n\r\nOther query\r\n```sql\r\nselect * from {{path}} where (foo LIKE '%12%' OR foo = '12' OR foo = 12 OR foo = DATE '12')\r\n```\r\n```javascript\r\n {\r\n   \"name\": \"Annotated Tree\",\r\n   \"error\": \"[Date/time string could not be parsed as date: 12]\"\r\n }\r\n```\r\n\r\nWhat are correct date formats for `DATE` function? What should I do to make `12` timestamp?  "}}