Skip to content

Commit 0600bb2

Browse files
authored
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 <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
1 parent 62461b0 commit 0600bb2

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

go/arrow/flight/flightsql/example/sql_batch_reader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
//go:build go1.17
18-
// +build go1.17
17+
//go:build go1.18
18+
// +build go1.18
1919

2020
package example
2121

go/arrow/flight/flightsql/example/sqlite_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
//go:build go1.17
18-
// +build go1.17
17+
//go:build go1.18
18+
// +build go1.18
1919

2020
package example
2121

go/arrow/flight/flightsql/example/sqlite_server.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
//go:build go1.17
18-
// +build go1.17
17+
//go:build go1.18
18+
// +build go1.18
1919

2020
// Package example contains a FlightSQL Server implementation using
2121
// sqlite as the backing engine.
@@ -30,9 +30,10 @@
3030
// package, it's easy to swap them out if desired as the modernc.org/sqlite
3131
// package is slower than go-sqlite3.
3232
//
33-
// One other important note is that modernc.org/sqlite only works in go
34-
// 1.17+ so this entire package is given the build constraint to only
35-
// build when using go1.17 or higher
33+
// One other important note is that modernc.org/sqlite only works
34+
// correctly (specifically pragma_table_info) in go 1.18+ so this
35+
// entire package is given the build constraint to only build when
36+
// using go1.18 or higher
3637
package example
3738

3839
import (

go/arrow/flight/flightsql/example/sqlite_tables_schema_batch_reader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
//go:build go1.17
18-
// +build go1.17
17+
//go:build go1.18
18+
// +build go1.18
1919

2020
package example
2121

go/arrow/flight/flightsql/example/type_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
//go:build go1.17
18-
// +build go1.17
17+
//go:build go1.18
18+
// +build go1.18
1919

2020
package example
2121

go/arrow/flight/flightsql/sqlite_server_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
//go:build go1.17
18-
// +build go1.17
17+
//go:build go1.18
18+
// +build go1.18
1919

2020
package flightsql_test
2121

0 commit comments

Comments
 (0)