tokoko commented on issue #4771:
URL: https://github.com/apache/arrow-adbc/issues/4771#issuecomment-7150256712
Would the convention be that action's parameters are passed as bound batches
and described by GetParameterSchema, with options used only to name the action?
I kinda like that, but if we start using actions in more and more scenarios as
suggested it will get awkward when an action also needs an input dataset. The
bind slot is the obvious place for the data, so any other parameters have to go
somewhere else, most likely into other options.
For example write step in partitioned ingest needs input dataset and a
handle, so handle would probably need to move to `SetOptionBytes` instead.
Normal bulk ingest already passes the target table as an option next to the
bound data, which makes options workable there. Even so, it would be good to
decide whether that is the intended rule for actions before more of them depend
on it.
This might be too early but is allowing multiple (named) binds realistic?
Something like:
```
SetOption(stmt, "adbc.action", "adbc.ingest_partitions.write");
SetOption(stmt, "adbc.statement.bind_target", "data");
GetParameterSchema(stmt, &data_schema); // schema of the data input
BindStream(stmt, &rows);
SetOption(stmt, "adbc.statement.bind_target", "parameters");
GetParameterSchema(stmt, ¶m_schema); // {handle: binary}
Bind(stmt, &handle_batch, &handle_schema);
ExecuteQuery(stmt, &out, &rows_affected, &error);
```
--
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]