From ad02244863ed417e5579ad4bd2687de181974152 Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Thu, 11 Jun 2015 08:30:01 -0600 Subject: [PATCH] Fix field type conflict error Fixes #2908 --- CHANGELOG.md | 6 ++++++ influxql/ast.go | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28bf0b13b9..5d98b2e458 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.9.1 [unreleased] + +### Bugfixes + +- [#2908](https://github.com/influxdb/influxdb/issues/2908): Field mismatch error messages need to be updated + ## v0.9.0 [2015-06-11] ### Bugfixes diff --git a/influxql/ast.go b/influxql/ast.go index e5c951b977..626a26b483 100644 --- a/influxql/ast.go +++ b/influxql/ast.go @@ -51,6 +51,24 @@ func InspectDataType(v interface{}) DataType { } } +func (d DataType) String() string { + switch d { + case Float: + return "float" + case Integer: + return "integer" + case Boolean: + return "boolean" + case String: + return "string" + case Time: + return "time" + case Duration: + return "duration" + } + return "unknown" +} + // Node represents a node in the InfluxDB abstract syntax tree. type Node interface { node()