{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/4112","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/4112/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/4112/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/4112/events","html_url":"https://github.com/influxdb/influxdb/pull/4112","id":106653370,"number":4112,"title":"Period in field name that matches measurement fails.  Fixes #3457","user":{"login":"corylanou","id":585100,"avatar_url":"https://avatars.githubusercontent.com/u/585100?v=3","gravatar_id":"","url":"https://api.github.com/users/corylanou","html_url":"https://github.com/corylanou","followers_url":"https://api.github.com/users/corylanou/followers","following_url":"https://api.github.com/users/corylanou/following{/other_user}","gists_url":"https://api.github.com/users/corylanou/gists{/gist_id}","starred_url":"https://api.github.com/users/corylanou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corylanou/subscriptions","organizations_url":"https://api.github.com/users/corylanou/orgs","repos_url":"https://api.github.com/users/corylanou/repos","events_url":"https://api.github.com/users/corylanou/events{/privacy}","received_events_url":"https://api.github.com/users/corylanou/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdb/influxdb/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-15T21:37:02Z","updated_at":"2015-09-16T14:53:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdb/influxdb/pulls/4112","html_url":"https://github.com/influxdb/influxdb/pull/4112","diff_url":"https://github.com/influxdb/influxdb/pull/4112.diff","patch_url":"https://github.com/influxdb/influxdb/pull/4112.patch"},"body":"fixes #3457\r\n\r\nWe had some code that used to check to see if we asked for a `measurement.fieldname` in a select statement.  Even though we were apparently `normalizing` this, we don't actually look this back up on the query engine, so effectively it did nothing.\r\n\r\nThe scenario it should of accounted for was given:\r\n\r\n```\r\ninsert cpu value=1\r\ninsert memory value=2\r\n```\r\n\r\nThat the following query would work:\r\n\r\n```\r\nselect cpu.value, memory.value from cpu, memory\r\n```\r\n\r\nHowever, the current affect if we had this:\r\n\r\n```\r\ninsert cpu cpu.percent=80\r\n```\r\n\r\nand then issued this query:\r\n\r\n```\r\nselect \"cpu.percent\" from cpu\r\n```\r\n\r\nIt would fail, is it interpreted the prefix of `cpu.` as the measurement name.\r\n\r\nWe will need support for this in the future, but currently the query engine nor the query language support it.\r\n\r\nI would suggest that to add it in the future, we parse anything inside quotes as a `VarRef`, so that:\r\n\r\n`select \"foo.bin.bar\" from foo`\r\n\r\nWill always see the field name `foo.bin.bar`.  But if we want it prefixed, then\r\n\r\n`select foo.\"bin.bar\" from foo`\r\n\r\nwould parse as the measurement `foo` and the field `bin.bar`.\r\n\r\n@pauldix @dgnorton thoughts?"},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/140766066","html_url":"https://github.com/influxdb/influxdb/pull/4112#issuecomment-140766066","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/4112","id":140766066,"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-09-16T14:53:43Z","updated_at":"2015-09-16T14:53:43Z","body":"+1"}}