Skip to content

Commit

Permalink
ARROW-17496: [Go] Fix Nightly Build (apache#13943)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
  • Loading branch information
zeroshade authored and zagto committed Oct 7, 2022
1 parent d576518 commit 42943ab
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions go/arrow/flight/flightsql/example/sql_batch_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions go/arrow/flight/flightsql/example/sqlite_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions go/arrow/flight/flightsql/example/sqlite_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions go/arrow/flight/flightsql/example/type_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions go/arrow/flight/flightsql/sqlite_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 42943ab

Please sign in to comment.