Skip to content

Commit

Permalink
Merge pull request #428 from laughingman7743/athena_engine_version_3
Browse files Browse the repository at this point in the history
Fix test cases to support Athena engine version 3
  • Loading branch information
laughingman7743 authored Apr 16, 2023
2 parents 49d7c38 + d223b3f commit b79a4e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
14 changes: 6 additions & 8 deletions tests/arrow/test_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,19 @@ def test_complex_unload(self, arrow_cursor):
("col_boolean", "boolean", None, None, 0, 0, "NULLABLE"),
(
"col_tinyint",
# If unloaded, it will be an integer instead of tinyint
"integer",
"tinyint",
None,
None,
10,
3,
0,
"NULLABLE",
),
(
"col_smallint",
# If unloaded, it will be an integer instead of smallint
"integer",
"smallint",
None,
None,
10,
5,
0,
"NULLABLE",
),
Expand Down Expand Up @@ -388,8 +386,8 @@ def test_complex_unload_as_arrow(self, arrow_cursor):
assert table.schema == pa.schema(
[
pa.field("col_boolean", pa.bool_()),
pa.field("col_tinyint", pa.int32()),
pa.field("col_smallint", pa.int32()),
pa.field("col_tinyint", pa.int8()),
pa.field("col_smallint", pa.int16()),
pa.field("col_int", pa.int32()),
pa.field("col_bigint", pa.int64()),
pa.field("col_float", pa.float32()),
Expand Down
20 changes: 8 additions & 12 deletions tests/pandas/test_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,19 @@ def test_complex_unload_pyarrow(self, pandas_cursor, parquet_engine):
("col_boolean", "boolean", None, None, 0, 0, "NULLABLE"),
(
"col_tinyint",
# If unloaded, it will be an integer instead of tinyint
"integer",
"tinyint",
None,
None,
10,
3,
0,
"NULLABLE",
),
(
"col_smallint",
# If unloaded, it will be an integer instead of smallint
"integer",
"smallint",
None,
None,
10,
5,
0,
"NULLABLE",
),
Expand Down Expand Up @@ -380,7 +378,6 @@ def test_complex_unload_fastparquet(self, pandas_cursor):
("col_boolean", "boolean", None, None, 0, 0, "NULLABLE"),
(
"col_tinyint",
# If unloaded, it will be an integer instead of tinyint
"integer",
None,
None,
Expand All @@ -390,7 +387,6 @@ def test_complex_unload_fastparquet(self, pandas_cursor):
),
(
"col_smallint",
# If unloaded, it will be an integer instead of smallint
"integer",
None,
None,
Expand Down Expand Up @@ -708,8 +704,8 @@ def test_complex_unload_as_pandas_pyarrow(self, pandas_cursor, parquet_engine):
assert dtypes == tuple(
[
np.bool_,
np.int32,
np.int32,
np.int8,
np.int16,
np.int32,
np.int64,
np.float32,
Expand Down Expand Up @@ -833,8 +829,8 @@ def test_complex_unload_as_pandas_fastparquet(self, pandas_cursor):
assert dtypes == tuple(
[
np.bool_,
np.int32,
np.int32,
np.int8,
np.int16,
np.int32,
np.int64,
np.float32,
Expand Down

0 comments on commit b79a4e0

Please sign in to comment.