mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Fixed Clang build.
This commit is contained in:
parent
07c4fa3cc0
commit
88c7220256
@ -580,7 +580,7 @@ void MergeTreeData::setTTLExpressions(const ColumnsDescription::ColumnTTLs & new
|
||||
String result_column = ttl_ast->getColumnName();
|
||||
checkTTLExpression(expr, result_column);
|
||||
|
||||
return {expr, result_column};
|
||||
return {expr, result_column, TTLDestinationType::DELETE, {}};
|
||||
};
|
||||
|
||||
if (!new_column_ttls.empty())
|
||||
@ -635,8 +635,9 @@ void MergeTreeData::setTTLExpressions(const ColumnsDescription::ColumnTTLs & new
|
||||
auto new_ttl_entry = create_ttl_entry(ttl_element.children[0]);
|
||||
if (!only_check)
|
||||
{
|
||||
TTLEntry entry{new_ttl_entry.expression, new_ttl_entry.result_column, ttl_element.destination_type, ttl_element.destination_name};
|
||||
move_ttl_entries_by_name.emplace(new_ttl_entry.result_column, entry);
|
||||
new_ttl_entry.destination_type = ttl_element.destination_type;
|
||||
new_ttl_entry.destination_name = ttl_element.destination_name;
|
||||
move_ttl_entries_by_name.emplace(new_ttl_entry.result_column, new_ttl_entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3129,11 +3130,13 @@ MergeTreeData::MutableDataPartsVector MergeTreeData::tryLoadPartsToAttach(const
|
||||
namespace
|
||||
{
|
||||
|
||||
inline DiskSpace::ReservationPtr throwNotEnoughSpace(UInt64 expected_size)
|
||||
inline DiskSpace::ReservationPtr returnReservationOrThrowError(UInt64 expected_size, DiskSpace::ReservationPtr reservation)
|
||||
{
|
||||
if (reservation)
|
||||
return reservation;
|
||||
|
||||
throw Exception("Cannot reserve " + formatReadableSizeWithBinarySuffix(expected_size) + ", not enough space",
|
||||
ErrorCodes::NOT_ENOUGH_SPACE);
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
@ -3143,10 +3146,8 @@ DiskSpace::ReservationPtr MergeTreeData::reserveSpace(UInt64 expected_size) cons
|
||||
expected_size = std::max(RESERVATION_MIN_ESTIMATION_SIZE, expected_size);
|
||||
|
||||
auto reservation = storage_policy->reserve(expected_size);
|
||||
if (reservation)
|
||||
return reservation;
|
||||
|
||||
return throwNotEnoughSpace(expected_size);
|
||||
return returnReservationOrThrowError(expected_size, std::move(reservation));
|
||||
}
|
||||
|
||||
DiskSpace::ReservationPtr MergeTreeData::reserveSpacePreferringMoveDestination(UInt64 expected_size,
|
||||
@ -3160,10 +3161,8 @@ DiskSpace::ReservationPtr MergeTreeData::reserveSpacePreferringMoveDestination(U
|
||||
return reservation;
|
||||
|
||||
reservation = storage_policy->reserve(expected_size);
|
||||
if (reservation)
|
||||
return reservation;
|
||||
|
||||
return throwNotEnoughSpace(expected_size);
|
||||
return returnReservationOrThrowError(expected_size, std::move(reservation));
|
||||
}
|
||||
|
||||
DiskSpace::ReservationPtr MergeTreeData::tryReserveSpaceOnMoveDestination(UInt64 expected_size,
|
||||
@ -3216,10 +3215,8 @@ DiskSpace::ReservationPtr MergeTreeData::reserveSpaceOnSpecificDisk(UInt64 expec
|
||||
expected_size = std::max(RESERVATION_MIN_ESTIMATION_SIZE, expected_size);
|
||||
|
||||
auto reservation = disk->reserve(expected_size);
|
||||
if (reservation)
|
||||
return reservation;
|
||||
|
||||
return throwNotEnoughSpace(expected_size);
|
||||
return returnReservationOrThrowError(expected_size, std::move(reservation));
|
||||
}
|
||||
|
||||
MergeTreeData::DataParts MergeTreeData::getDataParts(const DataPartStates & affordable_states) const
|
||||
|
Loading…
Reference in New Issue
Block a user