{"action":"opened","issue":{"url":"https://api.github.com/repos/druid-io/druid/issues/1977","labels_url":"https://api.github.com/repos/druid-io/druid/issues/1977/labels{/name}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/1977/comments","events_url":"https://api.github.com/repos/druid-io/druid/issues/1977/events","html_url":"https://github.com/druid-io/druid/issues/1977","id":117385496,"number":1977,"title":"select query returns numbers as strings","user":{"login":"KenjiTakahashi","id":431488,"avatar_url":"https://avatars.githubusercontent.com/u/431488?v=3","gravatar_id":"","url":"https://api.github.com/users/KenjiTakahashi","html_url":"https://github.com/KenjiTakahashi","followers_url":"https://api.github.com/users/KenjiTakahashi/followers","following_url":"https://api.github.com/users/KenjiTakahashi/following{/other_user}","gists_url":"https://api.github.com/users/KenjiTakahashi/gists{/gist_id}","starred_url":"https://api.github.com/users/KenjiTakahashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KenjiTakahashi/subscriptions","organizations_url":"https://api.github.com/users/KenjiTakahashi/orgs","repos_url":"https://api.github.com/users/KenjiTakahashi/repos","events_url":"https://api.github.com/users/KenjiTakahashi/events{/privacy}","received_events_url":"https://api.github.com/users/KenjiTakahashi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-17T15:56:02Z","updated_at":"2015-11-17T15:56:02Z","closed_at":null,"body":"I am ingesting some data using `overlord` with local firehose.\r\n\r\nIndexer task:\r\n```json\r\n{ \r\n  \"type\": \"index\",\r\n  \"spec\": {\r\n    \"dataSchema\": {\r\n      \"dataSource\": \"logdb_data\",\r\n      \"parser\": {\r\n        \"type\": \"string\",\r\n        \"parseSpec\": {\r\n          \"format\": \"json\",\r\n          \"timestampSpec\": {\r\n            \"column\": \"timestamp\",\r\n            \"format\": \"iso\"\r\n          },\r\n          \"dimensionsSpec\": {\r\n            \"dimensions\": [\"config_id\", \"data\", \"date\", \"stream_name\"],\r\n            \"dimensionExclusions\": [], \r\n            \"spatialDimensions\": []\r\n          }\r\n        }\r\n      },\r\n      \"metricsSpec\": [\r\n        {\r\n          \"type\": \"count\",\r\n          \"name\": \"count\"\r\n        }\r\n      ],\r\n      \"granularitySpec\": {\r\n        \"type\": \"uniform\",\r\n        \"segmentGranularity\": \"DAY\",\r\n        \"queryGranularity\": \"NONE\",\r\n        \"intervals\": [\"2015-01-01/3000-01-01\"]\r\n      }\r\n    },\r\n    \"ioConfig\": {\r\n      \"type\": \"index\",\r\n        \"firehose\": {\r\n          \"type\": \"local\",\r\n          \"baseDir\": \"druid_data\",\r\n          \"filter\": \"*.json\"\r\n        }\r\n    },\r\n    \"tuningConfig\": {\r\n      \"type\": \"index\",\r\n      \"targetPartitionSize\": 0,\r\n      \"rowFlushBoundary\": 0\r\n    }\r\n  }   \r\n}\r\n```\r\n\r\nData files look like this:\r\n\r\n```json\r\n{\"date\":\"2015-10-01T08:00:00.250000\",\"stream_name\":\"default\",\"config_id\":\"f1522d7e2ba620aa12bd3df4b7818e980fc22e9a\",\"data\":3.29,\"timestamp\":\"2015-10-01T08:00:00.250Z\"}\r\n{\"date\":\"2015-10-01T08:00:00.542000\",\"stream_name\":\"write_time\",\"config_id\":\"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\"data\":362195292.0,\"timestamp\":\"2015-10-01T08:00:00.542Z\"}\r\n{\"date\":\"2015-10-01T08:00:00.542000\",\"stream_name\":\"read_bytes\",\"config_id\":\"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\"data\":230724608.0,\"timestamp\":\"2015-10-01T08:00:00.542Z\"}\r\n{\"date\":\"2015-10-01T08:00:00.542000\",\"stream_name\":\"read_count\",\"config_id\":\"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\"data\":21975.0,\"timestamp\":\"2015-10-01T08:00:00.542Z\"}\r\n{\"date\":\"2015-10-01T08:00:00.542000\",\"stream_name\":\"read_time\",\"config_id\":\"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\"data\":149012.0,\"timestamp\":\"2015-10-01T08:00:00.542Z\"}\r\n```\r\n\r\nIt goes in fine, no problem. Now, when I do select on them, e.g.\r\n\r\n```json\r\n{\r\n    \"queryType\": \"select\",\r\n    \"dataSource\": \"logdb_data\",\r\n    \"dimensions\": [\"config_id\", \"stream_name\", \"data\", \"date\"],\r\n    \"metrics\": [],\r\n    \"granularity\": \"all\",\r\n    \"intervals\": [\"2015-10-01T08:00/2015-10-01T09:00\"],\r\n    \"pagingSpec\": {\"pagingIdentifiers\": {}, \"threshold\": 5}\r\n}\r\n```\r\n\r\nit returns:\r\n```json\r\n[ {\r\n  \"timestamp\" : \"2015-10-01T08:00:00.000Z\",\r\n  \"result\" : {\r\n    \"pagingIdentifiers\" : {\r\n      \"logdb_data_2015-10-01T00:00:00.000Z_2015-10-02T00:00:00.000Z_2015-11-17T14:07:34.927Z\" : 4\r\n    },\r\n    \"events\" : [ {\r\n      \"segmentId\" : \"logdb_data_2015-10-01T00:00:00.000Z_2015-10-02T00:00:00.000Z_2015-11-17T14:07:34.927Z\",\r\n      \"offset\" : 0,\r\n      \"event\" : {\r\n        \"timestamp\" : \"2015-10-01T08:00:00.250Z\",\r\n        \"date\" : \"2015-10-01T08:00:00.250000\",\r\n        \"stream_name\" : \"default\",\r\n        \"data\" : \"3.29\",\r\n        \"config_id\" : \"f1522d7e2ba620aa12bd3df4b7818e980fc22e9a\",\r\n        \"count\" : 1\r\n      }\r\n    }, {\r\n      \"segmentId\" : \"logdb_data_2015-10-01T00:00:00.000Z_2015-10-02T00:00:00.000Z_2015-11-17T14:07:34.927Z\",\r\n      \"offset\" : 1,\r\n      \"event\" : {\r\n        \"timestamp\" : \"2015-10-01T08:00:00.542Z\",\r\n        \"date\" : \"2015-10-01T08:00:00.542000\",\r\n        \"stream_name\" : \"read_time\",\r\n        \"data\" : \"149012.0\",\r\n        \"config_id\" : \"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\r\n        \"count\" : 1\r\n      }\r\n    }, {\r\n      \"segmentId\" : \"logdb_data_2015-10-01T00:00:00.000Z_2015-10-02T00:00:00.000Z_2015-11-17T14:07:34.927Z\",\r\n      \"offset\" : 2,\r\n      \"event\" : {\r\n        \"timestamp\" : \"2015-10-01T08:00:00.542Z\",\r\n        \"date\" : \"2015-10-01T08:00:00.542000\",\r\n        \"stream_name\" : \"read_bytes\",\r\n        \"data\" : \"2.30724608E8\",\r\n        \"config_id\" : \"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\r\n        \"count\" : 1\r\n      }\r\n    }, {\r\n      \"segmentId\" : \"logdb_data_2015-10-01T00:00:00.000Z_2015-10-02T00:00:00.000Z_2015-11-17T14:07:34.927Z\",\r\n      \"offset\" : 3,\r\n      \"event\" : {\r\n        \"timestamp\" : \"2015-10-01T08:00:00.542Z\",\r\n        \"date\" : \"2015-10-01T08:00:00.542000\",\r\n        \"stream_name\" : \"read_count\",\r\n        \"data\" : \"21975.0\",\r\n        \"config_id\" : \"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\r\n        \"count\" : 1\r\n      }\r\n    }, {\r\n      \"segmentId\" : \"logdb_data_2015-10-01T00:00:00.000Z_2015-10-02T00:00:00.000Z_2015-11-17T14:07:34.927Z\",\r\n      \"offset\" : 4,\r\n      \"event\" : {\r\n        \"timestamp\" : \"2015-10-01T08:00:00.542Z\",\r\n        \"date\" : \"2015-10-01T08:00:00.542000\",\r\n        \"stream_name\" : \"write_time\",\r\n        \"data\" : \"3.62195292E8\",\r\n        \"config_id\" : \"ff5141f8abcd042d9d98d7ba1aee0685cb75c933\",\r\n        \"count\" : 1\r\n      }\r\n    } ]\r\n  }\r\n} ]\r\n```\r\n\r\nSee that the \"data\" dimension value is string (apparently even as stringified scientific notation for some?), although it was ingested as float. Why is that?"}}