Merge pull request #8922 from influxdata/js-uint-influx-inspect
Update influx inspect to support unsigned typespull/8924/head
commit
cdea0d21d3
|
@ -282,10 +282,10 @@ Usage: influx_inspect dumptsm [flags] <path
|
||||||
|
|
||||||
var (
|
var (
|
||||||
fieldType = []string{
|
fieldType = []string{
|
||||||
"timestamp", "float", "int", "bool", "string",
|
"timestamp", "float", "int", "bool", "string", "unsigned",
|
||||||
}
|
}
|
||||||
blockTypes = []string{
|
blockTypes = []string{
|
||||||
"float64", "int64", "bool", "string",
|
"float64", "int64", "bool", "string", "unsigned",
|
||||||
}
|
}
|
||||||
timeEnc = []string{
|
timeEnc = []string{
|
||||||
"none", "s8b", "rle",
|
"none", "s8b", "rle",
|
||||||
|
@ -302,8 +302,11 @@ var (
|
||||||
stringEnc = []string{
|
stringEnc = []string{
|
||||||
"none", "snpy",
|
"none", "snpy",
|
||||||
}
|
}
|
||||||
|
unsignedEnc = []string{
|
||||||
|
"none", "s8b", "rle",
|
||||||
|
}
|
||||||
encDescs = [][]string{
|
encDescs = [][]string{
|
||||||
timeEnc, floatEnc, intEnc, boolEnc, stringEnc,
|
timeEnc, floatEnc, intEnc, boolEnc, stringEnc, unsignedEnc,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -390,6 +390,9 @@ func (cmd *Command) writeValues(w io.Writer, seriesKey []byte, field string, val
|
||||||
case int64:
|
case int64:
|
||||||
buf = strconv.AppendInt(buf, v, 10)
|
buf = strconv.AppendInt(buf, v, 10)
|
||||||
buf = append(buf, 'i')
|
buf = append(buf, 'i')
|
||||||
|
case uint64:
|
||||||
|
buf = strconv.AppendUint(buf, v, 10)
|
||||||
|
buf = append(buf, 'u')
|
||||||
case bool:
|
case bool:
|
||||||
buf = strconv.AppendBool(buf, v)
|
buf = strconv.AppendBool(buf, v)
|
||||||
case string:
|
case string:
|
||||||
|
|
|
@ -36,6 +36,10 @@ var (
|
||||||
tsm1.NewValue(1000, "1k"),
|
tsm1.NewValue(1000, "1k"),
|
||||||
tsm1.NewValue(2000, "2k"),
|
tsm1.NewValue(2000, "2k"),
|
||||||
},
|
},
|
||||||
|
tsm1.SeriesFieldKey("uints,k=u", "u"): []tsm1.Value{
|
||||||
|
tsm1.NewValue(3000, uint64(45)),
|
||||||
|
tsm1.NewValue(4000, uint64(60)),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
basicCorpusExpLines = []string{
|
basicCorpusExpLines = []string{
|
||||||
|
@ -47,6 +51,8 @@ var (
|
||||||
"bools,k=b b=false 200",
|
"bools,k=b b=false 200",
|
||||||
`strings,k=s s="1k" 1000`,
|
`strings,k=s s="1k" 1000`,
|
||||||
`strings,k=s s="2k" 2000`,
|
`strings,k=s s="2k" 2000`,
|
||||||
|
`uints,k=u u=45u 3000`,
|
||||||
|
`uints,k=u u=60u 4000`,
|
||||||
}
|
}
|
||||||
|
|
||||||
escapeStringCorpus = corpus{
|
escapeStringCorpus = corpus{
|
||||||
|
|
Loading…
Reference in New Issue