apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.64k stars 807 forks source link

FlightSQL: consume self in client close #5421

Open Jefffrey opened 9 months ago

Jefffrey commented 9 months ago

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

See https://github.com/apache/arrow-rs/pull/5413#discussion_r1495697222

Describe the solution you'd like

https://github.com/apache/arrow-rs/blob/e7ce4bbd6632eff304514b1f60f5fa4172676cd1/arrow-flight/src/sql/client.rs#L392-L396

Should take self instead of &mut self to enforce closure of the client

Describe alternatives you've considered

Don't do this if there is compelling reason to allow client to stay alive after close (at the moment close() does nothing anyway)

Additional context

tustvold commented 9 months ago

This appears to have been present in the initial version added by @avantgardnerio, perhaps he might be able to shed some light on its purpose. It doesn't appear to do anything currently

avantgardnerio commented 9 months ago

This was purely ignorance on my part. It should consume self.

tustvold commented 9 months ago

Perhaps we could just deprecate and remove it in that case?