Repository: snowflakedb/gosnowflake
Pull request #790 (2023-05-08 15:50:52)

feat(arrow): upgrade to arrow v12
### Description
Upgrading the Arrow dependency to the newly released Arrow v12. In support of #776 I did not update the vendor directory (to make merging easier after that gets merged). 

### Checklist
- [x] Code compiles correctly
- [x] Run ``make fmt`` to fix inconsistent formats
- [x] Run ``make lint`` to get lint errors and fix all of them
- [x] All tests passing



Patch:
diff --git a/arrow_chunk.go b/arrow_chunk.go
index 4240de2..344774a 100644
--- a/arrow_chunk.go
+++ b/arrow_chunk.go
@@ -7,9 +7,9 @@ import (
 	"encoding/base64"
 	"time"
 
-	"github.com/apache/arrow/go/v11/arrow"
-	"github.com/apache/arrow/go/v11/arrow/ipc"
-	"github.com/apache/arrow/go/v11/arrow/memory"
+	"github.com/apache/arrow/go/v12/arrow"
+	"github.com/apache/arrow/go/v12/arrow/ipc"
+	"github.com/apache/arrow/go/v12/arrow/memory"
 )
 
 type arrowResultChunk struct {
diff --git a/chunk_downloader.go b/chunk_downloader.go
index 4772d2b..86c7450 100644
--- a/chunk_downloader.go
+++ b/chunk_downloader.go
@@ -17,9 +17,9 @@ import (
 	"sync"
 	"time"
 
-	"github.com/apache/arrow/go/v11/arrow"
-	"github.com/apache/arrow/go/v11/arrow/ipc"
-	"github.com/apache/arrow/go/v11/arrow/memory"
+	"github.com/apache/arrow/go/v12/arrow"
+	"github.com/apache/arrow/go/v12/arrow/ipc"
+	"github.com/apache/arrow/go/v12/arrow/memory"
 )
 
 type chunkDownloader interface {
diff --git a/converter.go b/converter.go
index f426737..bc01a5c 100644
--- a/converter.go
+++ b/converter.go
@@ -14,11 +14,11 @@ import (
 	"strings"
 	"time"
 
-	"github.com/apache/arrow/go/v11/arrow"
-	"github.com/apache/arrow/go/v11/arrow/array"
-	"github.com/apache/arrow/go/v11/arrow/compute"
-	"github.com/apache/arrow/go/v11/arrow/decimal128"
-	"github.com/apache/arrow/go/v11/arrow/memory"
+	"github.com/apache/arrow/go/v12/arrow"
+	"github.com/apache/arrow/go/v12/arrow/array"
+	"github.com/apache/arrow/go/v12/arrow/compute"
+	"github.com/apache/arrow/go/v12/arrow/decimal128"
+	"github.com/apache/arrow/go/v12/arrow/memory"
 )
 
 const format = "2006-01-02 15:04:05.999999999"
diff --git a/go.mod b/go.mod
index 2ddaba7..3698f9e 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ require (
 	github.com/99designs/keyring v1.2.2
 	github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0
 	github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0
-	github.com/apache/arrow/go/v11 v11.0.0
+	github.com/apache/arrow/go/v12 v12.0.0
 	github.com/aws/aws-sdk-go-v2 v1.17.7
 	github.com/aws/aws-sdk-go-v2/credentials v1.13.18
 	github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59
diff --git a/go.sum b/go.sum
index fd4301f..2f9096b 100644
--- a/go.sum
+++ b/go.sum
@@ -14,8 +14,8 @@ github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvK
 github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
 github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
 github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
-github.com/apache/arrow/go/v11 v11.0.0 h1:hqauxvFQxww+0mEU/2XHG6LT7eZternCZq+A5Yly2uM=
-github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI=
+github.com/apache/arrow/go/v12 v12.0.0 h1:xtZE63VWl7qLdB0JObIXvvhGjoVNrQ9ciIHG2OK5cmc=
+github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg=
 github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY=
 github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
 github.com/aws/aws-sdk-go-v2 v1.17.7 h1:CLSjnhJSTSogvqUGhIC6LqFKATMRexcxLZ0i/Nzk9Eg=
diff --git a/gosnowflake.mak b/gosnowflake.mak
index 010c5a5..bbe42fa 100644
--- a/gosnowflake.mak
+++ b/gosnowflake.mak
@@ -9,8 +9,7 @@ setup:
 
 ## Install dependencies
 deps: setup
-	go mod tidy
-	go mod vendor
+	go mod tidy	
 
 ## Show help
 help:
diff --git a/util.go b/util.go
index a803401..17db5f8 100644
--- a/util.go
+++ b/util.go
@@ -10,7 +10,7 @@ import (
 	"sync"
 	"time"
 
-	"github.com/apache/arrow/go/v11/arrow/memory"
+	"github.com/apache/arrow/go/v12/arrow/memory"
 )
 
 type contextKey string


Test patch:
diff --git a/chunk_test.go b/chunk_test.go
index 6143cac..8abd5f1 100644
--- a/chunk_test.go
+++ b/chunk_test.go
@@ -15,8 +15,8 @@ import (
 	"sync/atomic"
 	"testing"
 
-	"github.com/apache/arrow/go/v11/arrow/ipc"
-	"github.com/apache/arrow/go/v11/arrow/memory"
+	"github.com/apache/arrow/go/v12/arrow/ipc"
+	"github.com/apache/arrow/go/v12/arrow/memory"
 )
 
 func TestBadChunkData(t *testing.T) {
diff --git a/converter_test.go b/converter_test.go
index b3fc195..d5fff53 100644
--- a/converter_test.go
+++ b/converter_test.go
@@ -13,10 +13,10 @@ import (
 	"testing"
 	"time"
 
-	"github.com/apache/arrow/go/v11/arrow"
-	"github.com/apache/arrow/go/v11/arrow/array"
-	"github.com/apache/arrow/go/v11/arrow/decimal128"
-	"github.com/apache/arrow/go/v11/arrow/memory"
+	"github.com/apache/arrow/go/v12/arrow"
+	"github.com/apache/arrow/go/v12/arrow/array"
+	"github.com/apache/arrow/go/v12/arrow/decimal128"
+	"github.com/apache/arrow/go/v12/arrow/memory"
 )
 
 func stringIntToDecimal(src string) (decimal128.Num, bool) {