File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
connectors/grafana-plugin Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " iotdb" ,
3- "version" : " 1.0.0 " ,
3+ "version" : " 1.0.1 " ,
44 "description" : " Apache IoTDB" ,
55 "scripts" : {
66 "build" : " grafana-toolkit plugin:build" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import (
2424 "errors"
2525 "fmt"
2626 "io"
27+ "math"
2728 "net/http"
2829 "strconv"
2930 "strings"
@@ -325,7 +326,7 @@ func recoverType(m []interface{}) interface{} {
325326 tmp := make ([]float64 , len (m ))
326327 for i := range m {
327328 if m [i ] == nil {
328- tmp [i ] = 0
329+ tmp [i ] = math . NaN ()
329330 } else {
330331 tmp [i ] = m [i ].(float64 )
331332 }
@@ -340,7 +341,9 @@ func recoverType(m []interface{}) interface{} {
340341 case bool :
341342 tmp := make ([]float64 , len (m ))
342343 for i := range m {
343- if m [i ].(bool ) {
344+ if m [i ] == nil {
345+ tmp [i ] = math .NaN ()
346+ } else if m [i ].(bool ) {
344347 tmp [i ] = 1
345348 } else {
346349 tmp [i ] = 0
@@ -351,7 +354,7 @@ func recoverType(m []interface{}) interface{} {
351354 tmp := make ([]float64 , len (m ))
352355 for i := range m {
353356 if m [i ] == nil {
354- tmp [i ] = 0
357+ tmp [i ] = math . NaN ()
355358 } else {
356359 tmp [i ] = m [i ].(float64 )
357360 }
You can’t perform that action at this time.
0 commit comments