v.24.3Improvement
Always Infer Exponential Numbers in JSON and Introduce String Type for Ambiguous Paths in Named Tuples Inference
Always infer exponential numbers in JSON formats regardless of the settinginput_format_try_infer_exponent_floats. Add settinginput_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objectsthat allows to use String type for ambiguous paths instead of an exception during named Tuples inference from JSON objects. #60808 (Kruglov Pavel).
Why it matters
This feature ensures that exponential notation numbers in JSON are consistently inferred as numbers regardless of previous settings, improving reliability of data parsing. Additionally, it prevents errors caused by ambiguous paths during named Tuple inference by allowing users to opt for String type fallback. This enhances robustness and flexibility when importing JSON data containing complex or uncertain structures.How to use it
To always infer exponential numbers, no action is needed as this behavior is now default and independent ofinput_format_try_infer_exponent_floats. To avoid exceptions caused by ambiguous paths in named Tuple inference, set the configuration option:SET input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects = 1;This will force ambiguous paths to be treated as String types during JSON imports.