diff --git a/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprCallDynamic.kt b/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprCallDynamic.kt index 4230b85077..3eb91f0205 100644 --- a/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprCallDynamic.kt +++ b/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprCallDynamic.kt @@ -27,7 +27,7 @@ internal class ExprCallDynamic( val actualArgs = args.map { it.eval(record) }.toTypedArray() candidates.forEach { candidate -> if (candidate.matches(actualArgs)) { - candidate.eval(actualArgs) + return candidate.eval(actualArgs) } } throw TypeCheckException() diff --git a/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt b/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt index 44966e0b35..4dc98122da 100644 --- a/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt +++ b/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt @@ -262,6 +262,12 @@ class PartiQLEngineDefaultTest { ; """.trimIndent(), expected = stringValue("isOne") + ), + SuccessTestCase( + input = """ + `null.bool` IS NULL + """.trimIndent(), + expected = boolValue(true) ) ) }