You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by kx...@apache.org on 2023/07/15 14:52:07 UTC
[doris] 03/03: [Bug](CSVReader) fix null pointer coredump in CSVReader in p2 (#20811)
This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
commit edceca404c91f50ea87c6e685ed4927915de037b
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Sat Jul 15 22:50:10 2023 +0800
[Bug](CSVReader) fix null pointer coredump in CSVReader in p2 (#20811)
---
be/src/vec/exec/format/csv/csv_reader.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/be/src/vec/exec/format/csv/csv_reader.cpp b/be/src/vec/exec/format/csv/csv_reader.cpp
index 9da29ed6dc..09531a2c2b 100644
--- a/be/src/vec/exec/format/csv/csv_reader.cpp
+++ b/be/src/vec/exec/format/csv/csv_reader.cpp
@@ -82,7 +82,7 @@ CsvReader::CsvReader(RuntimeState* state, RuntimeProfile* profile, ScannerCounte
_file_reader(nullptr),
_line_reader(nullptr),
_line_reader_eof(false),
- _text_converter(nullptr),
+ _text_converter(new(std::nothrow) TextConverter('\\')),
_decompressor(nullptr),
_skip_lines(0),
_io_ctx(io_ctx) {
@@ -91,7 +91,6 @@ CsvReader::CsvReader(RuntimeState* state, RuntimeProfile* profile, ScannerCounte
_file_compress_type = _params.compress_type;
_size = _range.size;
- _text_converter.reset(new (std::nothrow) TextConverter('\\', _array_delimiter[0]));
_split_values.reserve(sizeof(Slice) * _file_slot_descs.size());
_init_system_properties();
_init_file_description();
@@ -107,7 +106,7 @@ CsvReader::CsvReader(RuntimeProfile* profile, const TFileScanRangeParams& params
_file_slot_descs(file_slot_descs),
_line_reader(nullptr),
_line_reader_eof(false),
- _text_converter(nullptr),
+ _text_converter(new(std::nothrow) TextConverter('\\')),
_decompressor(nullptr),
_io_ctx(io_ctx) {
_file_format_type = _params.format_type;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org