Skip to content

Commit

Permalink
test release 0.0.103 fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marregui committed Nov 2, 2023
1 parent aefcd8e commit c684f60
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
68 changes: 56 additions & 12 deletions src/qdb_superset/db_engine_specs/questdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/questdb_connect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from questdb_connect.types import (
QUESTDB_TYPES,
UUID,
IPv4,
Boolean,
Byte,
Char,
Expand All @@ -25,6 +24,7 @@
GeohashLong,
GeohashShort,
Int,
IPv4,
Long,
Long128,
Long256,
Expand Down

0 comments on commit c684f60

Please sign in to comment.