From c81d6058d71757bb01bb2960c5efb6bbe30270ff Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Thu, 30 Nov 2023 08:54:00 +0700 Subject: [PATCH] Reenabling hive driver --- README.md | 2 +- drivers/hive/hive.go | 1 - go.mod | 6 +++--- go.sum | 15 ++++++--------- internal/hive.go | 2 +- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 62197f2ea61..2a9f8351e50 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,7 @@ associated database, scheme / build tag, and scheme aliases: | Alibaba Tablestore | `ots` | `ot`, `tablestore` | [github.com/aliyun/aliyun-tablestore-go-sql-driver][d-ots] | | Apache Avatica | `avatica` | `av`, `phoenix` | [github.com/apache/calcite-avatica-go/v5][d-avatica] | | Apache H2 | `h2` | | [github.com/jmrobles/h2go][d-h2] | +| Apache Hive | `hive` | `hi`, `hive2` | [sqlflow.org/gohive][d-hive] | | Apache Ignite | `ignite` | `ig`, `gridgain` | [github.com/amsokol/ignite-go-client/sql][d-ignite] | | AWS Athena | `athena` | `s3`, `aws`, `awsathena` | [github.com/uber/athenadriver/go][d-athena] | | Azure CosmosDB | `cosmos` | `cm` | [github.com/btnguyen2k/gocosmos][d-cosmos] | @@ -264,7 +265,6 @@ associated database, scheme / build tag, and scheme aliases: | TiDB | `mysql` | `ti`, `tidb` | [github.com/go-sql-driver/mysql][d-mysql] [‡][f-wire] | | Vitess Database | `mysql` | `vt`, `vitess` | [github.com/go-sql-driver/mysql][d-mysql] [‡][f-wire] | | | | | | -| Apache Hive | `hive` | `hi` | [sqlflow.org/gohive][d-hive] | | Apache Impala | `impala` | `im` | [github.com/bippio/go-impala][d-impala] | | Genji | `genji` | `gj` | [github.com/genjidb/genji/driver][d-genji] | | | | | | diff --git a/drivers/hive/hive.go b/drivers/hive/hive.go index 88eb328850b..a584da25702 100644 --- a/drivers/hive/hive.go +++ b/drivers/hive/hive.go @@ -1,6 +1,5 @@ // Package hive defines and registers usql's Apache Hive driver. // -// Group: bad // See: https://github.com/sql-machine-learning/gohive package hive diff --git a/go.mod b/go.mod index c337a97ae38..316a3f82669 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( gorm.io/driver/bigquery v1.2.0 modernc.org/ql v1.4.7 modernc.org/sqlite v1.27.0 - sqlflow.org/gohive v0.0.0-20220817082204-15a5e01fd889 + sqlflow.org/gohive v0.0.0-20231130013447-c9657f0f21f9 sqlflow.org/gomaxcompute v0.0.0-20210805062559-c14ae028b44c ) @@ -106,8 +106,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.6 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.47.0 // indirect github.com/aws/smithy-go v1.18.0 // indirect - github.com/beltran/gohive v1.5.4 // indirect - github.com/beltran/gosasl v0.0.0-20230115020419-e3b503e58833 // indirect + github.com/beltran/gohive v1.6.0 // indirect + github.com/beltran/gosasl v0.0.0-20231124144235-92b2e4f10bb6 // indirect github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btnguyen2k/consu/checksum v1.1.0 // indirect diff --git a/go.sum b/go.sum index fb7573fd70b..4a88d4d3f86 100644 --- a/go.sum +++ b/go.sum @@ -277,7 +277,6 @@ github.com/apache/arrow/go/v12 v12.0.1 h1:JsR2+hzYYjgSUkBSaahpqCetqZMr76djX80fF/ github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= github.com/apache/calcite-avatica-go/v5 v5.2.0 h1:9SQf9qz/iUaC39lvRDqFGmVVtoIWtnDB94YNg2Dy+UY= github.com/apache/calcite-avatica-go/v5 v5.2.0/go.mod h1:R9YlGqS8pPRnWAW1peGPpVax49XcujI7GLebaz9sOfk= -github.com/apache/thrift v0.14.1/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= @@ -323,11 +322,10 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.26.0 h1:E0i/PbCoOu04ichWZfLoSgidxkHh github.com/aws/aws-sdk-go-v2/service/sts v1.26.0/go.mod h1:YHpL2uHCmZtSkDJYc2gG0LSZkeColBGi2TZyCFG8GmE= github.com/aws/smithy-go v1.18.0 h1:uWqjOwPEqjzmQXpwm/8cwUWTmFhT9Ypc8tECXrshDsI= github.com/aws/smithy-go v1.18.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= -github.com/beltran/gohive v1.5.4 h1:Zb6VkqsDP0QhefL2A5vnKC0p5opIAbU8D57aTA8H3II= -github.com/beltran/gohive v1.5.4/go.mod h1:BJbXAhof7gWk5+kl0y6Ox8TFDJ1xv6gwDksF7l15LFI= -github.com/beltran/gosasl v0.0.0-20200715011608-d5475aebb293/go.mod h1:Qx8cW6jkI8riyzmklj80kAIkv+iezFUTBiGU0qHhHes= -github.com/beltran/gosasl v0.0.0-20230115020419-e3b503e58833 h1:3mDCea/Jo3bCaS62fNuKeNai/zaNjSOjU4hQ6SWixnU= -github.com/beltran/gosasl v0.0.0-20230115020419-e3b503e58833/go.mod h1:Qx8cW6jkI8riyzmklj80kAIkv+iezFUTBiGU0qHhHes= +github.com/beltran/gohive v1.6.0 h1:VqKaSeYhae4cY9QHfw8uqWZARq9yJdydiOVsqS63KbE= +github.com/beltran/gohive v1.6.0/go.mod h1:IgDi0gD1c73aKKQyS+3j1+NWSNn5NUK7rDcg/Rr6mTs= +github.com/beltran/gosasl v0.0.0-20231124144235-92b2e4f10bb6 h1:OPqfeBd/oCkMl9I4D999xqr8ExmXWA6I2tXIKsGlTLQ= +github.com/beltran/gosasl v0.0.0-20231124144235-92b2e4f10bb6/go.mod h1:Qx8cW6jkI8riyzmklj80kAIkv+iezFUTBiGU0qHhHes= github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab h1:ayfcn60tXOSYy5zUN1AMSTQo4nJCf7hrdzAVchpPst4= github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab/go.mod h1:GLe4UoSyvJ3cVG+DVtKen5eAiaD8mAJFuV5PT3Eeg9Q= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -517,7 +515,6 @@ github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-zookeeper/zk v1.0.1/go.mod h1:gpJdHazfkmlg4V0rt0vYeHYJHSL8hHFwV0qOd+HRTJE= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -1753,7 +1750,7 @@ modernc.org/zappy v1.1.0/go.mod h1:cxC0dWAgZuyMsJ+KL3ZBgo3twyKGBB/0By/umSZE2bQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sqlflow.org/gohive v0.0.0-20220817082204-15a5e01fd889 h1:RCQqWZk72QrKCv82pZm7SzAuGOMGrXuGt9mdN5ZB6WU= -sqlflow.org/gohive v0.0.0-20220817082204-15a5e01fd889/go.mod h1:W0khd2lkSQjmVJnNRxkWgLcNnRoai4i9OKhkGRy2xyk= +sqlflow.org/gohive v0.0.0-20231130013447-c9657f0f21f9 h1:MJVi9OnD/tKNXdRlw3gNEDPNV72I4xwkaBBQdeHNayo= +sqlflow.org/gohive v0.0.0-20231130013447-c9657f0f21f9/go.mod h1:OAU0/vkmdKfZ363QgGTChI35KIBsS63sZWDNWcFFcBM= sqlflow.org/gomaxcompute v0.0.0-20210805062559-c14ae028b44c h1:Zo3qlfUn/rlMx9vWHpGE/luEtweuXHwrYbrFZwTG978= sqlflow.org/gomaxcompute v0.0.0-20210805062559-c14ae028b44c/go.mod h1:MxRFJp6UEk1OfnnVOIL3Jc7ROBH0dOpwF/J14A9LNdM= diff --git a/internal/hive.go b/internal/hive.go index 1060c5d4b38..c52570824c0 100644 --- a/internal/hive.go +++ b/internal/hive.go @@ -1,4 +1,4 @@ -//go:build (bad || hive) && !no_hive +//go:build (all || most || hive) && !no_hive package internal