-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EvalMode
to evaluation test assertion
#29
Conversation
- [optional] evaluation `options` other than the defaults - struct | ||
- e.g. typing mode - strict vs permissive (permissive may be most useful) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was originally a struct to follow all the different compile options specified in the Kotlin reference implementation (see CompileOptions.kt). After looking at the Kotlin implementation's options and the specification, determined that "typing mode" (renamed to evaluation mode) was important to define at this time. Future options (if needed) can be added later.
@@ -107,7 +122,8 @@ type::{ | |||
type: struct, | |||
fields: { | |||
result: { type: symbol, valid_values: [EvaluationSuccess], occurs: required }, | |||
output: { occurs: required } | |||
output: { occurs: required }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered modeling the evaluation output
's value as the result
for EvaluationSuccess
cases but this made the schema validation a lot more complicated. The result
field has been a symbol and allowing it to take output
's value (i.e. any Ion value) can result in a duplicate matching type with EvaluationFail
. So I chose to keep the output
field separate.
conformance tests, we will refer to permissive mode as `EvalModeCoerce` and type checking mode as `EvalModeError`. | ||
These names can be changed in the future once we improve the terminology in the specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it makes sense to have a TODO issue in partiql-docs
for any required spec. change (like a spike) and linking it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it makes sense to add. Created https://github.com/partiql/partiql-docs/issues/24 to track and added a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks adding the issue—LGTM.
Issue #, if available: partiql/partiql-docs#25
Adds the
EvalMode
option to the evaluation test schema to represent the different dynamic type mismatch behaviors specified in the PartiQL specification (see section 4.1).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.