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 a0d3de3e chore(c/driver/snowflake,python): fix failing typechecks and 
tests (#953)
a0d3de3e is described below

commit a0d3de3e76343486ba664b7795be588e85adb338
Author: David Li <[email protected]>
AuthorDate: Tue Aug 1 11:48:44 2023 -0400

    chore(c/driver/snowflake,python): fix failing typechecks and tests (#953)
    
    Fixes #952.
---
 c/driver/snowflake/snowflake_test.cc               | 2 ++
 c/driver/sqlite/statement_reader.c                 | 3 +--
 python/adbc_driver_manager/tests/test_duckdb.py    | 3 +++
 python/adbc_driver_postgresql/tests/test_polars.py | 5 ++++-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/c/driver/snowflake/snowflake_test.cc 
b/c/driver/snowflake/snowflake_test.cc
index 96edb889..ed2f5de0 100644
--- a/c/driver/snowflake/snowflake_test.cc
+++ b/c/driver/snowflake/snowflake_test.cc
@@ -177,6 +177,8 @@ class SnowflakeStatementTest : public ::testing::Test,
     }
   }
 
+  void TestSqlIngestInterval() { GTEST_SKIP(); }
+
  protected:
   void ValidateIngestedTimestampData(struct ArrowArrayView* values,
                                      enum ArrowTimeUnit unit,
diff --git a/c/driver/sqlite/statement_reader.c 
b/c/driver/sqlite/statement_reader.c
index f8483c53..910ec7ad 100644
--- a/c/driver/sqlite/statement_reader.c
+++ b/c/driver/sqlite/statement_reader.c
@@ -104,8 +104,7 @@ static AdbcStatusCode ArrowDate32ToIsoString(int32_t value, 
char** buf,
   int strlen = 10;
 
 #if SIZEOF_TIME_T < 8
-  if ((seconds > INT32_MAX / SECONDS_PER_DAY) ||
-      (seconds < INT32_MIN / SECONDS_PER_DAY)) {
+  if ((value > INT32_MAX / SECONDS_PER_DAY) || (value < INT32_MIN / 
SECONDS_PER_DAY)) {
     SetError(error, "Date %" PRId32 " exceeds platform time_t bounds", value);
 
     return ADBC_STATUS_INVALID_ARGUMENT;
diff --git a/python/adbc_driver_manager/tests/test_duckdb.py 
b/python/adbc_driver_manager/tests/test_duckdb.py
index ce66e158..521ba23e 100644
--- a/python/adbc_driver_manager/tests/test_duckdb.py
+++ b/python/adbc_driver_manager/tests/test_duckdb.py
@@ -15,6 +15,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# pyright: reportUnboundVariable=false
+# pyright doesn't like the optional import
+
 import sys
 
 import pyarrow
diff --git a/python/adbc_driver_postgresql/tests/test_polars.py 
b/python/adbc_driver_postgresql/tests/test_polars.py
index 5b8f059d..a0295211 100644
--- a/python/adbc_driver_postgresql/tests/test_polars.py
+++ b/python/adbc_driver_postgresql/tests/test_polars.py
@@ -17,6 +17,9 @@
 
 """Integration tests with polars."""
 
+# pyright: reportUnboundVariable=false
+# pyright doesn't like the optional import
+
 import uuid
 
 import pytest
@@ -67,7 +70,7 @@ def test_polars_write_database(postgres_uri: str, df: 
"polars.DataFrame") -> Non
     try:
         df.write_database(
             table_name=table_name,
-            connection_uri=postgres_uri,
+            connection=postgres_uri,
             # TODO(apache/arrow-adbc#541): polars doesn't map the semantics
             # properly here, and one of their modes isn't supported
             if_exists="replace",

Reply via email to