Skip to content
Open
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 clickhouse_sqlalchemy/drivers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'DateTime64': types.DateTime64,
'Float64': types.Float64,
'Float32': types.Float32,
'BFloat16': types.BFloat16,
'Decimal': types.Decimal,
'String': types.String,
'Bool': types.Boolean,
Expand Down
3 changes: 3 additions & 0 deletions clickhouse_sqlalchemy/drivers/compilers/typecompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def visit_datetime64(self, type_, **kw):
def visit_float32(self, type_, **kw):
return 'Float32'

def visit_bfloat32(self, type_, **kw):

@joe-clickhouse joe-clickhouse Sep 25, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @franz101, think you have a typo here:

Suggested change
def visit_bfloat32(self, type_, **kw):
def visit_bfloat16(self, type_, **kw):

return 'BFloat16'

def visit_float64(self, type_, **kw):
return 'Float64'

Expand Down
1 change: 1 addition & 0 deletions clickhouse_sqlalchemy/drivers/http/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def nothing_converter(x):
'UInt128': int,
'Int256': int,
'UInt256': int,
'BFloat16': float,
'Float32': float,
'Float64': float,
'Decimal': Decimal,
Expand Down
2 changes: 2 additions & 0 deletions clickhouse_sqlalchemy/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'UInt128',
'Int256',
'UInt256',
'BFloat16',
'Float32',
'Float64',
'Date',
Expand Down Expand Up @@ -59,6 +60,7 @@
from .common import UInt128
from .common import Int256
from .common import UInt256
from .common import BFloat16
from .common import Float32
from .common import Float64
from .common import Date
Expand Down
4 changes: 4 additions & 0 deletions clickhouse_sqlalchemy/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ class UInt256(Int):
__visit_name__ = 'uint256'


class BFloat16(Float):
__visit_name__ = 'bfloat16'


class Float32(Float):
__visit_name__ = 'float32'

Expand Down