srimal-randoli commented on issue #39:
URL: https://github.com/apache/arrow-go/issues/39#issuecomment-3040524876

   @zeroshade I'm using GizmoSQL(https://github.com/gizmodata/gizmosql) as my 
FlightSQL server with a DuckDB backend. Here is my code. And it seems like the 
ADBC driver is unable to handle time.Time values.
   
   ```go
   package main
   
   import (
        "context"
        "database/sql"
        "fmt"
        "log"
        "testing"
        "time"
   
        _ "github.com/apache/arrow-adbc/go/adbc/sqldriver/flightsql"
   )
   
   var dsnTemplate = "uri=grpc://%s;username=%s;password=%s"
   
   const (
        FLIGHT_SQL_USER = "gizmosql_username"
        FLIGHT_SQL_PASS = "password123"
        FLIGHT_SQL_HOST = "localhost:31337"
   )
   
   // This example uses Go's native SQL driver
   func TestFlightSQL(t *testing.T) {
        dsn := fmt.Sprintf(dsnTemplate,
                FLIGHT_SQL_HOST,
                FLIGHT_SQL_USER,
                FLIGHT_SQL_PASS,
        )
   
        db, err := sql.Open("flightsql", dsn)
        if err != nil {
                log.Fatalf("opening a connection failed: %v", err)
        }
   
        defer db.Close()
   
        timestamp := time.Now()
   
        // Table schema
        // CREATE TABLE IF NOT EXISTS flight_test.events (id INTEGER, 
event_time TIMESTAMP)
        result, err := db.ExecContext(context.Background(), `INSERT INTO 
flight_test.events (id, event_time) VALUES (1, $1)`, timestamp)
        if err != nil {
                log.Fatal(err)
        }
   
        log.Print(result)
   }
   
   ```
   
   This is the output
   
   ```text
   === RUN   TestFlightSQL
   2025/07/06 07:13:16 sql: converting argument $1 type: Invalid Argument: 
expected parameter of type timestamp[us]
   FAIL gitlab.com/srimaln91/flight-sql-client  0.046s
   ```


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