mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 20:07:51 +00:00
handle float --> stringset implicit map conversion in bulk insert (#2211)
Co-authored-by: Fletcher Haynes <fletcher.haynes@generalassemb.ly>
This commit is contained in:
parent
f6baf32dbd
commit
3606167758
1 changed files with 5 additions and 1 deletions
|
|
@ -593,7 +593,11 @@ func (i *bulkInsertSourceNDJsonRowIter) Next(ctx context.Context) (types.Row, er
|
|||
case *parser.DataTypeStringSet:
|
||||
switch v := evalValue.(type) {
|
||||
case float64:
|
||||
return nil, sql3.NewErrTypeConversionOnMap(0, 0, v, mapColumn.colType.TypeDescription())
|
||||
if v == float64(int64(v)) {
|
||||
result[idx] = []string{fmt.Sprintf("%d", int64(v))}
|
||||
} else {
|
||||
result[idx] = []string{fmt.Sprintf("%f", v)}
|
||||
}
|
||||
|
||||
case []interface{}:
|
||||
setValue := make([]string, 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue