fix(go/adbc/drivermgr): adjust ingest helper to set target before BindStream#4308
fix(go/adbc/drivermgr): adjust ingest helper to set target before BindStream#4308arnoldwakim wants to merge 3 commits into
Conversation
lidavidm
left a comment
There was a problem hiding this comment.
I suppose this is reasonable but I feel like we should fix the FlightSQL driver as well, @zeroshade
zeroshade
left a comment
There was a problem hiding this comment.
I agree, we should fix the FlightSQL driver. But more importantly, can you add a test here?
|
I will, add a test, did you have something particular in mind or just asserting that the stream was bound? Also, are you expecting me to fix the FlightSQL driver or is it something one of you wants to tackle? Thanks for the swift review! |
|
If you are able and willing to fix the flightSQL driver accordingly, go for it! Otherwise one of us will do so as a follow-up to this. I didn't have anything in particular in mind for a test, just simply a test that would fail on main and succeeds after this fix so that we don't have any regressions in the future. |
I think 0cd718e addresses both. |
| @@ -650,9 +675,18 @@ func (s *statement) BindStream(_ context.Context, stream array.RecordReader) err | |||
| } | |||
|
|
|||
| if s.prepared == nil { | |||
There was a problem hiding this comment.
Can't we combine this clause with the one above?
| @@ -617,9 +633,18 @@ func (s *statement) Bind(_ context.Context, values arrow.RecordBatch) error { | |||
| } | |||
|
|
|||
| if s.prepared == nil { | |||
Summary
Reorder
IngestStreamandIngestStreamContextto setOptionKeyIngestTargetTableandOptionKeyIngestModebefore callingBindStream, matching drivers that require ingest targets up front (e.g., FlightSQL).Keep all other ingest option handling and execution flow unchanged.
Evidence (FlightSQL requirement):
go/adbc/driver/flightsql/flightsql_statement.go:630-656:The current non-patched code, raises the error: