Skip to content

Commit f2369ba

Browse files
authored
fix join hanging (#1380)
1 parent a8cda41 commit f2369ba

File tree

2 files changed

+4
-1
lines changed
  • partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rel
  • partiql-planner/src/main/kotlin/org/partiql/planner/internal/transforms

2 files changed

+4
-1
lines changed

partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rel/RelJoinNestedLoop.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ internal abstract class RelJoinNestedLoop : Operator.Relation {
5454
val result = condition.eval(input)
5555
toReturn = join(result.isTrue(), lhsRecord!!, rhsRecord!!)
5656
}
57+
// Move the pointer to the next row for the RHS
58+
if (toReturn == null) rhsRecord = rhs.next()
5759
}
5860
while (toReturn == null)
5961
return toReturn

partiql-planner/src/main/kotlin/org/partiql/planner/internal/transforms/Symbols.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ internal class Symbols private constructor() {
4949
var j = 0
5050
while (j < c.items.size) {
5151
if (c.items[j] == item) {
52-
break
52+
// Found existing item in catalog, return the ref
53+
return CatalogRef(i, j)
5354
}
5455
j++
5556
}

0 commit comments

Comments
 (0)