v.23.1Improvement
Allow Implicit Conversion of Floats in JSONExtract Functions
Allow to implicitly convert floats stored in string fields of JSON to integers inJSONExtractfunctions. E.g.JSONExtract('{"a": "1000.111"}', 'a', 'UInt64')->1000, previously it returned 0. #45432 (Anton Popov).
Why it matters
Previously, attempting to extract an integer from a JSON string field containing a float (e.g., "1000.111") usingJSONExtract would return 0. This feature enables correct extraction by implicitly converting float-formatted strings to integers, improving data extraction accuracy and usability.How to use it
Use theJSONExtract function as usual to extract integer types from JSON fields containing float values stored as strings. For example: JSONExtract('{"a": "1000.111"}', 'a', 'UInt64') will now return 1000 instead of 0.