mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 11:10:49 +00:00
Fix
This commit is contained in:
parent
a9cf67ecf2
commit
29440011ae
@ -183,10 +183,12 @@ void ColumnString::expand(const IColumn::Filter & mask, bool inverted)
|
||||
if (from < 0)
|
||||
throw Exception("Too many bytes in mask", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
int len = offsets_data[from] - offsets_data[from - 1];
|
||||
/// Copy only if it makes sense.
|
||||
size_t len = offsets_data[from] - offsets_data[from - 1];
|
||||
|
||||
/// Copy only if it makes sense. It's important to copy backward, because
|
||||
/// ranges can overlap, but destination is always is more to the right then source
|
||||
if (last_offset - len != offsets_data[from - 1])
|
||||
memcpy(&chars_data[last_offset - len], &chars_data[offsets_data[from - 1]], len);
|
||||
std::copy_backward(&chars_data[offsets_data[from - 1]], &chars_data[offsets_data[from]], &chars_data[last_offset]);
|
||||
last_offset -= len;
|
||||
--from;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ int checkShirtCircuitArguments(const ColumnsWithTypeAndName & arguments)
|
||||
int last_short_circuit_argument_index = -1;
|
||||
for (size_t i = 0; i != arguments.size(); ++i)
|
||||
{
|
||||
if (const auto * column_function = checkAndGetShortCircuitArgument(arguments[i].column))
|
||||
if (checkAndGetShortCircuitArgument(arguments[i].column))
|
||||
last_short_circuit_argument_index = i;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user