Browse Source

Intermediate changes

robot-piglet 9 months ago
parent
commit
c67cac0849

+ 1 - 1
contrib/python/clickhouse-connect/.dist-info/METADATA

@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: clickhouse-connect
-Version: 0.7.10
+Version: 0.7.11
 Summary: ClickHouse Database Core Driver for Python, Pandas, and Superset
 Home-page: https://github.com/ClickHouse/clickhouse-connect
 Author: ClickHouse Inc.

+ 1 - 1
contrib/python/clickhouse-connect/clickhouse_connect/__version__.py

@@ -1 +1 @@
-version = '0.7.10'
+version = '0.7.11'

+ 4 - 4
contrib/python/clickhouse-connect/clickhouse_connect/datatypes/numeric.py

@@ -291,9 +291,9 @@ class Decimal(ClickHouseType):
             dec = decimal.Decimal
             mult = self._mult
             if self.nullable:
-                write_array(self._array_type, [int(dec(x) * mult) if x else 0 for x in column], dest)
+                write_array(self._array_type, [int(dec(str(x)) * mult) if x else 0 for x in column], dest)
             else:
-                write_array(self._array_type, [int(dec(x) * mult) for x in column], dest)
+                write_array(self._array_type, [int(dec(str(x)) * mult) for x in column], dest)
 
     def _active_null(self, ctx: QueryContext):
         if ctx.use_none:
@@ -335,10 +335,10 @@ class BigDecimal(Decimal, registered=False):
             if self.nullable:
                 v = self._zeros
                 for x in column:
-                    dest += v if not x else itb(int(decimal.Decimal(x) * mult), sz, 'little', signed=True)
+                    dest += v if not x else itb(int(decimal.Decimal(str(x)) * mult), sz, 'little', signed=True)
             else:
                 for x in column:
-                    dest += itb(int(decimal.Decimal(x) * mult), sz, 'little', signed=True)
+                    dest += itb(int(decimal.Decimal(str(x)) * mult), sz, 'little', signed=True)
 
 
 class Decimal32(Decimal):

+ 1 - 1
contrib/python/clickhouse-connect/ya.make

@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(0.7.10)
+VERSION(0.7.11)
 
 LICENSE(Apache-2.0)