-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
About
Based on a comment by @seut,
I think using a
floatwon't work as aDecimalhas a 128bit range and thus cannot fit into afloat.
this piece of code may want to be reviewed.
meltano-target-cratedb/target_cratedb/sqlalchemy/patch.py
Lines 54 to 68 in 2b20640
| def patch_json_encoder(): | |
| """ | |
| `Decimal` types have been rendered as strings. | |
| TODO: Upstream to crate-python. | |
| """ | |
| json_encoder_default = CrateJsonEncoder.default | |
| def default(self, o): | |
| if isinstance(o, Decimal): | |
| return float(o) | |
| return json_encoder_default(o) | |
| CrateJsonEncoder.default = default |
References
Metadata
Metadata
Assignees
Labels
No labels