if nf, ok := output.(float64); ok {
return nf, nil
} else if ni, ok := output.(int); ok {
return float64(ni), nil
}
log.Errorw("invalid query execution: result should be number", "query", query, "result", output, "type", reflect.TypeOf(output))
return num, errors.New("invalid query execution result")
degrezero Goto Github PK
Name: 『归咎于自己』
Type: User
Company: PKU
Bio: A Ph.D. student in Database Group @ PKU
Location: Boston, MA