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

   We encountered error #1441 but noticed that our exception handling logic 
didn't execute. I was able to replicate by using a small ADBC test client that 
goes something like:
   
   ```
       with connect(conn_attr.host, db_kwargs=args) as conn, conn.cursor() as 
cur:
           try:
               cur.execute(query)
               df = cur.fetch_df()  # fetches as Pandas DF, can also do 
fetch_arrow_table
           except Exception as e:
               print(f"Encountered exception: {e}")
       print(df)
   ```
   
   I tested this against a BigQuery connection in our server with the following 
query: `select cast(0.1 as BIGNUMERIC)`.
   
   ```
   ❯ time hatch run python src/adbc_example.py 'SELECT CAST(0.1 AS bignumeric)'
   /Users/aiguofer/Library/Application 
Support/hatch/env/virtual/afs-example/vPTxZbV9/afs-example/lib/python3.11/site-packages/adbc_driver_manager/dbapi.py:283:
 Warning: Cannot disable autocommit; conn will not be DB-API 2.0 compliant
     warnings.warn(
   
/Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp/src/arrow/type.cc:986:
  Check failed: (precision) <= (kMaxPrecision)
   0   libarrow.1200.dylib                 0x000000010637c534 
_ZN5arrow4util7CerrLogD2Ev + 236
   1   libarrow.1200.dylib                 0x000000010637c440 
_ZN5arrow4util7CerrLogD0Ev + 12
   2   libarrow.1200.dylib                 0x0000000106378d98 
_ZN5arrow4util8ArrowLogD1Ev + 48
   3   libarrow.1200.dylib                 0x00000001063ca86c 
_ZN5arrow14Decimal256TypeC2Eii + 272
   4   libarrow.1200.dylib                 0x00000001063ca8f8 
_ZNSt3__1L11make_sharedIN5arrow14Decimal256TypeEJRiS3_EvEENS_10shared_ptrIT_EEDpOT0_
 + 84
   5   libarrow.1200.dylib                 0x00000001063f3624 
_ZN5arrow12_GLOBAL__N_114SchemaImporter13ProcessFormatEv + 4084
   6   libarrow.1200.dylib                 0x00000001063f1830 
_ZN5arrow12_GLOBAL__N_114SchemaImporter8DoImportEv + 848
   7   libarrow.1200.dylib                 0x00000001063f1800 
_ZN5arrow12_GLOBAL__N_114SchemaImporter8DoImportEv + 800
   8   libarrow.1200.dylib                 0x00000001063e150c 
_ZN5arrow12ImportSchemaEP11ArrowSchema + 80
   9   libarrow.1200.dylib                 0x00000001063e29ac 
_ZN5arrow23ImportRecordBatchReaderEP16ArrowArrayStream + 128
   10  lib.cpython-311-darwin.so           0x0000000101ecf95c 
_ZL59__pyx_pw_7pyarrow_3lib_17RecordBatchReader_21_import_from_cP7_objectS0_S0_ 
+ 152
   11  libpython3.11.dylib                 0x00000001018cac94 cfunction_call + 
84
   12  libpython3.11.dylib                 0x000000010187d294 
_PyObject_MakeTpCall + 344
   13  libpython3.11.dylib                 0x000000010196d9e0 
_PyEval_EvalFrameDefault + 34740
   14  libpython3.11.dylib                 0x000000010196505c PyEval_EvalCode + 
272
   15  libpython3.11.dylib                 0x00000001019bca9c 
_PyRun_SimpleFileObject + 952
   16  libpython3.11.dylib                 0x00000001019bc4c0 
_PyRun_AnyFileObject + 160
   17  libpython3.11.dylib                 0x00000001019dcb78 Py_RunMain + 1836
   18  libpython3.11.dylib                 0x00000001019dcf28 pymain_main + 324
   19  libpython3.11.dylib                 0x00000001019dcfc8 Py_BytesMain + 40
   20  dyld                                0x000000018c2f10e0 start + 2360
   hatch run python src/adbc_example.py 'SELECT CAST(0.1 AS bignumeric)'  0.94s 
user 2.05s system 150% cpu 1.980 total
   ```
   
   Whenever some error happens in the Go driver, I'd expect a corresponding 
Exception in the Python binding to be able to handle it.


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