ennuite commented on code in PR #732:
URL: https://github.com/apache/arrow-go/pull/732#discussion_r3790099189
##########
arrow/flight/flightsql/server.go:
##########
@@ -155,6 +155,9 @@ type ActionCreatePreparedStatementResult struct {
Handle []byte
DatasetSchema *arrow.Schema
ParameterSchema *arrow.Schema
+ // IsUpdate indicates whether the prepared statement should be executed
+ // as an update (true) or query (false). If nil, the client can choose.
+ IsUpdate *bool
Review Comment:
The comment mentions 2 distinct public structs. For clarity, you are asking
about release notes for both of them, right?
I updated the PR description with the breaking change. I looked into how
release notes are generated, and it seems like at release time Github will use
the PR title in the release notes, but not the description. Given that the
description is the place where the breaking change is highlighted, do I need to
add release notes elsewhere?
**Explanation of the 2 structs**
If you agree with my PR description you don't need to read this detail, I
leave it for clarity in case I misunderstood your ask.
The type alias refers to `flightsql.CreatePreparedStatementResult`. This is
the raw proto version, what goes in the wire, and I think it's there so that
users of the `flightsql` package don't need to import the proto package
directly. In this codebase, this is only used in
`LoadPreparedStatementFromResult()`
But the line about the unkeyed literal is referring to a different struct
`flightsql.ActionCreatePreparedStatementResult` that is unrelated to the alias.
It is defined in `server.go`, and it is a developer-friendly type with the
`*arrow.Schema` objects decoded from wire format. It is used in quite a few
places in the codebase.
Both of them fall under the situation of a public struct where unkeyed
literals will break.
Thank you for pointing out the compatibility rules, for reference I found
them at https://go.dev/doc/go1compat:
> For the addition of features in later point releases, it may be necessary
to add fields to exported structs in the API. Code that uses unkeyed struct
literals (such as pkg.T{3, "x"}) to create values of these types would fail to
compile after such a change. However, code that uses keyed literals (pkg.T{A:
3, B: "x"}) will continue to compile after such a change. We will update such
data structures in a way that allows keyed struct literals to remain
compatible, although unkeyed literals may fail to compile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]