|
@@ -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):
|