rtpsw commented on code in PR #34392:
URL: https://github.com/apache/arrow/pull/34392#discussion_r1211679631
##########
cpp/src/arrow/acero/asof_join_node.cc:
##########
@@ -856,10 +1030,23 @@ class CompositeReferenceTable {
row.refs[0].row = lhs_latest_row;
AddRecordBatchRef(lhs_latest_batch);
+ DEBUG_SYNC(node_, "Emplace: key=", key, " lhs_latest_row=", lhs_latest_row,
+ " lhs_latest_time=", lhs_latest_time, DEBUG_MANIP(std::endl));
+
// Get the state for that key from all on the RHS -- assumes it's up to
date
// (the RHS state comes from the memoized row references)
for (size_t i = 1; i < in.size(); ++i) {
std::optional<const MemoStore::Entry*> opt_entry =
in[i]->GetMemoEntryForKey(key);
+#ifndef NDEBUG
+ {
+ bool has_entry = opt_entry.has_value();
+ OnType entry_time = has_entry ? (*opt_entry)->time :
TolType::kMinValue;
+ row_index_t entry_row = has_entry ? (*opt_entry)->row : 0;
+ bool accepted = has_entry && tolerance.Accepts(lhs_latest_time,
entry_time);
Review Comment:
Here, `accepted` is in the same sense of `tolerance.Accepts`, meaning that
the entry's time must (exist and) be within the [time interval defined by the
tolerance](https://github.com/apache/arrow/blob/dcdeab76b4ba4bac0b4115925c820961ef70ae0d/cpp/src/arrow/acero/asof_join_node.cc#L111)
for `lhs_latest_time`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]