{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/presto/issues/2632","labels_url":"https://api.github.com/repos/facebook/presto/issues/2632/labels{/name}","comments_url":"https://api.github.com/repos/facebook/presto/issues/2632/comments","events_url":"https://api.github.com/repos/facebook/presto/issues/2632/events","html_url":"https://github.com/facebook/presto/issues/2632","id":66030872,"number":2632,"title":"unnest with join stopped working","user":{"login":"linehrr","id":1124115,"avatar_url":"https://avatars.githubusercontent.com/u/1124115?v=3","gravatar_id":"","url":"https://api.github.com/users/linehrr","html_url":"https://github.com/linehrr","followers_url":"https://api.github.com/users/linehrr/followers","following_url":"https://api.github.com/users/linehrr/following{/other_user}","gists_url":"https://api.github.com/users/linehrr/gists{/gist_id}","starred_url":"https://api.github.com/users/linehrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linehrr/subscriptions","organizations_url":"https://api.github.com/users/linehrr/orgs","repos_url":"https://api.github.com/users/linehrr/repos","events_url":"https://api.github.com/users/linehrr/events{/privacy}","received_events_url":"https://api.github.com/users/linehrr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-02T23:20:15Z","updated_at":"2015-04-02T23:20:15Z","closed_at":null,"body":"unnest with join after used to work in Presto 0.86 and previous versions.\r\nnow we tried 0.97/0.98/0.99/0.100 and they all give syntax error.\r\n```\"Error evaluating constant expression: Constant expression cannot contain column references\"```\r\n\r\nin the release note, it does not mention about any backward incompatibility of unnest.\r\nother queries that does not have unnest all works fine.\r\nso we doubt that unnest might have been broken in the recent release.\r\n\r\nexample: (this following query works on 0.86 but not in the recent release)\r\n```\r\nschema:\r\npa:\r\nhistory    array<string>\r\n\r\nbrand:\r\ncampaignID    string\r\n\r\n---------------------------------------------------\r\npresto:default> explain select\r\n             ->                 split_part(bh.chunk, '-', 7) as campaignID,\r\n             ->                 count(*)\r\n             ->         from pa\r\n             ->                 cross join unnest(history) AS bh (chunk)\r\n             ->                 left outer join brand on (split_part(bh.chunk, '-', 7) = brand.campaignID)\r\n             ->         where dt='2015-01-01'\r\n             ->                 and split_part(bh.chunk, '-', 7) != '0'\r\n             ->                 and brand.campaignID is null\r\n             ->         group by split_part(bh.chunk, '-', 7);\r\nQuery 20150402_230734_00012_whxan failed: Error evaluating constant expression: Constant expression cannot contain column references\r\n```"}}