Skip to content

Commit

Permalink
Backport #61883 to 24.3: Mark CANNOT_PARSE_ESCAPE_SEQUENCE error as p…
Browse files Browse the repository at this point in the history
…arse error to be able to skip it in row input formats
  • Loading branch information
robot-clickhouse committed Apr 3, 2024
1 parent 4d5cfa1 commit d022276
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Processors/Formats/IRowInputFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace ErrorCodes
extern const int CANNOT_PARSE_IPV4;
extern const int CANNOT_PARSE_IPV6;
extern const int UNKNOWN_ELEMENT_OF_ENUM;
extern const int CANNOT_PARSE_ESCAPE_SEQUENCE;
}


Expand All @@ -50,7 +51,8 @@ bool isParseError(int code)
|| code == ErrorCodes::CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING
|| code == ErrorCodes::CANNOT_PARSE_IPV4
|| code == ErrorCodes::CANNOT_PARSE_IPV6
|| code == ErrorCodes::UNKNOWN_ELEMENT_OF_ENUM;
|| code == ErrorCodes::UNKNOWN_ELEMENT_OF_ENUM
|| code == ErrorCodes::CANNOT_PARSE_ESCAPE_SEQUENCE;
}

IRowInputFormat::IRowInputFormat(Block header, ReadBuffer & in_, Params params_)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
some string
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
select * from format(JSONEachRow, '{"item" : "some string"}, {"item":"\\\\ \ud83d"}') settings input_format_allow_errors_num=1;

0 comments on commit d022276

Please sign in to comment.