Skip to content

Commit

Permalink
add remaining types
Browse files Browse the repository at this point in the history
  • Loading branch information
taniabogatsch committed Jun 21, 2024
1 parent 4d97e4e commit c4112eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vector_casts.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ func (vec *vector) tryCastUnsafe(val any) (any, error) {
// Multi-level nested list.
switch val.(type) {
case []bool, []int8, []int16, []int32, []int64, []uint8, []uint16, []uint32,
[]uint64, []float32, []float64, []time.Time, []Interval, []map[string]any, []Map:
[]uint64, []float32, []float64, []time.Time, []Interval, []*big.Int, []string,
[][]byte, []Decimal, []map[string]any, []Map, []UUID:
return val, nil
default:
return vec.tryCastList(val, false)
Expand Down
10 changes: 10 additions & 0 deletions vector_setters.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,20 @@ func (vec *vector) setList(rowIdx C.idx_t, val any) {
genericSetList[time.Time](vec, rowIdx, v)
case []Interval:
genericSetList[Interval](vec, rowIdx, v)
case []*big.Int:
genericSetList[*big.Int](vec, rowIdx, v)
case []string:
genericSetList[string](vec, rowIdx, v)
case [][]byte:
genericSetList[[]byte](vec, rowIdx, v)
case []Decimal:
genericSetList[Decimal](vec, rowIdx, v)
case []map[string]any:
genericSetList[map[string]any](vec, rowIdx, v)
case []Map:
genericSetList[Map](vec, rowIdx, v)
case []UUID:
genericSetList[UUID](vec, rowIdx, v)
default:
// We assume []any, as this is the type-safe code path.
genericSetList[any](vec, rowIdx, val.([]any))
Expand Down

0 comments on commit c4112eb

Please sign in to comment.