apache / arrow-adbc

Database connectivity API standard and libraries for Apache Arrow
https://arrow.apache.org/adbc/
Apache License 2.0
363 stars 89 forks source link

[Python] Test failure when verifying Python release candidate #456

Open paleolimbot opened 1 year ago

paleolimbot commented 1 year ago

I get the following when running the release candidate verification:

======================================================= FAILURES ========================================================
__________________________________________________ test_query_fetch_py __________________________________________________

sqlite = <adbc_driver_manager.dbapi.Connection object at 0x123eb6f20>

    @pytest.mark.sqlite
    def test_query_fetch_py(sqlite):
        with sqlite.cursor() as cur:
            cur.execute('SELECT 1, "foo", 2.0')
            assert cur.description == [
                ("1", dbapi.NUMBER, None, None, None, None, None),
                ('"foo"', dbapi.STRING, None, None, None, None, None),
                ("2.0", dbapi.NUMBER, None, None, None, None, None),
            ]
            assert cur.rownumber == 0
            assert cur.fetchone() == (1, "foo", 2.0)
            assert cur.rownumber == 1
            assert cur.fetchone() is None

            cur.execute('SELECT 1, "foo", 2.0')
>           assert cur.fetchmany() == [(1, "foo", 2.0)]
E           AssertionError: assert [(None, None, None)] == [(1, 'foo', 2.0)]
E             At index 0 diff: (None, None, None) != (1, 'foo', 2.0)
E             Full diff:
E             - [(1, 'foo', 2.0)]
E             + [(None, None, None)]

/var/folders/p5/sxv05ml96sd1n2p3ssfhzzth0000gn/T/arrow-adbc-0.2.0.XXXXX.qHCxRTQb/apache-arrow-adbc-0.2.0/python/adbc_driver_manager/tests/test_dbapi.py:193: AssertionError
================================================ short test summary info ================================================
FAILED ../../../../../../../../var/folders/p5/sxv05ml96sd1n2p3ssfhzzth0000gn/T/arrow-adbc-0.2.0.XXXXX.qHCxRTQb/apache-arrow-adbc-0.2.0/python/adbc_driver_manager/tests/test_dbapi.py::test_query_fetch_py - AssertionError: assert [(None, None, None)] == [(1, 'foo', 2.0)]
============================================= 1 failed, 34 passed in 3.15s ==============================================
Failed to verify release candidate. See /var/folders/p5/sxv05ml96sd1n2p3ssfhzzth0000gn/T/arrow-adbc-0.2.0.XXXXX.qHCxRTQb for details.

I'll try to do some digging to see what SQLite version is getting linked to...it is probably the system sqlite shipped with MacOS.

paleolimbot commented 1 year ago

I see -- Found SQLite3: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include (found version "3.39.5") and I'm on Python 3.10.6 (probably also MacOS system Python).

paleolimbot commented 1 year ago

I got this one again when verifying 0.3.0 rc1 on MacOS El Capitan (x86):

=================================== FAILURES ===================================
_____________________________ test_query_fetch_py ______________________________

sqlite = <adbc_driver_manager.dbapi.Connection object at 0x11665ce10>

    @pytest.mark.sqlite
    def test_query_fetch_py(sqlite):
        with sqlite.cursor() as cur:
            cur.execute('SELECT 1, "foo", 2.0')
            assert cur.description == [
                ("1", dbapi.NUMBER, None, None, None, None, None),
                ('"foo"', dbapi.STRING, None, None, None, None, None),
                ("2.0", dbapi.NUMBER, None, None, None, None, None),
            ]
            assert cur.rownumber == 0
            assert cur.fetchone() == (1, "foo", 2.0)
            assert cur.rownumber == 1
            assert cur.fetchone() is None

            cur.execute('SELECT 1, "foo", 2.0')
>           assert cur.fetchmany() == [(1, "foo", 2.0)]
E           AssertionError: assert [(None, None, None)] == [(1, 'foo', 2.0)]
E             At index 0 diff: (None, None, None) != (1, 'foo', 2.0)
E             Full diff:
E             - [(1, 'foo', 2.0)]
E             + [(None, None, None)]

/var/folders/4v/hvphchw50373drst9g5smz1w0000gn/T/arrow-adbc-0.3.0.XXXXX.HSDHXV0l/apache-arrow-adbc-0.3.0/python/adbc_driver_manager/tests/test_dbapi.py:193: AssertionError
=========================== short test summary info ============================
FAILED ../../../../../../../../var/folders/4v/hvphchw50373drst9g5smz1w0000gn/T/arrow-adbc-0.3.0.XXXXX.HSDHXV0l/apache-arrow-adbc-0.3.0/python/adbc_driver_manager/tests/test_dbapi.py::test_query_fetch_py - AssertionError: assert [(None, None, None)] == [(1, 'foo', 2.0)]
========================= 1 failed, 40 passed in 4.29s =========================
Failed to verify release candidate. See /var/folders/4v/hvphchw50373drst9g5smz1w0000gn/T/arrow-adbc-0.3.0.XXXXX.HSDHXV0l for details.

Full log: https://gist.github.com/paleolimbot/f8bc2f379a9a9af5278cb23fad319cd9