krlmlr commented on PR #985:
URL: https://github.com/apache/arrow-adbc/pull/985#issuecomment-2106566057

   Thanks, Dewey. I like this idea I read here:
   
   - Keep {adbdrivermanager} free of the strong {later} dependency
   - Instead, support a callback that can bring in {later}/{promises}
       - {adbcdrivermanager} could even provide a default callback that uses 
{later} and fails if the package is not installed
   - Polling is always available
   
   Why do we need to tightly couple execution and data retrieval? I could 
imagine the following process:
   
   - Creation of the (parameterized or not) query sends it to the server, 
returns a "bound" or "unbound" promise
   - Optional: Parameter binding can accept that "unbound" promise and return a 
new "bound" promise
   - Schema retrieval accepts that "bound" promise and returns a new "ready" 
promise
   - Retrieval of each chunk accepts a "ready" promise and returns another 
"ready" promise
   - When complete, no more promises are returned
   
   ```mermaid
   graph
       PQ("Creation of the parameterized query") --> |Unbound| PB("Parameter 
binding")
       PB("Parameter binding") --> |Bound| SR
       NPQ("Creation of the not parameterized query") --> |Bound| SR
       SR("Schema retrieval") --> |Ready| RC
       RC("Retrieval of each chunk") -.-> |Ready| RC
       RC -.-> |NULL| End(Done)
   ```
   
   
![image](https://github.com/apache/arrow-adbc/assets/1741643/dc67e0a9-741d-4722-a180-e32a42616b7e)
   


-- 
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]

Reply via email to