From 0600bb27d6b287d91c2073763e785232be67bb30 Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Mon, 22 Aug 2022 19:11:38 -0400 Subject: [PATCH] ARROW-17496: [Go] Fix Nightly Build (#13943) Turns out that the `pragma_table_info` function in modernc.org/sqlite's package doesn't work correctly in go1.17 either, only in go1.18. As this is only used for testing and the example sqlite flightsql server, rather than anything needed in the flightsql package itself, the bulid failure is easily solved by marking the example and its tests to be only built in go1.18. As we already have a git workflow that runs with go1.18, the CI will still continue to test the example code, but mamba builds using go1.17 won't break anymore. Authored-by: Matt Topol Signed-off-by: Matt Topol --- go/arrow/flight/flightsql/example/sql_batch_reader.go | 4 ++-- go/arrow/flight/flightsql/example/sqlite_info.go | 4 ++-- go/arrow/flight/flightsql/example/sqlite_server.go | 11 ++++++----- .../example/sqlite_tables_schema_batch_reader.go | 4 ++-- go/arrow/flight/flightsql/example/type_info.go | 4 ++-- go/arrow/flight/flightsql/sqlite_server_test.go | 4 ++-- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/go/arrow/flight/flightsql/example/sql_batch_reader.go b/go/arrow/flight/flightsql/example/sql_batch_reader.go index 5e7fbde1afef7..92f32971e2705 100644 --- a/go/arrow/flight/flightsql/example/sql_batch_reader.go +++ b/go/arrow/flight/flightsql/example/sql_batch_reader.go @@ -14,8 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 +//go:build go1.18 +// +build go1.18 package example diff --git a/go/arrow/flight/flightsql/example/sqlite_info.go b/go/arrow/flight/flightsql/example/sqlite_info.go index e4dcd160b0aca..e8395a6b33cf1 100644 --- a/go/arrow/flight/flightsql/example/sqlite_info.go +++ b/go/arrow/flight/flightsql/example/sqlite_info.go @@ -14,8 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 +//go:build go1.18 +// +build go1.18 package example diff --git a/go/arrow/flight/flightsql/example/sqlite_server.go b/go/arrow/flight/flightsql/example/sqlite_server.go index 5d2599b52c09f..0d4c4ea99da37 100644 --- a/go/arrow/flight/flightsql/example/sqlite_server.go +++ b/go/arrow/flight/flightsql/example/sqlite_server.go @@ -14,8 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 +//go:build go1.18 +// +build go1.18 // Package example contains a FlightSQL Server implementation using // sqlite as the backing engine. @@ -30,9 +30,10 @@ // package, it's easy to swap them out if desired as the modernc.org/sqlite // package is slower than go-sqlite3. // -// One other important note is that modernc.org/sqlite only works in go -// 1.17+ so this entire package is given the build constraint to only -// build when using go1.17 or higher +// One other important note is that modernc.org/sqlite only works +// correctly (specifically pragma_table_info) in go 1.18+ so this +// entire package is given the build constraint to only build when +// using go1.18 or higher package example import ( diff --git a/go/arrow/flight/flightsql/example/sqlite_tables_schema_batch_reader.go b/go/arrow/flight/flightsql/example/sqlite_tables_schema_batch_reader.go index 851b301c7482f..a53e36828c4c0 100644 --- a/go/arrow/flight/flightsql/example/sqlite_tables_schema_batch_reader.go +++ b/go/arrow/flight/flightsql/example/sqlite_tables_schema_batch_reader.go @@ -14,8 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 +//go:build go1.18 +// +build go1.18 package example diff --git a/go/arrow/flight/flightsql/example/type_info.go b/go/arrow/flight/flightsql/example/type_info.go index dcba42b1f847b..d9bdca21e02db 100644 --- a/go/arrow/flight/flightsql/example/type_info.go +++ b/go/arrow/flight/flightsql/example/type_info.go @@ -14,8 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 +//go:build go1.18 +// +build go1.18 package example diff --git a/go/arrow/flight/flightsql/sqlite_server_test.go b/go/arrow/flight/flightsql/sqlite_server_test.go index 28d0079cd67df..15f8271ca2b09 100644 --- a/go/arrow/flight/flightsql/sqlite_server_test.go +++ b/go/arrow/flight/flightsql/sqlite_server_test.go @@ -14,8 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 +//go:build go1.18 +// +build go1.18 package flightsql_test