lib/duckdb/result.rb in duckdb-0.8.1.1 vs lib/duckdb/result.rb in duckdb-0.8.1.2
- old
+ new
@@ -102,10 +102,10 @@
end
def _to_decimal_internal(row, col)
lower, upper, _width, scale = __to_decimal_internal(row, col)
v = (upper * Converter::HALF_HUGEINT + lower).to_s
- v[-scale, 0] = '.'
+ v[-scale, 0] = '.' unless v == '0'
BigDecimal(v)
end
end
end