diff --git a/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprError.kt b/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprError.kt new file mode 100644 index 0000000000..b439241e71 --- /dev/null +++ b/partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprError.kt @@ -0,0 +1,17 @@ +package org.partiql.eval.internal.operator.rex + +import org.partiql.errors.TypeCheckException +import org.partiql.eval.internal.Environment +import org.partiql.eval.internal.operator.Operator +import org.partiql.value.PartiQLValue +import org.partiql.value.PartiQLValueExperimental + +internal class ExprError( + private val message: String, +) : Operator.Expr { + + @OptIn(PartiQLValueExperimental::class) + override fun eval(env: Environment): PartiQLValue { + throw TypeCheckException(message) + } +}