Skip to content

Commit

Permalink
chore(c/driver/snowflake,python): fix failing typechecks and tests (#953
Browse files Browse the repository at this point in the history
)

Fixes #952.
  • Loading branch information
lidavidm authored Aug 1, 2023
1 parent 995a02d commit a0d3de3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions c/driver/snowflake/snowflake_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ class SnowflakeStatementTest : public ::testing::Test,
}
}

void TestSqlIngestInterval() { GTEST_SKIP(); }

protected:
void ValidateIngestedTimestampData(struct ArrowArrayView* values,
enum ArrowTimeUnit unit,
Expand Down
3 changes: 1 addition & 2 deletions c/driver/sqlite/statement_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions python/adbc_driver_manager/tests/test_duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion python/adbc_driver_postgresql/tests/test_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

"""Integration tests with polars."""

# pyright: reportUnboundVariable=false
# pyright doesn't like the optional import

import uuid

import pytest
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit a0d3de3

Please sign in to comment.