From c684f604f27e962f9db1afceed1e43594dea6794 Mon Sep 17 00:00:00 2001 From: marregui Date: Thu, 2 Nov 2023 21:02:29 +0100 Subject: [PATCH] test release 0.0.103 fixes tests --- pyproject.toml | 2 +- src/qdb_superset/db_engine_specs/questdb.py | 68 +++++++++++++++++---- src/questdb_connect/__init__.py | 2 +- 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e4fe7f7..1b527f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ name = 'questdb-connect' #version = '1.0.10' # Standalone production version (with engine) -version = '0.0.102' # testing version +version = '0.0.103' # testing version authors = [{ name = 'questdb.io', email = 'miguel@questdb.io' }] description = "SqlAlchemy library" readme = "README.md" diff --git a/src/qdb_superset/db_engine_specs/questdb.py b/src/qdb_superset/db_engine_specs/questdb.py index 59f854e..b1a9925 100644 --- a/src/qdb_superset/db_engine_specs/questdb.py +++ b/src/qdb_superset/db_engine_specs/questdb.py @@ -79,23 +79,67 @@ class QuestDbEngineSpec(BaseEngineSpec, BasicParametersMixin): "P3M": "DATE_TRUNC('quarter', {col})", } column_type_mappings = ( - (re.compile("^BOOLEAN$", re.IGNORECASE), qdbc_types.Boolean, GenericDataType.BOOLEAN), + ( + re.compile("^BOOLEAN$", re.IGNORECASE), + qdbc_types.Boolean, + GenericDataType.BOOLEAN, + ), (re.compile("^BYTE$", re.IGNORECASE), qdbc_types.Byte, GenericDataType.NUMERIC), - (re.compile("^SHORT$", re.IGNORECASE), qdbc_types.Short, GenericDataType.NUMERIC), + ( + re.compile("^SHORT$", re.IGNORECASE), + qdbc_types.Short, + GenericDataType.NUMERIC, + ), (re.compile("^CHAR$", re.IGNORECASE), qdbc_types.Char, GenericDataType.STRING), (re.compile("^INT$", re.IGNORECASE), qdbc_types.Int, GenericDataType.NUMERIC), (re.compile("^LONG$", re.IGNORECASE), qdbc_types.Long, GenericDataType.NUMERIC), - (re.compile("^DATE$", re.IGNORECASE), qdbc_types.Date, GenericDataType.TEMPORAL), - (re.compile("^TIMESTAMP$", re.IGNORECASE), qdbc_types.Timestamp, GenericDataType.TEMPORAL), - (re.compile("^FLOAT$", re.IGNORECASE), qdbc_types.Float, GenericDataType.NUMERIC), - (re.compile("^DOUBLE$", re.IGNORECASE), qdbc_types.Double, GenericDataType.NUMERIC), - (re.compile("^STRING$", re.IGNORECASE), qdbc_types.String, GenericDataType.STRING), - (re.compile("^SYMBOL$", re.IGNORECASE), qdbc_types.Symbol, GenericDataType.STRING), - (re.compile("^LONG256$", re.IGNORECASE), qdbc_types.Long256, GenericDataType.STRING), - (re.compile(r"^GEOHASH\(\d+[b|c]\)$", re.IGNORECASE), qdbc_types.GeohashLong, GenericDataType.STRING), + ( + re.compile("^DATE$", re.IGNORECASE), + qdbc_types.Date, + GenericDataType.TEMPORAL, + ), + ( + re.compile("^TIMESTAMP$", re.IGNORECASE), + qdbc_types.Timestamp, + GenericDataType.TEMPORAL, + ), + ( + re.compile("^FLOAT$", re.IGNORECASE), + qdbc_types.Float, + GenericDataType.NUMERIC, + ), + ( + re.compile("^DOUBLE$", re.IGNORECASE), + qdbc_types.Double, + GenericDataType.NUMERIC, + ), + ( + re.compile("^STRING$", re.IGNORECASE), + qdbc_types.String, + GenericDataType.STRING, + ), + ( + re.compile("^SYMBOL$", re.IGNORECASE), + qdbc_types.Symbol, + GenericDataType.STRING, + ), + ( + re.compile("^LONG256$", re.IGNORECASE), + qdbc_types.Long256, + GenericDataType.STRING, + ), + ( + re.compile(r"^GEOHASH\(\d+[b|c]\)$", re.IGNORECASE), + qdbc_types.GeohashLong, + GenericDataType.STRING, + ), (re.compile("^UUID$", re.IGNORECASE), qdbc_types.UUID, GenericDataType.STRING), - (re.compile("^LONG128$", re.IGNORECASE), qdbc_types.Long128, GenericDataType.STRING), - (re.compile("^IPV4$", re.IGNORECASE), qdbc_types.I, GenericDataType.STRING), + ( + re.compile("^LONG128$", re.IGNORECASE), + qdbc_types.Long128, + GenericDataType.STRING, + ), + (re.compile("^IPV4$", re.IGNORECASE), qdbc_types.IPv4, GenericDataType.STRING), ) @classmethod diff --git a/src/questdb_connect/__init__.py b/src/questdb_connect/__init__.py index e40afa4..602c427 100644 --- a/src/questdb_connect/__init__.py +++ b/src/questdb_connect/__init__.py @@ -13,7 +13,6 @@ from questdb_connect.types import ( QUESTDB_TYPES, UUID, - IPv4, Boolean, Byte, Char, @@ -25,6 +24,7 @@ GeohashLong, GeohashShort, Int, + IPv4, Long, Long128, Long256,