Skip to content

Commit

Permalink
bulker: properly treat overly large numbers as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Jul 10, 2024
1 parent 09221b7 commit c147cf3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bulkerlib/types/datatype.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,18 @@ func ReformatNumberValue(v any) (any, bool) {
if strings.ContainsAny(str, ".eE") {
floatValue, err := jsonNumber.Float64()
if err != nil {
logging.Errorf("Error parsing %s into float64: %v", str, err)
return str, false
logging.Debugf("Error parsing %s into float64: %v", str, err)
return str, true
}
return any(floatValue), true
return floatValue, true
}

intValue, err := jsonNumber.Int64()
if err != nil {
logging.Errorf("Error parsing %s into int64: %v", str, err)
return str, false
logging.Debugf("Error parsing %s into int64: %v", str, err)
return str, true
}
return any(intValue), true
return intValue, true
}

// ReformatTimeValue processes string with ISO DateTime or Golang layout into time.Time
Expand Down

0 comments on commit c147cf3

Please sign in to comment.