diff options
author | uzhas <uzhas@ydb.tech> | 2022-09-17 12:02:18 +0300 |
---|---|---|
committer | uzhas <uzhas@ydb.tech> | 2022-09-17 12:02:18 +0300 |
commit | e4065899cddff8a7bde3bc774f33e9b6bebd961c (patch) | |
tree | 2aedc032fa03cd1bfb354a91ebdc48b43b8b9073 | |
parent | f7ac351009be051be95861cb7735fd76f368089c (diff) | |
download | ydb-e4065899cddff8a7bde3bc774f33e9b6bebd961c.tar.gz |
do not crash on broken CSV in checkTypeValidness
-rw-r--r-- | ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp b/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp index 002b1f8688..125a094f42 100644 --- a/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp +++ b/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp @@ -142,6 +142,9 @@ static bool checkTypeValidness(ReadBuffer& in, const char delimiter, bool is_las } } else { + if (in.eof()) + return false; + if (*in.position() == delimiter) { return true; } |