{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/1978","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/1978/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/1978/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/1978/events","html_url":"https://github.com/influxdb/influxdb/pull/1978","id":62238777,"number":1978,"title":"fix #1832: support regex in FROM clause","user":{"login":"dgnorton","id":209347,"avatar_url":"https://avatars.githubusercontent.com/u/209347?v=3","gravatar_id":"","url":"https://api.github.com/users/dgnorton","html_url":"https://github.com/dgnorton","followers_url":"https://api.github.com/users/dgnorton/followers","following_url":"https://api.github.com/users/dgnorton/following{/other_user}","gists_url":"https://api.github.com/users/dgnorton/gists{/gist_id}","starred_url":"https://api.github.com/users/dgnorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgnorton/subscriptions","organizations_url":"https://api.github.com/users/dgnorton/orgs","repos_url":"https://api.github.com/users/dgnorton/repos","events_url":"https://api.github.com/users/dgnorton/events{/privacy}","received_events_url":"https://api.github.com/users/dgnorton/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-16T23:43:09Z","updated_at":"2015-03-18T18:59:47Z","closed_at":"2015-03-18T18:20:30Z","pull_request":{"url":"https://api.github.com/repos/influxdb/influxdb/pulls/1978","html_url":"https://github.com/influxdb/influxdb/pull/1978","diff_url":"https://github.com/influxdb/influxdb/pull/1978.diff","patch_url":"https://github.com/influxdb/influxdb/pull/1978.patch"},"body":"Changes:\r\n\r\n- Change scanner / parser to accept regex in the `FROM` clause.  This part of the change is a little messy because the scanner can't recognize regex tokens on its own.  The parser has to ask the scanner to peek ahead to see if there is a regex and, if there is, tell the scanner to scan it.\r\n\r\n- Change the AST and parser to accept multiple sources in the FROM clause.\r\n\r\n- Remove old join / merge code from the AST & parser.\r\n\r\n- Change the server to expand regexes in the FROM clause to individual measurements that match.\r\n\r\n- Change the server so it doesn't produce duplicate field names when expanding wildcards now that the FROM clause accepts multiple sources from which to draw field names from.\r\n\r\n- Change the engine so that it creates map-reduce jobs for multiple sources instead of just one.\r\n\r\n- Fix bug with trailing semicolon on single statements."},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/83122493","html_url":"https://github.com/influxdb/influxdb/pull/1978#issuecomment-83122493","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/1978","id":83122493,"user":{"login":"dgnorton","id":209347,"avatar_url":"https://avatars.githubusercontent.com/u/209347?v=3","gravatar_id":"","url":"https://api.github.com/users/dgnorton","html_url":"https://github.com/dgnorton","followers_url":"https://api.github.com/users/dgnorton/followers","following_url":"https://api.github.com/users/dgnorton/following{/other_user}","gists_url":"https://api.github.com/users/dgnorton/gists{/gist_id}","starred_url":"https://api.github.com/users/dgnorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgnorton/subscriptions","organizations_url":"https://api.github.com/users/dgnorton/orgs","repos_url":"https://api.github.com/users/dgnorton/repos","events_url":"https://api.github.com/users/dgnorton/events{/privacy}","received_events_url":"https://api.github.com/users/dgnorton/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T18:59:47Z","updated_at":"2015-03-18T18:59:47Z","body":"@benbjohnson I changed the implementation several times and never really liked it...finally just picked something and ran with it.  At first, I had something like you're suggesting (I think).  `Measurement` and `RegexLiteral` were separate `Source` types but a `Source` can have a `db` and `rp`.  It didn't make sense to add those to `RegexLiteral`.  I thought about creating another source type similar to `Measurement` called `MeasurementRegex` that contained the `db.rp.` string and a `RegexLiteral` but then I thought that was unnecessarily complicated.  So, I just added a `RegexLiteral` member to `Measurement`.  Is any of that inline with what you were thinking?"}}