Skip to content

Commit

Permalink
Merge pull request #1261 from partiql/fix-compilation
Browse files Browse the repository at this point in the history
Fixes rewrite of control flow.
  • Loading branch information
johnedquinn authored Nov 2, 2023
2 parents bb6cf3e + 7ceed1a commit 262074f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ internal object RexConverter {
}.toMutableList()

val defaultRex = rex(type = StaticType.NULL, op = rexOpLit(value = nullValue()))
branches += rexOpCaseBranch(bool(true), defaultRex)
val op = rexOpCase(branches)
val op = rexOpCase(branches, defaultRex)
rex(type, op)
}

Expand All @@ -363,9 +362,8 @@ internal object RexConverter {
val call = rexOpCall(fn, listOf(expr1, expr2))
val branches = listOf(
rexOpCaseBranch(rex(type, call), rex(type = StaticType.NULL, op = rexOpLit(value = nullValue()))),
rexOpCaseBranch(bool(true), expr1)
)
val op = rexOpCase(branches.toMutableList())
val op = rexOpCase(branches.toMutableList(), expr1)
rex(type, op)
}

Expand Down

0 comments on commit 262074f

Please sign in to comment.