yu-iskw commented on code in PR #3174:
URL: https://github.com/apache/arrow-adbc/pull/3174#discussion_r2220687524


##########
go/adbc/driver/bigquery/driver_test.go:
##########
@@ -1551,3 +1551,73 @@ func (suite *BigQueryTests) 
TestMetadataGetObjectsColumnsXdbc() {
 }
 
 var _ validation.DriverQuirks = (*BigQueryQuirks)(nil)
+
+// TestDriverConstructorWithNilClientFactory tests that the driver constructor
+// handles nil client factory gracefully by using the default factory.
+func TestDriverConstructorWithNilClientFactory(t *testing.T) {
+       mem := memory.NewCheckedAllocator(memory.DefaultAllocator)
+       defer mem.AssertSize(t, 0)
+
+       // Test that NewDriverWithClientFactory with nil doesn't panic
+       drv := driver.NewDriverWithClientFactory(mem, nil)
+       if drv == nil {
+               t.Error("Driver should not be nil")
+       }

Review Comment:
   I have modified the code.



##########
go/adbc/driver/bigquery/driver_test.go:
##########
@@ -1551,3 +1551,73 @@ func (suite *BigQueryTests) 
TestMetadataGetObjectsColumnsXdbc() {
 }
 
 var _ validation.DriverQuirks = (*BigQueryQuirks)(nil)
+
+// TestDriverConstructorWithNilClientFactory tests that the driver constructor
+// handles nil client factory gracefully by using the default factory.
+func TestDriverConstructorWithNilClientFactory(t *testing.T) {
+       mem := memory.NewCheckedAllocator(memory.DefaultAllocator)
+       defer mem.AssertSize(t, 0)
+
+       // Test that NewDriverWithClientFactory with nil doesn't panic
+       drv := driver.NewDriverWithClientFactory(mem, nil)
+       if drv == nil {
+               t.Error("Driver should not be nil")
+       }
+
+       // Test that we can create a database with the driver
+       db, err := drv.NewDatabase(nil)
+       if err != nil {
+               t.Errorf("Failed to create database: %v", err)
+       }
+       if db == nil {
+               t.Error("Database should not be nil")
+       }
+       defer db.Close()
+}
+
+// TestWithAccessTokenConstant tests that the WithAccessToken constant
+// follows the correct BigQuery naming pattern.
+func TestWithAccessTokenConstant(t *testing.T) {
+       expected := "adbc.google.bigquery.auth.access_token"
+       if driver.WithAccessToken != expected {
+               t.Errorf("WithAccessToken constant should be %s, got %s", 
expected, driver.WithAccessToken)
+       }
+}

Review Comment:
   I have removed that.



-- 
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

Reply via email to