@@ -27,8 +27,6 @@ import (
2727 "time"
2828
2929 "github.com/apache/arrow-adbc/go/adbc"
30- "github.com/apache/arrow-go/v18/arrow"
31- "github.com/apache/arrow-go/v18/arrow/extensions"
3230 "github.com/apache/arrow-go/v18/arrow/memory"
3331 "go.opentelemetry.io/otel"
3432 "go.opentelemetry.io/otel/attribute"
@@ -81,34 +79,6 @@ var getExporterName = sync.OnceValue(func() string {
8179 return os .Getenv (otelTracesExporter )
8280})
8381
84- // registerExtensionTypes ensures that canonical Arrow extension types are registered.
85- // This is called once during driver initialization to make sure extension types like
86- // UUID are available for use throughout the driver.
87- var registerExtensionTypes = sync .OnceFunc (func () {
88- // The arrow/extensions package automatically registers canonical extension types
89- // (UUID, Bool8, JSON, Opaque, Variant) in its init() function.
90- // However, we explicitly ensure registration here in case the package wasn't
91- // imported elsewhere, and to handle any registration errors gracefully.
92-
93- // List of canonical extension types to ensure are registered
94- canonicalTypes := []arrow.ExtensionType {
95- extensions .NewUUIDType (),
96- extensions .NewBool8Type (),
97- & extensions.JSONType {},
98- & extensions.OpaqueType {},
99- & extensions.VariantType {},
100- }
101-
102- for _ , extType := range canonicalTypes {
103- // RegisterExtensionType is idempotent - it returns an error only if
104- // a different type with the same name is already registered
105- if err := arrow .RegisterExtensionType (extType ); err != nil {
106- // Log but don't fail - the type might already be registered
107- // which is fine (the extensions package init() may have done it)
108- }
109- }
110- })
111-
11282// DatabaseImpl is an interface that drivers implement to provide
11383// vendor-specific functionality.
11484type DatabaseImpl interface {
@@ -146,7 +116,6 @@ type DatabaseImplBase struct {
146116// driver, allowing the Arrow allocator and error handler to be reused.
147117func NewDatabaseImplBase (ctx context.Context , driver * DriverImplBase ) (DatabaseImplBase , error ) {
148118 // Ensure extension types are registered before creating the database
149- registerExtensionTypes ()
150119
151120 database := DatabaseImplBase {
152121 Alloc : driver .Alloc ,
0 commit comments