Skip to content

Commit 20ed3cf

Browse files
Remove get_double_type from the SQLAlchemy types module
With SQLAlchemy 2.0 required (#845), get_double_type only returned types.DOUBLE and nothing in PyAthena calls it. Remove it from pyathena.sqlalchemy.types for the 4.0.0 release; use sqlalchemy.types.DOUBLE instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 0ba0875 commit 20ed3cf

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

‎pyathena/sqlalchemy/types.py‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from __future__ import annotations
88

9-
from typing import TYPE_CHECKING, Any
9+
from typing import TYPE_CHECKING
1010

1111
from sqlalchemy import types
1212
from sqlalchemy.sql import sqltypes
@@ -32,19 +32,9 @@
3232
"AthenaStruct",
3333
"AthenaTimestamp",
3434
"Tinyint",
35-
"get_double_type",
3635
]
3736

3837

39-
def get_double_type() -> type[Any]:
40-
"""Get the SQLAlchemy type for Athena DOUBLE.
41-
42-
Returns:
43-
``types.DOUBLE``.
44-
"""
45-
return types.DOUBLE
46-
47-
4838
class AthenaBinary(types.LargeBinary):
4939
"""SQLAlchemy binary type with Athena hexadecimal literals."""
5040

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
from sqlalchemy import (
2-
types,
3-
)
1+
from sqlalchemy import types
42

5-
from pyathena.sqlalchemy.types import (
6-
get_double_type,
7-
)
3+
from pyathena.sqlalchemy.base import ischema_names
84

95

10-
def test_get_double_type():
11-
from pyathena.sqlalchemy.base import ischema_names
12-
13-
assert get_double_type() is types.DOUBLE
6+
def test_double_column_type():
147
assert ischema_names["double"] is types.DOUBLE

0 commit comments

Comments
 (0)