Skip to content

Commit

Permalink
snowpipe: support parsing strings as numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwotj committed Oct 18, 2024
1 parent bde09ec commit de53558
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/impl/snowflake/streaming/userdata_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ func (c numberConverter) ValidateAndConvert(stats *statsBuffer, val any, buf typ
v, err = int128.Float32(t, c.precision, c.scale)
case float64:
v, err = int128.Float64(t, c.precision, c.scale)
case string:
v, err = int128.String(t, c.precision, c.scale)
case json.Number:
v, err = int128.String(t.String(), c.precision, c.scale)
default:
Expand Down

0 comments on commit de53558

Please sign in to comment.