polishing

This commit is contained in:
Igor Nikonov 2023-04-04 16:13:21 +00:00
parent 5a9acac12f
commit 1fb0292fcb
2 changed files with 6 additions and 4 deletions

View File

@ -47,19 +47,20 @@ bool FillingRow::operator==(const FillingRow & other) const
bool FillingRow::next(const FillingRow & to_row)
{
const size_t row_size = size();
size_t pos = 0;
/// Find position we need to increment for generating next row.
for (size_t s = size(); pos < s; ++pos)
for (; pos < row_size; ++pos)
if (!row[pos].isNull() && !to_row.row[pos].isNull() && !equals(row[pos], to_row.row[pos]))
break;
if (pos == size() || less(to_row.row[pos], row[pos], getDirection(pos)))
if (pos == row_size || less(to_row.row[pos], row[pos], getDirection(pos)))
return false;
/// If we have any 'fill_to' value at position greater than 'pos',
/// we need to generate rows up to 'fill_to' value.
for (size_t i = size() - 1; i > pos; --i)
for (size_t i = row_size - 1; i > pos; --i)
{
if (getFillDescription(i).fill_to.isNull() || row[i].isNull())
continue;
@ -85,7 +86,7 @@ bool FillingRow::next(const FillingRow & to_row)
{
bool is_less = false;
size_t i = pos + 1;
for (; i < size(); ++i)
for (; i < row_size; ++i)
{
const auto & fill_from = getFillDescription(i).fill_from;
if (!fill_from.isNull())

View File

@ -273,6 +273,7 @@ IProcessor::Status FillingTransform::prepare()
}
generate_suffix = true;
/// return Ready to call transform() for generating filling rows after latest chunk was processed
return Status::Ready;
}
}