Bug Description
When parsing Enum types with escaped single quotes in their names (e.g. Enum8('f\'' = 1)), the parseEnumType function returns the raw escaped form of the name (f\') instead of the unescaped form (f').
Root Cause
In packages/client-common/src/parse/column_types.ts, the parseEnumType function correctly identifies escape sequences to find the closing quote, but does not unescape the extracted name:
// ~line 330
const name = columnType.slice(startIndex, i)
// name is 'f\'' (with backslash) instead of 'f'' (without)
Example
parseEnumType({ columnType: "Enum8('f\\'' = 1)", sourceType: "Enum8('f\\'' = 1)" })
// returns: { values: { 1: "f\\'" } } <- includes backslash (wrong)
// expected: { values: { 1: "f'" } } <- unescaped (correct)
Related
Reported via cross-repo analysis from ClickHouse/integrations-ai-playground#17.
Bug Description
When parsing Enum types with escaped single quotes in their names (e.g.
Enum8('f\'' = 1)), theparseEnumTypefunction returns the raw escaped form of the name (f\') instead of the unescaped form (f').Root Cause
In
packages/client-common/src/parse/column_types.ts, theparseEnumTypefunction correctly identifies escape sequences to find the closing quote, but does not unescape the extracted name:Example
Related
Reported via cross-repo analysis from ClickHouse/integrations-ai-playground#17.