Skip to content

Commit

Permalink
More lint ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
joellubi committed Jan 14, 2024
1 parent cb68688 commit e5abf9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions go/adbc/driver/snowflake/statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,13 @@ func (st *statement) initIngest(ctx context.Context) error {
return nil
}

//nolint:golint,unused
type nativeArrowArr[T string | []byte] interface {
arrow.Array
Value(int) T
}

//nolint:golint,unused
func convToArr[T string | []byte](arr nativeArrowArr[T]) interface{} {
if arr.Len() == 1 {
if arr.IsNull(0) {
Expand All @@ -436,6 +438,7 @@ func convToArr[T string | []byte](arr nativeArrowArr[T]) interface{} {
return gosnowflake.Array(&v)
}

//nolint:golint,unused
func convMarshal(arr arrow.Array) interface{} {
if arr.Len() == 0 {
if arr.IsNull(0) {
Expand All @@ -457,6 +460,8 @@ func convMarshal(arr arrow.Array) interface{} {
// snowflake driver bindings only support specific types
// int/int32/int64/float64/float32/bool/string/byte/time
// so we have to cast anything else appropriately
//
//nolint:golint,unused
func convToSlice[T, O constraints.Integer | constraints.Float](arr arrow.Array, vals []T) interface{} {
if arr.Len() == 1 {
if arr.IsNull(0) {
Expand All @@ -476,6 +481,9 @@ func convToSlice[T, O constraints.Integer | constraints.Float](arr arrow.Array,
return gosnowflake.Array(&out)
}

// This is now unused after the previous INSERT-bind bulk ingestion was removed.
// Would this still be useful for stmt.ExecuteUpdate() with stmt.Bind() set?
//
//nolint:golint,unused
func getQueryArg(arr arrow.Array) interface{} {
switch arr := arr.(type) {
Expand Down

0 comments on commit e5abf9d

Please sign in to comment.