-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(go/adbc/driver/flightsql): enable incremental queries #1457
Conversation
579d656
to
7b7477e
Compare
### Rationale for this change It's impossible to use the current bindings with PollFlightInfo. Required for apache/arrow-adbc#1457. ### What changes are included in this PR? Add new methods that expose PollFlightInfo. ### Are these changes tested? Yes ### Are there any user-facing changes? Adds new methods. * Closes: #39574 Authored-by: David Li <[email protected]> Signed-off-by: David Li <[email protected]>
470db9a
to
f2accba
Compare
CC @zeroshade |
@@ -132,6 +153,9 @@ type statement struct { | |||
prepared *flightsql.PreparedStatement | |||
queueSize int | |||
timeouts timeoutOption | |||
// TODO: this needs to be cleared at appropriate times |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we create a corresponding issue to make sure we don't forget to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I meant to do this before opening it, thanks. I've updated it so that entrypoints reset the incremental execution state where appropriate.
if s.prepared != nil { | ||
poll, err = s.prepared.ExecutePoll(ctx, s.incrementalState.retryDescriptor, grpc.Header(&header), grpc.Trailer(&trailer), s.timeouts) | ||
} else { | ||
poll, err = s.query.poll(ctx, s.cnxn, s.incrementalState.retryDescriptor, grpc.Header(&header), grpc.Trailer(&trailer), s.timeouts) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like this would be better as a helper method on s
to make this easier to read
Code: adbc.StatusInternal, | ||
} | ||
} | ||
info = &flight.FlightInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just use https://pkg.go.dev/google.golang.org/[email protected]/proto#Clone instead?
Looks good in general other than a few comments / nitpicks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
### Rationale for this change It's impossible to use the current bindings with PollFlightInfo. Required for apache/arrow-adbc#1457. ### What changes are included in this PR? Add new methods that expose PollFlightInfo. ### Are these changes tested? Yes ### Are there any user-facing changes? Adds new methods. * Closes: apache#39574 Authored-by: David Li <[email protected]> Signed-off-by: David Li <[email protected]>
### Rationale for this change It's impossible to use the current bindings with PollFlightInfo. Required for apache/arrow-adbc#1457. ### What changes are included in this PR? Add new methods that expose PollFlightInfo. ### Are these changes tested? Yes ### Are there any user-facing changes? Adds new methods. * Closes: apache#39574 Authored-by: David Li <[email protected]> Signed-off-by: David Li <[email protected]>
### Rationale for this change It's impossible to use the current bindings with PollFlightInfo. Required for apache/arrow-adbc#1457. ### What changes are included in this PR? Add new methods that expose PollFlightInfo. ### Are these changes tested? Yes ### Are there any user-facing changes? Adds new methods. * Closes: apache#39574 Authored-by: David Li <[email protected]> Signed-off-by: David Li <[email protected]>
### Rationale for this change It's impossible to use the current bindings with PollFlightInfo. Required for apache/arrow-adbc#1457. ### What changes are included in this PR? Add new methods that expose PollFlightInfo. ### Are these changes tested? Yes ### Are there any user-facing changes? Adds new methods. * Closes: #39574 Authored-by: David Li <[email protected]> Signed-off-by: David Li <[email protected]>
Requires apache/arrow#39575.
Closes #1451.