Skip to content

Commit 55b5735

Browse files
committed
Better handling double type
1 parent 64f62ab commit 55b5735

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mysql_ch_replicator/converter.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ def convert_type(self, mysql_type):
102102
return 'String'
103103
if 'decimal' in mysql_type:
104104
return 'Float64'
105+
if 'float' in mysql_type:
106+
return 'Float32'
107+
if 'double' in mysql_type:
108+
return 'Float64'
109+
if 'integer' in mysql_type:
110+
return 'Int32'
111+
if 'real' in mysql_type:
112+
return 'Float64'
105113
if mysql_type.startswith('time'):
106114
return 'String'
107115
raise Exception(f'unknown mysql type "{mysql_type}"')

0 commit comments

Comments
 (0)