This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new a525d743c8 fix(go/adbc): rename misnamed ingest option keys to
OptionKey* (#4979)
a525d743c8 is described below
commit a525d743c82d6638565c9a69b8c0c2da5aafe144
Author: ump45nose <[email protected]>
AuthorDate: Thu Nov 5 10:23:27 2026 +0800
fix(go/adbc): rename misnamed ingest option keys to OptionKey* (#4979)
## What's Changed
`OptionValueIngestTargetCatalog`, `OptionValueIngestTargetDBSchema`,
and `OptionValueIngestTemporary` are option *keys*, not values. Rename
them to `OptionKeyIngest*` and deprecate the old names.
Closes #4818.
Assisted-by: AI
---------
Signed-off-by: Vincent <[email protected]>
---
go/adbc/adbc.go | 18 ++++++++++++------
go/adbc/ext.go | 12 ++++++------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/go/adbc/adbc.go b/go/adbc/adbc.go
index c33a1408ec..96a93d4b66 100644
--- a/go/adbc/adbc.go
+++ b/go/adbc/adbc.go
@@ -250,18 +250,24 @@ const (
OptionKeyMaxProgress = "adbc.statement.exec.max_progress"
OptionKeyIngestTargetTable = "adbc.ingest.target_table"
OptionKeyIngestMode = "adbc.ingest.mode"
+ OptionKeyIngestTargetCatalog = "adbc.ingest.target_catalog"
+ OptionKeyIngestTargetDBSchema = "adbc.ingest.target_db_schema"
+ OptionKeyIngestTemporary = "adbc.ingest.temporary"
OptionKeyIsolationLevel =
"adbc.connection.transaction.isolation_level"
OptionKeyReadOnly = "adbc.connection.readonly"
OptionValueIngestModeCreate = "adbc.ingest.mode.create"
OptionValueIngestModeAppend = "adbc.ingest.mode.append"
OptionValueIngestModeReplace = "adbc.ingest.mode.replace"
OptionValueIngestModeCreateAppend = "adbc.ingest.mode.create_append"
- OptionValueIngestTargetCatalog = "adbc.ingest.target_catalog"
- OptionValueIngestTargetDBSchema = "adbc.ingest.target_db_schema"
- OptionValueIngestTemporary = "adbc.ingest.temporary"
- OptionKeyURI = "uri"
- OptionKeyUsername = "username"
- OptionKeyPassword = "password"
+ // Deprecated: use OptionKeyIngestTargetCatalog.
+ OptionValueIngestTargetCatalog = OptionKeyIngestTargetCatalog
+ // Deprecated: use OptionKeyIngestTargetDBSchema.
+ OptionValueIngestTargetDBSchema = OptionKeyIngestTargetDBSchema
+ // Deprecated: use OptionKeyIngestTemporary.
+ OptionValueIngestTemporary = OptionKeyIngestTemporary
+ OptionKeyURI = "uri"
+ OptionKeyUsername = "username"
+ OptionKeyPassword = "password"
// EXPERIMENTAL. Sets/Gets the trace parent on OpenTelemetry traces
OptionKeyTelemetryTraceParent = "adbc.telemetry.trace_parent"
// EXPERIMENTAL. Selects the OpenTelemetry traces exporter when the
diff --git a/go/adbc/ext.go b/go/adbc/ext.go
index 13fdfc686b..a59c6c250b 100644
--- a/go/adbc/ext.go
+++ b/go/adbc/ext.go
@@ -108,17 +108,17 @@ func IngestStream(ctx context.Context, cnxn Connection,
reader array.RecordReade
// Set other options if provided
if opt.Catalog != "" {
- if err = stmt.SetOption(OptionValueIngestTargetCatalog,
opt.Catalog); err != nil {
+ if err = stmt.SetOption(OptionKeyIngestTargetCatalog,
opt.Catalog); err != nil {
return -1, fmt.Errorf("error during ingestion:
target_catalog=%s: %w", opt.Catalog, err)
}
}
if opt.DBSchema != "" {
- if err = stmt.SetOption(OptionValueIngestTargetDBSchema,
opt.DBSchema); err != nil {
+ if err = stmt.SetOption(OptionKeyIngestTargetDBSchema,
opt.DBSchema); err != nil {
return -1, fmt.Errorf("error during ingestion:
target_db_schema=%s: %w", opt.DBSchema, err)
}
}
if opt.Temporary {
- if err = stmt.SetOption(OptionValueIngestTemporary,
OptionValueEnabled); err != nil {
+ if err = stmt.SetOption(OptionKeyIngestTemporary,
OptionValueEnabled); err != nil {
return -1, fmt.Errorf("error during ingestion:
temporary=true: %w", err)
}
}
@@ -175,17 +175,17 @@ func IngestStreamContext(ctx context.Context, cnxn
ConnectionWithContext, reader
// Set other options if provided
if opt.Catalog != "" {
- if err = stmt.SetOption(ctx, OptionValueIngestTargetCatalog,
opt.Catalog); err != nil {
+ if err = stmt.SetOption(ctx, OptionKeyIngestTargetCatalog,
opt.Catalog); err != nil {
return -1, fmt.Errorf("error during ingestion:
target_catalog=%s: %w", opt.Catalog, err)
}
}
if opt.DBSchema != "" {
- if err = stmt.SetOption(ctx, OptionValueIngestTargetDBSchema,
opt.DBSchema); err != nil {
+ if err = stmt.SetOption(ctx, OptionKeyIngestTargetDBSchema,
opt.DBSchema); err != nil {
return -1, fmt.Errorf("error during ingestion:
target_db_schema=%s: %w", opt.DBSchema, err)
}
}
if opt.Temporary {
- if err = stmt.SetOption(ctx, OptionValueIngestTemporary,
OptionValueEnabled); err != nil {
+ if err = stmt.SetOption(ctx, OptionKeyIngestTemporary,
OptionValueEnabled); err != nil {
return -1, fmt.Errorf("error during ingestion:
temporary=true: %w", err)
}
}