This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 4fc8057a test(python/adbc_driver_postgresql): fix Polars integration 
test (#884)
4fc8057a is described below

commit 4fc8057a06fba86d6004e5eca651d0c4dc1bffa4
Author: David Li <[email protected]>
AuthorDate: Fri Jul 7 16:24:23 2023 -0400

    test(python/adbc_driver_postgresql): fix Polars integration test (#884)
    
    Fixes #881.
---
 .github/workflows/integration.yml                  |  4 ++--
 python/adbc_driver_postgresql/tests/test_polars.py | 16 ++--------------
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/integration.yml 
b/.github/workflows/integration.yml
index 3a06373b..31394b84 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -238,7 +238,7 @@ jobs:
         env:
           BUILD_ALL: "0"
           BUILD_DRIVER_POSTGRESQL: "1"
-          ADBC_POSTGRESQL_TEST_URI: 
"postgres://localhost:5432/postgres?user=postgres&password=password"
+          ADBC_POSTGRESQL_TEST_URI: 
"postgresql://localhost:5432/postgres?user=postgres&password=password"
         run: |
           ./ci/scripts/cpp_test.sh "$(pwd)/build"
 
@@ -254,7 +254,7 @@ jobs:
         env:
           BUILD_ALL: "0"
           BUILD_DRIVER_POSTGRESQL: "1"
-          ADBC_POSTGRESQL_TEST_URI: 
"postgres://localhost:5432/postgres?user=postgres&password=password"
+          ADBC_POSTGRESQL_TEST_URI: 
"postgresql://localhost:5432/postgres?user=postgres&password=password"
         run: |
           ./ci/scripts/python_test.sh "$(pwd)" "$(pwd)/build"
 
diff --git a/python/adbc_driver_postgresql/tests/test_polars.py 
b/python/adbc_driver_postgresql/tests/test_polars.py
index d03bf536..5b8f059d 100644
--- a/python/adbc_driver_postgresql/tests/test_polars.py
+++ b/python/adbc_driver_postgresql/tests/test_polars.py
@@ -58,17 +58,7 @@ def df(request):
     "df",
     [
         "ints",
-        pytest.param(
-            "floats",
-            marks=pytest.mark.xfail(
-                reason="; ".join(
-                    [
-                        "apache/arrow-adbc#81: lack of type support",
-                        "pola-rs/polars#7757: polars doesn't close cursor 
properly",
-                    ]
-                )
-            ),
-        ),
+        "floats",
     ],
     indirect=True,
 )
@@ -84,8 +74,6 @@ def test_polars_write_database(postgres_uri: str, df: 
"polars.DataFrame") -> Non
             engine="adbc",
         )
     finally:
-        # TODO(apache/arrow-adbc#540): driver doesn't handle execute()
-        # properly here because it tries to infer the schema.
         with dbapi.connect(postgres_uri) as conn:
             with conn.cursor() as cursor:
-                cursor.executemany(f"DROP TABLE {table_name}", [])
+                cursor.execute(f"DROP TABLE {table_name}")

Reply via email to