zeroshade commented on code in PR #3150: URL: https://github.com/apache/arrow-adbc/pull/3150#discussion_r2214311370
########## go/adbc/ext.go: ########## @@ -78,3 +81,81 @@ type OTelTracing interface { // Gets the initial span attributes for any newly started span. GetInitialSpanAttributes() []attribute.KeyValue } + +// IngestStreamOption bundles the IngestStream options. +// Driver specific options can go into Extra. +type IngestStreamOption struct { Review Comment: Alternately, we could potentially do something like: ```go type IngestStreamOption func(adbc.Statement) error func ingestSetOption(name, value string) IngestStreamOption { return func(st adbc.Statement) { return st.SetOption(name, cat) } } func WithIngestCatalog(cat string) IngestStreamOption { return ingestSetOption(adbc.OptionValueIngestTargetCatalog, cat) } func WithIngestTemp() IngestStreamOption { return ingestSetOption(adbc.OptionValueIngestTemporary, adbc.OptionValueEnabled) } ... func IngestStream(ctx context.Context, cnxn Connection, reader array.RecordReader, targetTable, ingestMode string, opts ...IngestStreamOption) (count int64, err error) { ... for _, o := range opts { if err = o(stmt); err != nil { err = fmt.Errorf("error during ingestion: %w", err) return } } .... } ``` which would not only allow for the options we provide but make it fairly easy for users to create their own options if they like and want to add, while still making this extensible. I'm not saying we definitely *should* do this, just putting it out as a suggestion. Thoughts? ########## go/adbc/ext.go: ########## @@ -78,3 +81,81 @@ type OTelTracing interface { // Gets the initial span attributes for any newly started span. GetInitialSpanAttributes() []attribute.KeyValue } + +// IngestStreamOption bundles the IngestStream options. +// Driver specific options can go into Extra. +type IngestStreamOption struct { Review Comment: I would pluralize this to be `IngestStreamOptions` personally. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org