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 2408bdf8f fix(go/adbc/drivermgr): terminate GetObjects table_types 
with NULL (#4596)
2408bdf8f is described below

commit 2408bdf8fc74280fd79164e7ccc1f31a0a5bf003
Author: David Li <[email protected]>
AuthorDate: Thu Jul 30 18:41:20 2026 -0700

    fix(go/adbc/drivermgr): terminate GetObjects table_types with NULL (#4596)
    
    This seems to have happened only sporadically before but it happened
    once in CI and this is the best guess as to why.
---
 go/adbc/drivermgr/wrapper.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/go/adbc/drivermgr/wrapper.go b/go/adbc/drivermgr/wrapper.go
index d2a8e029f..d84f8f84d 100644
--- a/go/adbc/drivermgr/wrapper.go
+++ b/go/adbc/drivermgr/wrapper.go
@@ -337,10 +337,10 @@ func (c *cnxn) GetObjects(_ context.Context, depth 
adbc.ObjectDepth, catalog, db
        }
 
        if len(tableType) > 0 {
-               cArr := []*C.char{}
-               for _, tt := range tableType {
+               cArr := make([]*C.char, len(tableType)+1)
+               for i, tt := range tableType {
                        cs := C.CString(tt)
-                       cArr = append(cArr, cs)
+                       cArr[i] = cs
                        defer C.free(unsafe.Pointer(cs))
                }
                tableType_ = &cArr[0]

Reply via email to