You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "aiguofer (via GitHub)" <gi...@apache.org> on 2023/06/13 20:48:36 UTC

[GitHub] [arrow-adbc] aiguofer opened a new issue, #713: python: custom headers not working

aiguofer opened a new issue, #713:
URL: https://github.com/apache/arrow-adbc/issues/713

   Hi, I was trying to play around with the Python ADBC driver for FlightSQL to see if I could connect to a service we're building. Our service requires some custom headers, but when I try to set them it breaks.
   
   Example code:
   
   ```
   from adbc_driver_flightsql.dbapi import connect
   
   
   def main():
       conn = connect(
           "grpc://localhost:9876",
           conn_kwargs={
               "adbc.flight.sql.rpc.call_header.customheader": "1",
           },
       )
       cur = conn.cursor()
       cur.execute("select * from table")
       print(cur.fetch_arrow_table())
   
   
   main()
   ```
   
   error:
   ```
   panic: interface conversion: interface is nil, not adbc.PostInitOptions
   
   goroutine 17 [running, locked to thread]:
   main.FlightSQLConnectionSetOption(0x1004537f8, 0x0?, 0x100453701?, 0x14000002680?)
           /Users/runner/work/arrow-adbc/arrow-adbc/adbc/go/adbc/pkg/flightsql/driver.go:249 +0x70
   ```
   
   I don't have much experience with go, much less with Python bindings on top of go, so I don't know how to even start debugging this. Any help would be greatly appreciated!


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] kou commented on issue #713: python: custom headers not working

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #713:
URL: https://github.com/apache/arrow-adbc/issues/713#issuecomment-1565150446

   Could you try `db_kwargs` instead of `conn_kwargs`?


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on issue #713: python: custom headers not working

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #713:
URL: https://github.com/apache/arrow-adbc/issues/713#issuecomment-1565024847

   Hmm. It looks like we just didn't implement the proper interface on the Go-side, and since this is basically duck-typed, it wasn't caught earlier. (We should cover this with more tests...)
   
   I'll investigate more closely when I get a chance next week.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on issue #713: python: custom headers not working

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #713:
URL: https://github.com/apache/arrow-adbc/issues/713#issuecomment-1590006594

   I'm reopening: there's a deeper underlying issue why your original sample crashed (db_kwargs is indeed the way but conn_kwargs shouldn't crash). The Go FFI wrapper doesn't account for calling SetOptions between New and Init and the Go APIs don't actually have a way to initialize a driver with arguments currently (so that'll have to go in 1.1.0).


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] aiguofer commented on issue #713: python: custom headers not working

Posted by "aiguofer (via GitHub)" <gi...@apache.org>.
aiguofer commented on issue #713:
URL: https://github.com/apache/arrow-adbc/issues/713#issuecomment-1565238398

   ohh that worked! Thanks! I'll try to make a PR adding to the Python driver docs.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm closed issue #713: python: custom headers not working

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #713: python: custom headers not working
URL: https://github.com/apache/arrow-adbc/issues/713


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] aiguofer commented on issue #713: python: custom headers not working

Posted by "aiguofer (via GitHub)" <gi...@apache.org>.
aiguofer commented on issue #713:
URL: https://github.com/apache/arrow-adbc/issues/713#issuecomment-1570720781

   Closing this issue. Will create docs PR as a followup.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] aiguofer closed issue #713: python: custom headers not working

Posted by "aiguofer (via GitHub)" <gi...@apache.org>.
aiguofer closed issue #713: python: custom headers not working
URL: https://github.com/apache/arrow-adbc/issues/713


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org