frbvianna commented on issue #2193:
URL: https://github.com/apache/arrow-adbc/issues/2193#issuecomment-3006219637

   I see the same here on some testing:
   ```
   ERRO[0001]connection.go:529 gosnowflake.(*snowflakeConn).QueryArrowStream 
error: 002049 (42601): SQL compilation error: error line 1 at position 7
   Bind variable :PARAM_1 not set.
   ```
   
   Partial code below:
   
   ```go
           // ... initiate connection and statement
        err = stmt.SetSqlQuery(`SELECT :PARAM_1, :PARAM_2`)
        if err != nil {
                return err
        }
   
        schema := arrow.NewSchema([]arrow.Field{
                {Name: "PARAM_1", Type: arrow.PrimitiveTypes.Int64},
                {Name: "PARAM_2", Type: arrow.PrimitiveTypes.Int64},
        }, nil)
   
        b := array.NewRecordBuilder(memory.DefaultAllocator, schema)
        defer b.Release()
   
        b.Field(0).(*array.Int64Builder).AppendValues([]int64{1}, nil)
        b.Field(1).(*array.Int64Builder).AppendValues([]int64{2}, nil)
   
        rec := b.NewRecord()
        defer rec.Release()
   
        err = stmt.Prepare(ctx)
        if err != nil {
                return fmt.Errorf("cannot prepare statement: %w", err)
        }
   
        err = stmt.Bind(ctx, rec)
        if err != nil {
                return fmt.Errorf("cannot bind parameters: %w", err)
        }
   
        rr, _, err := stmt.ExecuteQuery(ctx)
        if err != nil {
                return err // <-- fails here
        }
        defer rr.Release()
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to