Kontinuation commented on code in PR #277:
URL: https://github.com/apache/sedona-db/pull/277#discussion_r2502546396
##########
python/sedonadb/python/sedonadb/dbapi.py:
##########
@@ -38,7 +38,7 @@ def connect(**kwargs: Mapping[str, Any]) -> "Connection":
>>> con = sedona.dbapi.connect()
>>> with con.cursor() as cur:
- ... cur.execute("SELECT 1 as one")
+ ... _ = cur.execute("SELECT 1 as one")
Review Comment:
Fix a doctest failure:
```
=================================== FAILURES
===================================
_______________________ [doctest] sedonadb.dbapi.connect
_______________________
031 DBAPI is experimental.
032
033 Args:
034 kwargs: Extra keyword arguments passed to
035 `adbc_driver_manager.dbapi.Connection()`.
036
037 Examples:
038
039 >>> con = sedona.dbapi.connect()
040 >>> with con.cursor() as cur:
Expected:
[(1,)]
Got:
<adbc_driver_manager.dbapi.Cursor object at 0x7fd4e20c1e80>
[(1,)]
```
This is caused by a recent `adbc_driver_manager.dbapi` update:
https://github.com/apache/arrow-adbc/commit/7076bee4fc1f30a49668723bcccb7ea25bb19fc8#diff-aac0b59df381ba9a1f9232bd15d9f12610bb80beb238eb51901febba5fabc066R742
The `execute` method now returns Self to enable chaining. This will print an
extra message in interactive mode. We suppress this message by assigning the
return value of `execute` to `_`.
--
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]