From c6f3d452c0ec3aa2d58d1d5f8eb6117caef37ec4 Mon Sep 17 00:00:00 2001 From: Hannah Bast Date: Mon, 16 Dec 2024 21:12:05 +0100 Subject: [PATCH] Improve comment --- src/engine/AddCombinedRowToTable.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/engine/AddCombinedRowToTable.h b/src/engine/AddCombinedRowToTable.h index 1375a62825..45f51fb527 100644 --- a/src/engine/AddCombinedRowToTable.h +++ b/src/engine/AddCombinedRowToTable.h @@ -156,13 +156,12 @@ class AddCombinedRowToIdTable { AD_CORRECTNESS_CHECK(inputLeftAndRight_.has_value()); flush(); } else if (resultTable_.empty()) { - // Clear vocab when no rows were written. - // TODO We could optize the case that there were no - // calls to `addRow` for the current input, but we still have rows in the - // `resultTable_` from previous inputs. Possibly we could only merge in - // the local vocab from the inputs when calling `flush` the first time, - // and not right when on `setInput`. But this requires further thought and - // thinking, while this comment was written as part of a crucial bugfix. + // Clear local vocab when no rows were written. + // + // TODO This is a conservative approach. We could + // optimize this case (clear the local vocab more often, but still + // correctly) by considering the situation after all the relevant inputs + // have been processed. mergedVocab_ = LocalVocab{}; } }