mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
fix review comments
This commit is contained in:
parent
cc29bb74ca
commit
be70d237b2
@ -713,18 +713,11 @@ Field FieldVisitorReplaceScalars::operator()(const Array & x) const
|
|||||||
size_t FieldVisitorToNumberOfDimensions::operator()(const Array & x) const
|
size_t FieldVisitorToNumberOfDimensions::operator()(const Array & x) const
|
||||||
{
|
{
|
||||||
const size_t size = x.size();
|
const size_t size = x.size();
|
||||||
std::optional<size_t> dimensions;
|
size_t dimensions = 0;
|
||||||
|
|
||||||
for (size_t i = 0; i < size; ++i)
|
for (size_t i = 0; i < size; ++i)
|
||||||
{
|
dimensions = std::max(dimensions, applyVisitor(*this, x[i]));
|
||||||
size_t current_dimensions = applyVisitor(*this, x[i]);
|
|
||||||
if (!dimensions)
|
|
||||||
dimensions = current_dimensions;
|
|
||||||
else
|
|
||||||
dimensions = std::max(*dimensions, current_dimensions);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1 + dimensions.value_or(0);
|
return 1 + dimensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user