forked from partiql/partiql-lang-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promote Rex.Op.Missing to compile time error in strict (partiql#1437)
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rex/ExprMissing.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ExprMissing( | ||
private val message: String, | ||
) : Operator.Expr { | ||
|
||
@OptIn(PartiQLValueExperimental::class) | ||
override fun eval(env: Environment): PartiQLValue { | ||
throw TypeCheckException(message) | ||
} | ||
} |