clickhouse-sqlalchemy icon indicating copy to clipboard operation
clickhouse-sqlalchemy copied to clipboard

HTTP driver don't support the boolean type

Open irtimir opened this issue 1 month ago • 1 comments

Describe the bug If a column has a boolean type, then in Python it becomes a string.

To Reproduce

engine = create_engine('clickhouse+http://...')

t = Table(
    'table',
    Column('is_something', Boolean),
)

with engine.connect() as conn:
    query = select(t.c.is_something).select_from(t)
    result = list(conn.execute(query))
    print(result[0][0])

Expected behavior Bool type is converted to bool

Versions

  • clickhouse-sqlalchemy v0.3.2
  • Python 3.12

irtimir avatar Nov 21 '25 11:11 irtimir

The proposed fix is ​​here https://github.com/xzkostyan/clickhouse-sqlalchemy/pull/395

irtimir avatar Nov 21 '25 11:11 irtimir