v.24.10Improvement

Parsing JSON Enum Fields Now Interprets Integer Strings as Enum Elements

While parsing an Enum field from JSON, a string containing an integer will be interpreted as the corresponding Enum element. This closes #65119. #66801 (scanhex12).
Improved parsing of Enum fields from JSON: strings containing integer values are now correctly interpreted as corresponding Enum elements.

Why it matters

This feature addresses the issue where Enum fields represented as strings containing integer values in JSON were not properly parsed. By enabling this interpretation, ClickHouse ensures more accurate and flexible ingestion of Enum types from JSON data, improving compatibility and reducing parsing errors.

How to use it

No additional configuration is needed. When parsing JSON data containing Enum fields, simply provide the data as usual, and strings that contain integer values will be automatically matched to their corresponding Enum elements.