func (d DataType) LessThan(other DataType) bool {
	if d == Unknown {
		return true
	} else if d == Unsigned {
		return other != Unknown && other <= Integer
	} else if other == Unsigned {
		return d >= String
	}
	return other != Unknown && other < d
}
LessThan returns true if the other DataType has greater precedence than the
current data type. Unknown has the lowest precedence.

NOTE: This is not the same as using the `<` or `>` operator because the
integers used decrease with higher precedence, but Unknown is the lowest
precedence at the zero value.
package influxql
import (
	"bytes"
	"errors"
	"fmt"
	"math"
	"regexp"
	"regexp/syntax"
	"sort"
	"strconv"
	"strings"
	"time"
	"github.com/gogo/protobuf/proto"
	internal "github.com/influxdata/influxql/internal"
)
type DataType int
const (
	Unknown DataType = 0
	Float DataType = 1
	Integer DataType = 2
	String DataType = 3
	Boolean DataType = 4
	Time DataType = 5
	Duration DataType = 6
	Tag DataType = 7
	AnyField DataType = 8
	Unsigned DataType = 9
)
const (
	MinTime = int64(math.MinInt64) + 2
	MaxTime = int64(math.MaxInt64) - 1
)
var (
	ErrInvalidTime = errors.New("invalid timestamp string")
)
func InspectDataType(v interface{}) DataType {
	switch v.(type) {
	case float64:
		return Float
	case int64, int32, int:
		return Integer
	case string:
		return String
	case bool:
		return Boolean
	case uint64:
		return Unsigned
	case time.Time:
		return Time
	case time.Duration:
		return Duration
	default:
		return Unknown
	}
}
func DataTypeFromString(s string) DataType {
	switch s {
	case "float":
		return Float
	case "integer":
		return Integer
	case "unsigned":
		return Unsigned
	case "string":
		return String
	case "boolean":
		return Boolean
	case "time":
		return Time
	case "duration":
		return Duration
	case "tag":
		return Tag
	case "field":
		return AnyField
	default:
		return Unknown
	}
}