You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/06/12 23:38:07 UTC

[arrow-adbc] branch main updated: fix(go/adbc): don't crash on duplicate column names (#766)

This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 35b3ec42 fix(go/adbc): don't crash on duplicate column names (#766)
35b3ec42 is described below

commit 35b3ec4288d4ec6fdd1be3c1b98ef71d1bfa59f6
Author: David Li <li...@gmail.com>
AuthorDate: Mon Jun 12 19:38:01 2023 -0400

    fix(go/adbc): don't crash on duplicate column names (#766)
---
 go/adbc/driver/flightsql/flightsql_adbc_test.go | 15 +++++++++++++++
 go/adbc/go.mod                                  |  2 +-
 go/adbc/go.sum                                  |  4 ++--
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/go/adbc/driver/flightsql/flightsql_adbc_test.go b/go/adbc/driver/flightsql/flightsql_adbc_test.go
index 87f859ea..53dbac24 100644
--- a/go/adbc/driver/flightsql/flightsql_adbc_test.go
+++ b/go/adbc/driver/flightsql/flightsql_adbc_test.go
@@ -545,6 +545,21 @@ func (suite *StatementTests) TearDownTest() {
 	suite.Driver = nil
 }
 
+func (suite *StatementTests) TestDuplicateColumnNames() {
+	suite.NoError(suite.Stmt.SetSqlQuery("SELECT 1 as a, 2 as a"))
+	reader, _, err := suite.Stmt.ExecuteQuery(suite.ctx)
+	suite.NoError(err)
+	defer reader.Release()
+
+	suite.Len(reader.Schema().Fields(), 2)
+	suite.Equal(reader.Schema().Field(0).Name, "a")
+	suite.Equal(reader.Schema().Field(1).Name, "a")
+
+	for reader.Next() {
+	}
+	suite.NoError(reader.Err())
+}
+
 func (suite *StatementTests) TestQueueSizeOption() {
 	var err error
 	option := "adbc.rpc.result_queue_size"
diff --git a/go/adbc/go.mod b/go/adbc/go.mod
index eb4048f4..c01265db 100644
--- a/go/adbc/go.mod
+++ b/go/adbc/go.mod
@@ -20,7 +20,7 @@ module github.com/apache/arrow-adbc/go/adbc
 go 1.18
 
 require (
-	github.com/apache/arrow/go/v13 v13.0.0-20230607193106-16328f0ccc73
+	github.com/apache/arrow/go/v13 v13.0.0-20230612164931-b642707f6de7
 	github.com/bluele/gcache v0.0.2
 	github.com/google/uuid v1.3.0
 	github.com/snowflakedb/gosnowflake v1.6.21
diff --git a/go/adbc/go.sum b/go/adbc/go.sum
index 137017c2..d861fbbe 100644
--- a/go/adbc/go.sum
+++ b/go/adbc/go.sum
@@ -16,8 +16,8 @@ github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/
 github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
 github.com/apache/arrow/go/v12 v12.0.0-20230428025921-06d49ee63e26 h1:30dVB4xxWsw05PFJnTTpebmxdpDJeEbX7xDwUMCFwDk=
 github.com/apache/arrow/go/v12 v12.0.0-20230428025921-06d49ee63e26/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw=
-github.com/apache/arrow/go/v13 v13.0.0-20230607193106-16328f0ccc73 h1:79Fwc612EjEqduW6RRZLKst80Wh9tLV1j21d1E7qHYo=
-github.com/apache/arrow/go/v13 v13.0.0-20230607193106-16328f0ccc73/go.mod h1:W69eByFNO0ZR30q1/7Sr9d83zcVZmF2MiP3fFYAWJOc=
+github.com/apache/arrow/go/v13 v13.0.0-20230612164931-b642707f6de7 h1:/IGOeniBVzIXM2HWFKOhUTw8cE9DLxrvqSam8NYgFSA=
+github.com/apache/arrow/go/v13 v13.0.0-20230612164931-b642707f6de7/go.mod h1:W69eByFNO0ZR30q1/7Sr9d83zcVZmF2MiP3fFYAWJOc=
 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.18.0 h1:882kkTpSFhdgYRKVZ/VCgf7sd0ru57p2JCxz4/oN5RY=