Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ install_requires =
appdirs>=1.4.4
appdirs-stubs>=0.1.0
cryptography>=3.4.0
httpcore<0.17.3
httpx[http2]==0.24.0
pydantic[dotenv]>=1.8.2,<2.0
python-dateutil>=2.8.2
Expand Down
4 changes: 0 additions & 4 deletions src/firebolt/common/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ class _InternalType(Enum):
Text = "text"

Date = "date"
DateExt = "date_ext"
PGDate = "pgdate"

Timestamp = "timestamp"
TimestampExt = "timestamp_ext"
TimestampNtz = "timestampntz"
TimestampTz = "timestamptz"

Expand All @@ -188,10 +186,8 @@ def python_type(self) -> type:
_InternalType.Double: float,
_InternalType.Text: str,
_InternalType.Date: date,
_InternalType.DateExt: date,
_InternalType.PGDate: date,
_InternalType.Timestamp: datetime,
_InternalType.TimestampExt: datetime,
_InternalType.TimestampNtz: datetime,
_InternalType.TimestampTz: datetime,
_InternalType.Boolean: bool,
Expand Down
8 changes: 1 addition & 7 deletions tests/integration/dbapi/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ def all_types_query() -> str:
"1.2345678901234 as float64, "
"'text' as \"string\", "
"CAST('2021-03-28' AS DATE) as \"date\", "
"CAST('1860-03-04' AS DATE_EXT) as \"date32\","
"pgdate '0001-01-01' as \"pgdate\", "
"CAST('2019-07-31 01:01:01' AS DATETIME) as \"datetime\", "
"CAST('2019-07-31 01:01:01.1234' AS TIMESTAMP_EXT(4)) as \"datetime64\", "
"CAST('1111-01-05 17:04:42.123456' as timestampntz) as \"timestampntz\", "
"'1111-01-05 17:04:42.123456'::timestamptz as \"timestamptz\", "
'true as "boolean", '
Expand All @@ -95,10 +93,8 @@ def all_types_query_description() -> List[Column]:
Column("float64", float, None, None, None, None, None),
Column("string", str, None, None, None, None, None),
Column("date", date, None, None, None, None, None),
Column("date32", date, None, None, None, None, None),
Column("pgdate", date, None, None, None, None, None),
Column("datetime", datetime, None, None, None, None, None),
Column("datetime64", datetime, None, None, None, None, None),
Column("timestampntz", datetime, None, None, None, None, None),
Column("timestamptz", datetime, None, None, None, None, None),
Column("boolean", bool, None, None, None, None, None),
Expand All @@ -122,13 +118,11 @@ def all_types_query_response(timezone_offset_seconds: int) -> List[ColType]:
30000000000,
-30000000000,
1.23,
1.23456789012,
1.2345678901234,
"text",
date(2021, 3, 28),
date(1860, 3, 4),
date(1, 1, 1),
datetime(2019, 7, 31, 1, 1, 1),
datetime(2019, 7, 31, 1, 1, 1, 123400),
datetime(1111, 1, 5, 17, 4, 42, 123456),
datetime(
1111,
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/async_db/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ def types_map() -> Dict[str, type]:
"double": float,
"text": str,
"date": date,
"date_ext": date,
"pgdate": date,
"timestamp": datetime,
"timestamp_ext": datetime,
"timestampntz": datetime,
"timestamptz": datetime,
"Nothing null": str,
Expand Down
8 changes: 0 additions & 8 deletions tests/unit/db_conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ def query_description() -> List[Column]:
Column("float64", "double", None, None, None, None, None),
Column("string", "text", None, None, None, None, None),
Column("date", "date", None, None, None, None, None),
Column("date32", "date_ext", None, None, None, None, None),
Column("datetime", "timestamp", None, None, None, None, None),
Column("datetime64", "timestamp_ext", None, None, None, None, None),
Column("bool", "boolean", None, None, None, None, None),
Column("array", "array(int)", None, None, None, None, None),
Column("decimal", "Decimal(12, 34)", None, None, None, None, None),
Expand All @@ -49,9 +47,7 @@ def python_query_description() -> List[Column]:
Column("float64", float, None, None, None, None, None),
Column("string", str, None, None, None, None, None),
Column("date", date, None, None, None, None, None),
Column("date32", date, None, None, None, None, None),
Column("datetime", datetime, None, None, None, None, None),
Column("datetime64", datetime, None, None, None, None, None),
Column("bool", bool, None, None, None, None, None),
Column("array", ARRAY(int), None, None, None, None, None),
Column("decimal", DECIMAL(12, 34), None, None, None, None, None),
Expand All @@ -73,9 +69,7 @@ def query_data() -> List[List[ColType]]:
"1.0387398573",
"some text",
"2019-07-31",
"1860-01-31",
"2019-07-31 01:01:01",
"2020-07-31 01:01:01.1234",
1,
[1, 2, 3, 4],
"123456789.123456789123456789123456789",
Expand All @@ -99,9 +93,7 @@ def python_query_data() -> List[List[ColType]]:
1.0387398573,
"some text",
date(2019, 7, 31),
date(1860, 1, 31),
datetime(2019, 7, 31, 1, 1, 1),
datetime(2020, 7, 31, 1, 1, 1, 123400),
1,
[1, 2, 3, 4],
Decimal("123456789.123456789123456789123456789"),
Expand Down