suxiaogang223 commented on code in PR #50379:
URL: https://github.com/apache/doris/pull/50379#discussion_r2080873385
##########
be/src/vec/exec/format/csv/csv_reader.cpp:
##########
@@ -649,11 +577,10 @@ Status CsvReader::_fill_dest_columns(const Slice& line,
Block* block,
for (int i = 0; i < _file_slot_descs.size(); ++i) {
int col_idx = _col_idxs[i];
- // col idx is out of range, fill with null.
- const Slice& value = col_idx < _split_values.size()
- ? _split_values[col_idx]
- : Slice {_options.null_format,
_options.null_len};
- Slice slice {value.data, value.size};
+ // col idx is out of range, fill with null format
+ auto value = col_idx < _split_values.size()
+ ? _split_values[col_idx]
+ : Slice(_options.null_format, _options.null_len);
Review Comment:
In the process of doris load csv, "\\N" is hard-coded as a null value, but
there is no null value in the opencsv format of hive, and empty strings are
used to fill non-existent columns. When reading the hive csv table here,
null_format will be an empty string, and null_len will be 0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]