Skip to content

Commit

Permalink
make merge join log every left element
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Nov 5, 2023
1 parent c8d89f8 commit f2b5ce4
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ BindingSet join(BindingSet left, BindingSet right, boolean createNewBindingSet)
return joined;
}

BindingSet prevLeft;

void calculateNext() {
if (next != null) {
return;
Expand All @@ -103,6 +105,19 @@ void calculateNext() {
Value right = value.apply(peekRight);

int compareTo = cmp.compare(left, right);

BindingSet temp = leftIterator.peek();
if (temp != null) {
if (prevLeft != currentLeft) {
prevLeft = currentLeft;
int compare = cmp.compare(left, value.apply(temp));
System.out.println(compare + "\tleft: " + left.toString() + " next left:"
+ value.apply(temp).toString());

}

}

if (compareTo == 0) {
if (rightIterator.isResettable()) {
next = join(currentLeft, rightIterator.next(), true);
Expand Down

0 comments on commit f2b5ce4

Please sign in to comment.