We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9af0b31 commit 8b0c5acCopy full SHA for 8b0c5ac
1 file changed
trino.py
@@ -44,6 +44,10 @@ def _trino_error_result(e: BaseException):
44
def _decimal_to_string(value: Decimal):
45
if not isinstance(value, Decimal):
46
raise ValueError('Not a Decimal: ' + type(value).__name__)
47
- if not value.is_finite():
48
- raise ValueError('Decimal is not finite: ' + str(value))
+ if value.is_nan():
+ return "NaN"
49
+ if value.is_infinite():
50
+ if value.is_signed():
51
+ return "-Infinity"
52
+ return "Infinity"
53
return "{:f}".format(value)
0 commit comments