mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix use-after-move
This commit is contained in:
parent
ad697a0eac
commit
468b5e2813
@ -115,13 +115,14 @@ namespace JSONUtils
|
||||
return {loadAtPosition(in, memory, pos), number_of_rows};
|
||||
}
|
||||
|
||||
std::pair<bool, size_t> fileSegmentationEngineJSONEachRow(ReadBuffer & in, DB::Memory<> & memory, size_t min_bytes, size_t max_rows)
|
||||
std::pair<bool, size_t> fileSegmentationEngineJSONEachRow(
|
||||
ReadBuffer & in, DB::Memory<> & memory, size_t min_bytes, size_t max_rows)
|
||||
{
|
||||
return fileSegmentationEngineJSONEachRowImpl<'{', '}'>(in, memory, min_bytes, 1, max_rows);
|
||||
}
|
||||
|
||||
std::pair<bool, size_t>
|
||||
fileSegmentationEngineJSONCompactEachRow(ReadBuffer & in, DB::Memory<> & memory, size_t min_bytes, size_t min_rows, size_t max_rows)
|
||||
std::pair<bool, size_t> fileSegmentationEngineJSONCompactEachRow(
|
||||
ReadBuffer & in, DB::Memory<> & memory, size_t min_bytes, size_t min_rows, size_t max_rows)
|
||||
{
|
||||
return fileSegmentationEngineJSONEachRowImpl<'[', ']'>(in, memory, min_bytes, min_rows, max_rows);
|
||||
}
|
||||
|
@ -145,13 +145,13 @@ private:
|
||||
}
|
||||
write_helper.finalize();
|
||||
|
||||
/// Same as the normal `ColumnString` branch
|
||||
has_column_string = true;
|
||||
data[i] = &converted_col_str->getChars();
|
||||
offsets[i] = &converted_col_str->getOffsets();
|
||||
|
||||
/// Keep the pointer alive
|
||||
converted_col_ptrs[i] = std::move(converted_col_str);
|
||||
|
||||
/// Same as the normal `ColumnString` branch
|
||||
has_column_string = true;
|
||||
data[i] = &converted_col_ptrs[i]->getChars();
|
||||
offsets[i] = &converted_col_ptrs[i]->getOffsets();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,13 +108,13 @@ public:
|
||||
}
|
||||
write_helper.finalize();
|
||||
|
||||
/// Same as the normal `ColumnString` branch
|
||||
has_column_string = true;
|
||||
data[i - 1] = &converted_col_str->getChars();
|
||||
offsets[i - 1] = &converted_col_str->getOffsets();
|
||||
|
||||
/// Keep the pointer alive
|
||||
converted_col_ptrs[i - 1] = std::move(converted_col_str);
|
||||
|
||||
/// Same as the normal `ColumnString` branch
|
||||
has_column_string = true;
|
||||
data[i - 1] = &converted_col_ptrs[i - 1]->getChars();
|
||||
offsets[i - 1] = &converted_col_ptrs[i - 1]->getOffsets();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user