Skip to content

Commit

Permalink
fix: restrict varint to supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mause authored Oct 21, 2024
1 parent 5e26f0f commit ccdbc06
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions duckdb_engine/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ class UInteger(Integer):
pass


class VarInt(Integer):
pass
if IS_GT_1:

class VarInt(Integer):
pass


def compile_uint(element: Integer, compiler: PGTypeCompiler, **kw: Any) -> str:
Expand Down Expand Up @@ -214,8 +216,9 @@ def __init__(self, fields: Dict[str, TV]):
"enum": sqltypes.Enum,
"bool": sqltypes.BOOLEAN,
"varchar": String,
"varint": VarInt,
}
if IS_GT_1:
ISCHEMA_NAMES["varint"] = VarInt


def register_extension_types() -> None:
Expand Down

0 comments on commit ccdbc06

Please sign in to comment.